Event: WhatsApp
Webhook
For every WhatsApp event that happens in the partners system, you will get a webhook (event "whatsapp"): during the onboarding of a WhatsApp number through an onboarding link, and when a WhatsApp account is deleted.
Settings:
| Setting | Value |
|---|---|
| URL | Your URL — set it with Set Webhook |
| Method | JSON via POST |
whatsapp_extra_info tells you what happened:
- 1, 2 and 3 are sent during the onboarding of a number through the link
you created with Step 2: Onboarding.
They include
daily_limitandwhatsapp_apiKey. - 4 is sent when the WhatsApp account is deleted, with Delete WhatsApp Account or in the partners dashboard.
- 5 is sent when there was an error in the client's onboarding process, also when the client cancels or closes the Facebook login window of the onboarding.
The first webhook you will get after your client finishes the onboarding will
be with whatsapp_extra_info 1 or 2, and it will include the
whatsapp_apiKey. We recommend that you use it with
Set Webhook of the WhatsApp API (V2), in
order to start getting webhook updates regarding this WhatsApp account.
With every WhatsApp event, you will get some of the following:
{
"status": "OK",
"event": "whatsapp",
"whatsapp": "972501234567",
"whatsapp_reference": "1234567",
"whatsapp_extra_info": 2,
"daily_limit": 250,
"whatsapp_apiKey": "3f9a1c-7b2e4d-c8a05f-61d9e2-b47c3a"
}
Response explained
| Parameter | Description / Example |
|---|---|
status | "OK" always. |
event | "whatsapp" always. |
whatsapp | The WhatsApp number that is relevant, in international format. |
whatsapp_reference | The reference value that was provided by you when creating the account (reference in Step 2: Onboarding). Empty when you didn't provide one; when such an account is deleted (whatsapp_extra_info 4), it is "0". |
whatsapp_extra_info | A number related to the WhatsApp update — when will you get this webhook. See the values below. |
daily_limit | The daily business conversations limit this line can have right from the start. Sent only with whatsapp_extra_info 1, 2 or 3. See the values below. |
whatsapp_apiKey | The apiKey that was created for you, to use the WhatsApp API (V2) with this number. Sent only with whatsapp_extra_info 1, 2 or 3. |
whatsapp_extra_info
| Value | Explanation |
|---|---|
| 1 | The client has finished the onboarding process through the link, but the account is not yet ready to start messaging at all. |
| 2 | The client has finished the onboarding process through the link, and the account is ready to start receiving and replying to messages only. |
| 3 | The WhatsApp account is ready to start sending templates and receiving messages. Onboarding completed. |
| 4 | The WhatsApp account has been deleted. |
| 5 | There was an error on the client's onboarding process (also sent when the client cancels or closes the Facebook login window). Please contact your client to provide support. |
daily_limit
| Value | Explanation |
|---|---|
| 0 | The daily messages limit was not determined yet. Please send your first outgoing message or template and you will get a webhook with an update. |
| 50 | 50 daily conversations. |
| 250 | 250 daily conversations (this is usually the default when the business is not verified). |
| 1000 | 1,000 daily conversations. |
| 2000 | 2,000 daily conversations (this is usually the default when the business is verified). |
| 10000 | 10,000 daily conversations. |
| 100000 | 100,000 daily conversations. |
| 1000000 | If you get this number, it means unlimited. |
Webhook payload
Your response
- 200
- default
Received. Answer with a 2xx status (200 OK) within 10 seconds, and process the webhook afterwards. The body of your answer is ignored.
Any other answer, or no answer in time, is a failed delivery. There are no retries: a webhook that was not delivered is not sent again.