Webhooks
Configure and receive v1 channel webhooks
Webhooks
This page documents channel lifecycle webhooks for API v1 (QR codes, connection state, sync, and similar events).
Your webhook_url endpoint must respond with HTTP status 200. Delivery can be retried up to 10 times with a 60 second delay if the status is not 200. After 10 retries the webhook is dropped.
For message and conversation events, use API v2 — see Events, Message events, and Conversation events.
Whatsapp: new QR-code
{
"type":"qr_code",
"event":"new",
"company_id":1,
"channel_id":1,
"data":"BASE64 QR-CODE image string"
}When
- You are connecting a
whatsappchannel in your company - The user logged out in the WhatsApp app
Whatsapp: channel connected sucessfuly
{
"type":"system",
"severity":"information",
"data":{
"message":"authorized",
"date":"2017-11-11 12:45:53 UTC",
"date_timestamp":1603118584,
"timestamp":1603119138,
"details":{
"entity":"channel",
"entity_id":1
}
}
}When
QR-code was scanned successfuly
date_timestamp is date timestamp; timestamp is callback timestamp.Whatsapp: phone offline
{
"type":"system",
"severity":"critical",
"data":{
"message":"phone offline",
"date":"2017-11-11 12:45:53 UTC",
"date_timestamp":1603118584,
"timestamp":1603119138,
"details":{
"entity":"channel",
"entity_id":1
}
}
}When
Device with WhatsApp application is unreachable. We can't work with whatsapp while phone is offline.
date_timestamp is date timestamp; timestamp is callback timestamp.Whatsapp: phone online
{
"type":"system",
"severity":"critical",
"data":{
"message":"phone online",
"date":"2017-11-11 12:45:53 UTC",
"date_timestamp":1603118584,
"timestamp":1603119138,
"details":{
"entity":"channel",
"entity_id":1
}
}
}When
Device with WhatsApp application is reachable again.
date_timestamp is date timestamp; timestamp is callback timestamp.Whatsapp: channel not available
{
"type":"system",
"severity":"critical",
"data":{
"message":"unavailable",
"date":"2017-11-11 12:45:53 UTC",
"date_timestamp":1603118584,
"timestamp":1603119138,
"details":{
"entity":"channel",
"entity_id":1
}
}
}When
Someone started a session at web.whatsapp.com or a similar integration. We can't work with WhatsApp while WhatsApp Web is open.
date_timestamp is date timestamp; timestamp is callback timestamp.Whatsapp: channel disabled
{
"type":"system",
"severity":"critical",
"data":{
"message":"disabled",
"date":"2017-11-11 12:45:53 UTC",
"date_timestamp":1603118584,
"timestamp":1603119138,
"details":{
"entity":"channel",
"entity_id":1
}
}
}When
By some reason whatsapp session is not alive anymore (for example, user exited on the device or whatsapp expired session)
date_timestamp is date timestamp; timestamp is callback timestamp.Whatsapp: trying to resume channel work
{
"type":"system",
"severity":"critical",
"data":{
"message":"trying_resume_work",
"date":"2017-11-11 12:45:53 UTC",
"date_timestamp":1603118584,
"timestamp":1603119138,
"details":{
"entity":"channel",
"entity_id":1
}
}
}When
We're trying to resume work after previous conflict state
date_timestamp is date timestamp; timestamp is callback timestamp.Whatsapp: synchronization completed
{
"type":"system",
"severity":"critical",
"data":{
"message":"synchronized",
"date":"2017-11-11 12:45:53 UTC",
"date_timestamp":1603118584,
"timestamp":1603119138,
"details":{
"entity":"channel",
"entity_id":1
}
}
}When
- Whatsapp channel was connected and syncronisation was completed
- Syncronisation after work resume
date_timestamp is date timestamp; timestamp is callback timestamp.Instagram: changed state to disabled
{
"type":"system",
"severity":"information",
"data":{
"message":"IG was set DISABLED",
"date":"2017-11-11 12:45:53 UTC",
"date_timestamp":1603118584,
"details":{
"entity":"channel",
"entity_id":1
}
}
}When
- Service message successfully delivered
- Service message delivery failed