Skip to main content

Event: Online

Webhook 

For every Online omnichannel event, you will get a webhook (event "online"). Fields that don't belong to the event (for example inboxID when an account is created) are empty strings.

Settings:

SettingValue
URLYour URL — set it with Set Webhook
MethodJSON via POST
online_extra_infoSent by
1 — new accountCreate a new online account, or the partners dashboard
2 — active, 3 — suspendedUpdate account with account_status 1 or 0
4 — account deletedDelete an account, or the partners dashboard
5 — new WhatsApp inboxCreate a new WhatsApp Inbox, or the partners dashboard
6 — WhatsApp inbox deletedDelete a WhatsApp Inbox, or the partners dashboard
7 — agent login linkLogin to an agent

With every Online omnichannel event, you will get some of the following:

{
"status": "OK",
"event": "online",
"accountID": 523,
"inboxID": "",
"agentID": 14,
"server": "online",
"online_reference": "5234-my-code",
"online_extra_info": 1
}

Response explained​

ParameterDescription / Example
status"OK" always.
event"online" always.
accountIDThe account ID.
inboxIDThe inbox ID — with online_extra_info 5 and 6. An empty string with the other events.
agentIDThe agent ID — with online_extra_info 1 (the account's admin agent) and 7 (the agent of the login link). An empty string with the other events.
serverThe server subdomain of the account.
online_referenceThe reference value that was provided by you when creating the Online account (online_extra_info 1) or the WhatsApp inbox (5). An empty string with the other events.
online_extra_infoA number related to the Online update event — when will you get this webhook. See the values below.

online_extra_info​

ValueExplanation
1A new account was created.
2The account status changed to "active".
3The account status changed to "suspended".
4The account was deleted.
5A new WhatsApp inbox was created.
6A WhatsApp inbox was deleted.
7A new agent login link was created.

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.