# Webhook refresh subscription

This endpoint refreshes a webhook subscription.

REFRESH_URL

You can make a request to this endpoint by using a "refresh_url". This url is provided in every notification message as well as in the responses to requests to the webhook_confirm_subscription and webhook_refresh_subscription endpoint.

Method Path Operation*
PATCH /notifications/webhooks/{account}?token={token} webhook_refresh_subscription

*

This endpoint does not require User Secret (API key) authorization.

# Request

Parameter Type In Description
token
required
string query string Unique subscription token generated by the system.
account
required
string path Account UUID.
expires
optional
integer, DEFAULT=604800 body Time in seconds when the notification subscription expires. It is counted from the time of the creation of the subscription. The maximum and default value is 604800 seconds (7 days).
client_secret
optional*
string body Client secret provided for the purpose of calculating a notification hash to be used for hash verification. It must be a URL-safe-Base64 compatible 16 character long string.

*

The "client_secret" parameter is optional and does not need to be included in the request body when refreshing subscriptions. If it is not included in the request body, the hash is not calculated and a server_secret is not be returned.

# Response

Attribute Type Description
callback_url string Target URL to which messages are to be delivered. It can have maximum 512 characters.
subscription dictionary
Subscription details.
Attribute Type Description
topic string Name of the subscription topic. It must match the regular expression(opens new window) ^[0-9A-Za-z\-]{3,48}$.
account string Account UUID.
validity_ts timestamp Time at which the subscription expires. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
unsubscribe_url string URL to unsubscribe from a subscription.
refresh_url string URL to refresh a subscription.

# Status codes

Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status codes section.

Was this article helpful?