Webhook
Partner Webhook API allows you to determine the webhook URL callback to receive notification and updates about your partner account.
Webhooks can arrive from the following IP address:
34.165.99.212
This API has 3 parts
Part 1: how to set partner webhook to get notification.
Part 2: how to see the webhook you set.
Part 3: how the data is sent to you.
Part 1: Set the webhook address
Settings:
URL | |
Method | JSON via POST |
Header | Authorization: Bearer {{access_token}} *The access_token can be received from settings->get access token API. |
Body:
Parameter | Description / Example | Maximum length | Remarks |
|---|---|---|---|
url | The webhook URL. must start with HTTPS / HTTP | 512 | Full URL here |
Response:
{
"status": "OK",
"url": "your-webhook.example.com",
"reason": 1
}
Response-Explain:
Parameter | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
status | OK or FAIL "OK" means the request has been sent to Meta. "Fail" means error. | ||||||||
url | The webhook url you provided | ||||||||
reason | 'reason' is the status explanation in case of FAIL
|
Part 2: Get the webhook address
Settings:
URL | |
Method | JSON via GET |
Header | Authorization: Bearer {{access_token}} *The access_token can be received from settings->get access token API. |
Body: nothing, leave it empty.
Response:
{
"status": "OK",
"url": "your-webhook.example.com",
"reason": 1
}
Response-Explain:
Parameter | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
status | OK or FAIL "OK" means the request has been sent to Meta. "Fail" means error. | ||||||||
url | The webhook URL | ||||||||
reason | 'reason' is the status explanation in case of FAIL
|
Part 3: How and when the webhook is sent to you
For every event that happens in the partners system, you will get a webhook.
URL | Your URL |
Method | JSON via POST |
Event type:
whatsapp - for everything that is related to WhatsApp.
builder - for everything to our builder system.
partners - for everything that is related to threshold you set in our partners portal (future event)
online - for everything that is related to our online. (future event)
package - for everything that is related to a package purchased. (future event)
Event: WhatsApp
With every whatsapp event, you will get some of the following response:
{
"status": "OK",
"event": "whatsapp",
"whatsapp": "972501234567",
"whatsapp_reference": "1234567",
"whatsapp_extra_info": 2,
"whatsapp_apiKey": "123-456-789"
}
Response-Explain:
Parameter | Description / Example | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
status | "OK" always | ||||||||||||
event | |||||||||||||
the whatsapp number that is relevant | |||||||||||||
whatsapp_reference | the reference value that was provided by you when creating the account | ||||||||||||
whatsapp_extra_info | Here you will see a number related to the whatsapp update
| ||||||||||||
daily_limit | This will show the daily business conversations limit this line can have right from the start. options:
the daily limit will only come for whatsapp_extra_info = 1 / 2 / 3 | ||||||||||||
whatsapp_apiKey | The apiKey that was created for you, to use the WhatsApp V2 API. This will be sent only when the whatsapp_extra_info is 1 / 2 / 3 |
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 the setWebhook API for the WhatsApp V2, in order to start getting webhooks update regarding this whatsapp account.
Event: Builder
With every Builder event, you will get some of the following response:
{
"status": "OK",
"event": "builder",
"builderID": 523,
"builder_url": "https://builderurl.com/...",
"builder_reference": "63f563",
"builder_extra_info": 1
}
Response-Explain:
Parameter | Description / Example | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
status | "OK" always | ||||||||||
event | builder | ||||||||||
builderID | The builderID of the builder | ||||||||||
builder_url | The builder URL | ||||||||||
builder_reference | The reference value that was provided by you when creating the builder | ||||||||||
builder_extra_info | Here you will see a number related to the builder update
|
Event: Online
With every online omnichannel event, you will get some of the following response:
{
"status": "OK",
"event": "online",
"accountID": 523,
"agentID": 14,
"inboxID": 3,
"server": "online",
"online_reference": "5234-my-code",
"online_extra_info": 7
}
Response-Explain:
Parameter | Description / Example | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
status | "OK" always | ||||||||||||||||
event | online | ||||||||||||||||
accountID | The account ID | ||||||||||||||||
agentID | The agent ID | ||||||||||||||||
inboxID | The inbox ID | ||||||||||||||||
server | The server subdomain | ||||||||||||||||
online_reference | The reference value that was provided by you when creating the online | ||||||||||||||||
online_extra_info | Here you will see a number related to the online update event
|
Event: partners/package - yet to be determined