Skip to main content

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:

SettingValue
URLYour URL — set it with Set Webhook
MethodJSON 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_limit and whatsapp_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​

ParameterDescription / Example
status"OK" always.
event"whatsapp" always.
whatsappThe WhatsApp number that is relevant, in international format.
whatsapp_referenceThe 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_infoA number related to the WhatsApp update — when will you get this webhook. See the values below.
daily_limitThe 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_apiKeyThe 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​

ValueExplanation
1The client has finished the onboarding process through the link, but the account is not yet ready to start messaging at all.
2The client has finished the onboarding process through the link, and the account is ready to start receiving and replying to messages only.
3The WhatsApp account is ready to start sending templates and receiving messages. Onboarding completed.
4The WhatsApp account has been deleted.
5There 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​

ValueExplanation
0The daily messages limit was not determined yet. Please send your first outgoing message or template and you will get a webhook with an update.
5050 daily conversations.
250250 daily conversations (this is usually the default when the business is not verified).
10001,000 daily conversations.
20002,000 daily conversations (this is usually the default when the business is verified).
1000010,000 daily conversations.
100000100,000 daily conversations.
1000000If you get this number, it means unlimited.

Webhook payload

​

Your response​

Received. Answer with a 2xx status (200 OK) within 10 seconds, and process the webhook afterwards. The body of your answer is ignored.