Update callback URL within subscription
curl --request PATCH \
--url https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/callback_url \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"callback_url": "https://webhook.site/new-callback-url"
}
'import requests
url = "https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/callback_url"
payload = { "callback_url": "https://webhook.site/new-callback-url" }
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({callback_url: 'https://webhook.site/new-callback-url'})
};
fetch('https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/callback_url', 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}/callback_url"
payload := strings.NewReader("{\n \"callback_url\": \"https://webhook.site/new-callback-url\"\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": "Too many requests",
"detail": "Your request had been throttled"
}
]
}subscriptions to transactions
Update callback URL within subscription
This endpoint updates the callback URL for a specific subscription.
NOTE: Consider all IDs as abstract strings, without making any assumptions about their format or relying on such assumptions. There is a non-zero probability that IDs may change in the future, and this should not result in any breaking changes.
PATCH
/
v1
/
tx-subscriptions
/
{subscription_id}
/
callback_url
Update callback URL within subscription
curl --request PATCH \
--url https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/callback_url \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"callback_url": "https://webhook.site/new-callback-url"
}
'import requests
url = "https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/callback_url"
payload = { "callback_url": "https://webhook.site/new-callback-url" }
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({callback_url: 'https://webhook.site/new-callback-url'})
};
fetch('https://api.zerion.io/v1/tx-subscriptions/{subscription_id}/callback_url', 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}/callback_url"
payload := strings.NewReader("{\n \"callback_url\": \"https://webhook.site/new-callback-url\"\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": "Too many requests",
"detail": "Your request had been throttled"
}
]
}Authorizations
Path Parameters
ID of the subscription
Example:
"77e77447-1586-40e8-a75b-467ef939a0b1"
Body
application/json
The new callback URL to be used for the subscription.
Example:
"https://webhook.site/new-callback-url"
Response
Successfully updated callback URL
Was this page helpful?