Skip to main content

Webhook setup

BIK provides webhooks for various categories, including CRM, automation, broadcast, and developer API. You can add your webhook in our developer portal.

BIK expects an authorization key to validate the request (Note: the auth type should be basic auth)

Auth

You can subscribe to the events mentioned in the screenshot for each category.

See also: BIK Subscribed Events

Category to owner mapping

This table outlines the relationship between various categories and their respective owners.

CategoryOwner
CRMAGENT
BroadcastCAMPAIGN
AutomationBOT
Dev APIDEV_API

Webhook response for incoming message.

[
{
"eventName": "incoming-message",
"eventInfo": {
"messageId": "wamid.HBgMOTE5OTM4NDM4MTM4FQIAEhggNzY1RDA4RDU4NkI3QTkxRDZGQTI0MEVDNTFFRjMxNz",
"createdAt": "2024-07-26T07:27:07.949Z",
"channelId": "whatsapp",
"status": "",
"type": null,
"message": "Hii sir",
"mediaType": null,
"header": null,
"footer": null,
"buttons": null,
"body": null,
"media": null,
"options": null,
"location": null,
"isDeleted": false,
"order": null,
"catalogId": null,
"productRetailerId": null,
"referral": null,
"messageInformation": null,
"failureReason": null,
"owner": "",
"ownerId": null,
"assetValue": "+919090909090",
"agentName": "Jean Dupont",
"agentEmailId": "jean.dupont@example.com",
"ticketId": "1234567"
},
"customerDetails": {
"firstName": "Jethalal Champaklal",
"lastName": "Gada"
},
"id": "32176522-e117-4ca2-8013-6db7479fa012"
}
]

Webhook response for status update (status: read) in category: Dev API

[
{
"eventName": "message-status-update",
"eventInfo": {
"messageId": "wamid.HBgMOTE5OTM4NDM4MTM4FQIAERgSQkVGOUM4MzhFQ0VFRjNDUxAA==",
"createdAt": "2024-07-26T07:03:41.950Z",
"channelId": "whatsapp",
"status": "read",
"message": "Test message 24",
"owner": "DEV_API",
"ownerId": null,
"assetValue": "+919090909090",
"failureReason": null,
"agentName": "Jean Dupont",
"agentEmailId": "jean.dupont@example.com",
"ticketId": "1234567"
},
"customerDetails": {
"firstName": "Jethalal Champaklal",
"lastName": "Gada"
},
"id": "d7ea85fb-93bf-4b4a-962b-54bbbc28b416"
}
]

Webhook response for status update (status: sent) in category: CRM

[
{
"eventName": "message-status-update",
"eventInfo": {
"messageId": "wamid.HBgMOTE4OTg2NDk4MDM4FQIAERgSRDQ0MEEyJDRjFGNEM3QTQ0AA==",
"createdAt": "2024-08-01T07:24:23.425Z",
"channelId": "whatsapp",
"status": "sent",
"message": "Test 55",
"owner": "AGENT",
"ownerId": "57",
"assetValue": "+917070707070",
"failureReason": null,
"agentName": "Jean Dupont",
"agentEmailId": "jean.dupont@example.com",
"ticketId": "1234567"
},
"customerDetails": {
"firstName": "Jethalal Champaklal",
"lastName": "Gada"
},
"id": "64e0dc5d-cec6-40cf-8d71-5a70c33cbd64"
}
]

Webhook response for status update (status: delivered) in category: Automation

[
{
"eventName": "message-status-update",
"eventInfo": {
"messageId": "wamid.HBgMOTE4OTg2NDk4MDM4FQIAERgSRDQ0MEEyJDRjFGNEM3QTQ0AA==",
"createdAt": "2024-08-01T07:24:23.425Z",
"channelId": "whatsapp",
"status": "delivered",
"message": "Ok, working",
"owner": "BOT",
"ownerId": "37",
"assetValue": "+918080808080",
"failureReason": null,
"agentName": "Jean Dupont",
"agentEmailId": "jean.dupont@example.com",
"ticketId": "1234567"
},
"customerDetails": {
"firstName": "Jethalal Champaklal",
"lastName": "Gada"
},
"id": "64e0dc5d-cec6-40cf-8d71-5aea887e3cbd64"
}
]

Webhook response for status update (status: failed) in category: CRM

For failed events, you will receive a failure reason.

[
{
"eventName": "message-status-update",
"eventInfo": {
"messageId": "wamid.HBgMOTE4OTg2NDk4MDM4FQIAERgSRDQ0MEEDRjFGNEM3QTQ0AA==",
"createdAt": "2024-08-01T07:24:23.425Z",
"channelId": "whatsapp",
"status": "failed",
"message": "Ok, failed",
"owner": "AGENT",
"ownerId": "",
"assetValue": "+914040404040",
"failureReason": "Message failed to send because more than 24 hours have passed since the customer last replied to this number.",
"agentName": "Jean Dupont",
"agentEmailId": "jean.dupont@example.com",
"ticketId": "1234567"
},
"customerDetails": {
"firstName": "Jethalal Champaklal",
"lastName": "Gada"
},
"id": "64e0dc5d-cec6-40cf-8d71-5aea007e3cbd39"
}
]

Output Schema for request

FieldTypeMeaning
idstringUnique event id
eventNamestringName of the event
eventInfoEventInfo Object[]List of event info
customerDetailsCustomer ObjectCustomer details