The Kanal webhook notifies you in real time when one of your contacts sends a WhatsApp message to your number. Ideal for plugging in a bot, feeding a CRM, or triggering server-side processing.
Click your team name, then Settings.
Open Developers > Webhooks.
Add your server's public URL. We recommend an HTTPS URL.
Kanal sends a POST request to this URL for every incoming message, with the JSON body described below.
Every webhook follows the same envelope:
{
"id": "evt_01HRXYZ...",
"type": "message.received",
"api_version": "2026-05-13",
"created_at": "2026-05-13T10:00:00+00:00",
"phone_number_id": 123,
"data": {
"contact": { ... },
"message": { ... }
}
}Field | Description |
|---|---|
| Unique identifier of the event. |
| Event type. For now: |
| Version of the webhook contract. Lets you handle changes without breakage. |
| Date the event was emitted, in ISO 8601 format. |
| ID of the Kanal WhatsApp number that received the message. |
| Object containing the contact and the received message. |
The data object always contains two sub-objects: contact and message.
{
"id": 6789,
"phone_number": "33612345678",
"name": "John Smith",
"country_code": "FR"
}{
"id": 98765,
"wamid": "wamid.HBgL...",
"type": "text",
"content": "Hello, I have a question",
"media": null
}The content field contains the usable text of the message (text body, media caption, label of a clicked button). The media field is filled only for media (image, video, audio, document). For button clicks and list selections, a dedicated object (button or list_option) also provides the technical identifier of the chosen option.
{
"id": "evt_01HRXYZ...",
"type": "message.received",
"api_version": "2026-05-13",
"created_at": "2026-05-13T10:00:00+00:00",
"phone_number_id": 123,
"data": {
"contact": {
"id": 6789,
"phone_number": "33612345678",
"name": "John Smith",
"country_code": "FR"
},
"message": {
"id": 98765,
"wamid": "wamid.HBgL...",
"type": "text",
"content": "Hello, I have a question",
"media": null
}
}
}{
"id": 98766,
"wamid": "wamid.HBgL...",
"type": "image",
"content": "Here is the photo of my product",
"media": {
"type": "image",
"url": "https://api.getkanal.com/api/media/messages/98766?signature=...",
"caption": "Here is the photo of my product"
}
}The URL in the media.url field is a permanent signed link served by Kanal: you can store it and download the media again at any time.
{
"id": 98767,
"wamid": "wamid.HBgL...",
"type": "video",
"content": null,
"media": {
"type": "video",
"url": "https://api.getkanal.com/api/media/messages/98767?signature=...",
"caption": null
}
}{
"id": 98768,
"wamid": "wamid.HBgL...",
"type": "audio",
"content": null,
"media": {
"type": "audio",
"url": "https://api.getkanal.com/api/media/messages/98768?signature=...",
"caption": null
}
}Received documents (PDF, etc.) have sent an event since August 9, 2026, with the same format as the other media types. The media.filename field contains the name of the file sent by the contact.
{
"id": 98769,
"wamid": "wamid.HBgL...",
"type": "document",
"content": null,
"media": {
"type": "document",
"url": "https://api.getkanal.com/api/media/messages/98769?signature=...",
"caption": null,
"filename": "invoice-10456.pdf"
}
}{
"id": 98770,
"wamid": "wamid.HBgL...",
"type": "button_reply",
"content": "Yes, I confirm",
"media": null,
"button": {
"id": "4233be9add_button_1",
"title": "Yes, I confirm"
}
}content contains the label of the clicked button. The button object also provides its technical identifier (button.id), useful for routing the response on your server without depending on the displayed text. This format covers both the buttons of an interactive message and a template's quick reply buttons.
{
"id": 98771,
"wamid": "wamid.HBgL...",
"type": "list_reply",
"content": "Order tracking",
"media": null,
"list_option": {
"id": "cd593e96a1_row_2",
"title": "Order tracking"
}
}Same principle: content contains the title of the chosen row, and list_option.id its technical identifier.
Message types that Kanal does not handle arrive with "type": "other" and an empty content.
The only event emitted is message.received (incoming message from a contact). Clicks on a template's quick reply buttons also arrive as message.received, with the button_reply message type. No delivery status or read receipt event is sent.
type field. New types may be added: your integration will not be affected if you ignore the ones you do not handle.The id field (format evt_...) is unique for each event. Kanal never sends an event twice, but storing this identifier protects you from duplicates that your own infrastructure might create (proxy, queue).
The wamid field (the message's WhatsApp identifier) is also unique and stable: useful if you want to cross-reference several data sources.
The api_version field indicates the version of the webhook contract. The current version is 2026-05-13.
Non-breaking additions (new fields, new event types) are deployed without changing the version.
A new version will only be published in case of a breaking change, with a transition period.
To stay compatible, your integration must ignore fields it does not recognize.
Return 200 OK within 5 seconds and queue heavy processing on your server.
Monitor your endpoint's availability: an event that is not received is not sent again.
Filter events by type to process only what you care about.
To reply to the received message, use POST /api/v1/messages/send with the contact's number in the to field. See Messaging API: send messages and trigger automations.
For compatibility with older clients (notably mobile notifications), the title, body and text fields are also present at the root of the payload. They contain generic English texts: "New message on Kanal" and "<name> just sent you a new message". Ignore them for a modern integration: all the useful information is in data.