Create a webhook subscription
POST/api/crm/v2/webhooks_subscriptions.addv2
operationId: webhooksSubscriptions.add
Authorization
api-token + language + role
Query parameters
branch_idintegerrequired
Example: 8412
Request body application/json
object
webhook_event_idintegerrequired
Example: 4
urlstringrequired
Example: https://partner.example.com/hooks/foodsoul
descriptionstringrequired
Example: Учётная система
Responses
object
statusstringrequired
Values:successerror
Example: success
dataobject
rowobject
settingsobject (WebhooksBranchSettings)
secretstringcan be null
null until the network creates a secret
Example: 9f2c…
enabledbooleanrequired
Example: true
listarray of object
idintegerrequired
Example: 12
date_creationstring (DataTimeFormatSQL) required
Example: 2024-05-02 08:31:16
webhook_event_idintegerrequired
Example: 4
slugstringrequired
Event code sent in the webhook payload
Example: order.created
translation_keystringrequired
Translation key for the event name
Example: webhooksSubscriptionsEvent.orderCreated
urlstringrequired
Example: https://partner.example.com/hooks/foodsoul
descriptionstringrequired
Example: Учётная система
enabledbooleanrequired
Example: true
blockedbooleanrequired
The subscription is automatically disabled after a series of errors
Example: false
count_errorsintegerrequired
Number of consecutive failed deliveries
Example: 0