Update expiration time within subscription
curl --request PATCH \
--url https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/expires_at \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"expires_at": "2026-12-31T00:00:00Z"
}
'import requests
url = "https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/expires_at"
payload = { "expires_at": "2026-12-31T00:00:00Z" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({expires_at: '2026-12-31T00:00:00Z'})
};
fetch('https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/expires_at', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/expires_at"
payload := strings.NewReader("{\n \"expires_at\": \"2026-12-31T00:00:00Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"errors": [
{
"title": "Parameter is malformed",
"detail": "Some validation errors will be described here"
}
]
}{
"errors": [
{
"title": "Unauthorized Error",
"detail": "The API key is invalid, please, make sure that you are using a valid key"
}
]
}{
"errors": [
{
"title": "Forbidden",
"detail": "unpaid keys can only move expires_at earlier"
}
]
}{
"errors": [
{
"title": "Resource was not found",
"detail": "Requested resource was not found, try later"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}subscriptions to transactions
Update expiration time within subscription
Set or remove the expiration time of an existing webhook subscription.
PATCH
/
v1
/
tx-subscriptions
/
{subscription_id}
/
expires_at
Update expiration time within subscription
curl --request PATCH \
--url https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/expires_at \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"expires_at": "2026-12-31T00:00:00Z"
}
'import requests
url = "https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/expires_at"
payload = { "expires_at": "2026-12-31T00:00:00Z" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({expires_at: '2026-12-31T00:00:00Z'})
};
fetch('https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/expires_at', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/expires_at"
payload := strings.NewReader("{\n \"expires_at\": \"2026-12-31T00:00:00Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"errors": [
{
"title": "Parameter is malformed",
"detail": "Some validation errors will be described here"
}
]
}{
"errors": [
{
"title": "Unauthorized Error",
"detail": "The API key is invalid, please, make sure that you are using a valid key"
}
]
}{
"errors": [
{
"title": "Forbidden",
"detail": "unpaid keys can only move expires_at earlier"
}
]
}{
"errors": [
{
"title": "Resource was not found",
"detail": "Requested resource was not found, try later"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}Authorizations
To test endpoints here, paste your API key from the Dashboard into the username field and leave the password empty.
Path Parameters
Body
application/json
Response
Expiry updated. Also returned when the new value matches the stored one.
Was this page helpful?