Add Webhook
Add a new webhook subscription to the account.
Settings:
|
URL |
https://online.99digital.co.il/api/v1/accounts/{account_id}/webhooks |
|
Method |
JSON via POST |
Authorization:
|
Header Parameter |
Description |
|
api_access_token |
user API key |
The user API key provides access to endpoints based on the user permissions levels and can be obtained by visiting the profile page.
Path Parameters:
|
Parameter |
Description |
Required |
|
account_id |
The numeric id of the account |
yes |
Request body:
|
Parameter |
type |
Description |
Required |
|
url |
string |
The URL where the events should be sent |
yes |
|
subscriptions |
array of strings |
The events to which you want to be subscribed
|
yes |
Request body example:
{
"url": "string",
"subscriptions": ["conversation_created", "conversation_status_changed", "conversation_updated", "message_created", "message_updated", "webwidget_triggered" , "contact_created", "contact_updated"]
}
Response:
{
"payload": {
"webhook": {
"id": 0,
"url": "string",
"account_id": 0,
"subscriptions": [
"conversation_created",
"conversation_status_changed",
"conversation_updated",
"message_created",
"message_updated",
"webwidget_triggered",
"contact_created",
"contact_updated"
]
}
}
}
Response-Explain:
|
Parameter |
Description |
|
payload -> webhook |
Objects containing webhook details |
|
payload -> webhook -> id |
The numeric id of the webhook |
|
payload -> webhook -> url |
The URL to which the events will be send |
|
payload -> webhook -> account_id |
The numeric id of the account |
|
payload -> webhook -> subscriptions |
Array of strings (subscribed events) |
Created with the Personal Edition of HelpNDoc: Full-featured multi-format Help generator