# Subscribe to a webhook
This endpoint creates a webhook subscription for a given topic.
|string||body||Target URL to which messages are to be delivered. It can have maximum 512 characters.|
|string||body||Name of the subscription topic. It must match the regular expression (opens new window) |
|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.|
|integer, ||body||Time in seconds when the notification subscription expires counted from the time of the creation of the subscription. The maximum and default value is 604800 seconds (7 days).|
"client_secret" parameter is optional and does not need to be included in the request body when creating subscriptions. If it is not included in the request body, the hash is not calculated and a
server_secret is not be returned in the response.
"expires" parameter is optional and does not need to be included in the request body when creating subscriptions. If it is not included in the request body, its default value (
DEFAULT=604800) is used.
|callback_url||string||Target URL to which messages are to be delivered. It can have maximum 512 characters.|
|server_secret||string||URL-safe-Base64 compatible 16-character long string to be used in the hash verification process. It must match the RegEx [A-Za-z0-9-_=].|
# Confirmation message
The call to the endpoint returns a confirmation message to the provided callback URL.
|type||string||Message type. For messages generating a |
|sent_ts||timestamp||Time at which the message was sent. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window).|
|confirmation_url||string||URL to which a GET request needs to be sent (see confirm_a_webhook_subscription in order to confirm the subscription.|
|hash||string||Message hash. Please see the Hash verification section for more details.|
# Status codes
Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status codes section.