Multiple Webhooks per Phone Number
Last updated
Last updated
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
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
Name | Value |
---|---|
Body
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
https://waba-v2.360dialog.io/multi_webhook
This endpoint retrieves all configured and additional webhooks.
Headers
Response
PUT
https://waba-v2.360dialog.io/multi_webhook
You can add up to 3 webhooks per phone number. This limit cannot be increased.
Headers
Body
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
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
Body
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
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
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
Name | Type | Description |
---|---|---|
Name | Value |
---|---|
Name | Value |
---|---|
Name | Type | Description |
---|---|---|
Name | Value |
---|---|
Name | Type | Description |
---|---|---|
Name | Value |
---|---|
Content-Type
application/json
D360-API-KEY*
API Key
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"
Content-Type
application/json
D360-API-KEY*
API Key
Content-Type
application/json
D360-API-KEY*
API Key
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
Content-Type
application/json
D360-API-KEY*
API Key
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
Content-Type
application/json
D360-API-KEY*
API Key