Multiple Webhooks per Phone Number
Multiple Webhooks per Phone Number are only available for Cloud API numbers.
You can attach multiple Webhook URLs to a single phone number. This can be used to manage additional webhooks, enhancing automation and integration capabilities within your systems.
This feature allows integration options but compromises on performance. The more webhooks are attached to a number, the longer messages will take to arrive and be acknowledged, so the overall number performance will be impacted. Make sure to have this in mind when considering utilizing multiple webhooks for a single phone number. Using only one webhook is recommended for high volume accounts.
All destinations will get cloned incoming notifications from the Messaging API. But, extra webhooks will only get these notifications if the main destination (connected to the phone number) successfully receives them with 200
success code. See our documentation for Best Practices for designing Integrations.
Each phone number is limited to a maximum of 3 unique webhooks. This limit cannot be increased. You cannot attach multiple webhooks to a full WABA, only to specific phone numbers.
Webhook URLs or headers for Cloud API does not support "_
"(underscore)
or ":xxxx
"(port)
in (sub)domain names.
Invalid webhook URL: https://your_webhook.example.com
Valid webhook URL: https://yourwebhook.example.com
Invalid webhook URL:https://subdomain.your_webhook.example.com
:3000
Valid webhook URL: https://subdomain.yourwebhook.example.com
Enable/Disable Multiple Webhooks
POST
https://waba-v2.360dialog.io/multi_webhook
Use this endpoint to enable or disable the Multiple Webhook configuration to a specific phone number.
Headers
Content-Type
application/json
D360-API-KEY*
API Key
Body
enabled
*
boolean
Use true
to enable or false
to disable this configuration.
destinations
object
Optional.
Required to append new webhooks.
name
string
Name of the new webhook.
*Webhook names are case-sensitive, like unique IDs.
url
string
URL of the new webhook. (www.example.com/webhook)
headers
string
"Content-Type": "application/json"
Sample Request
To enable multi-webhook feature and add new destinations.
Webhook names are case-sensitive and function like unique IDs. Therefore, a webhook named "webhook
" is considered distinct from "WEBhook
." The API will only add a new webhook if the <name>
provided in the request does not match with any existing configuration.
To enable or disable multi-webhook feature, the destination
object is not required:
Response
Get list of configured Webhooks
GET
https://waba-v2.360dialog.io/multi_webhook
This endpoint retrieves all configured and additional webhooks.
Headers
Content-Type
application/json
D360-API-KEY*
API Key
Response
Append additional Webhooks
PUT
https://waba-v2.360dialog.io/multi_webhook
You can add up to 3 webhooks per phone number. This limit cannot be increased.
Headers
Content-Type
application/json
D360-API-KEY*
API Key
Body
destinations*
object
Required to append new webhooks.
name*
string
Name of the new webhook. *Webhook names are case-sensitive, like unique IDs.
url*
string
URL of the new webhook. (www.example.com/webhook)
headers*
string
D360-API-KEY
Sample Request
Webhook names are case-sensitive, and function like unique IDs. Therefore, a webhook named "webhook
" is considered distinct from "WEBhook
." The API will only add a new webhook if the <name>
provided in the request does not match with any existing configuration.
Response
Update properties of an existing webhook
PATCH
https://waba-v2.360dialog.io/multi_webhook
To update properties of an existing webhook, use the endpoint and specify the new webhook configuration in the request payload.
Headers
Content-Type
application/json
D360-API-KEY*
API Key
Body
name*
string
Name of the existing webhook. *Webhook names are case-sensitive, like unique IDs.
url*
string
Updated URL for the existing webhook. (www.example.com/webhook)
headers*
string
D360-API-KEY
Sample Request
Webhook names are case-sensitive, and function like unique IDs. Therefore, "webhook
" is considered distinct from "WEBhook
". The API will only modify the webhook if the <name>
passed in the request is an exact match.
Sample Response
Delete a specific webhook configuration by name
DELETE
https://waba-v2.360dialog.io/multi_webhook/{{name}}
To delete a additional webhook, use this endpoint. Remember that if you delete all webhooks, it the system will return an empty response when attempting callbacks.
Headers
Content-Type
application/json
D360-API-KEY*
API Key
Path Sample Request
Use the GET
request to retrieve webhook names.
Webhook names are case-sensitive, and function like unique IDs. Therefore, a webhook named "webhook
" is considered distinct from "WEBhook
". The API will only delete the webhook if the <name>
passed in the request is an exact match.
Response
Last updated