Webhooks
Webhook: Message Received
The Message event: what arrives on your webhook when someone sends your number a message.
Sent when someone sends your number a message, or when you send one from the phone. Header X-Webhook-Event: Message.
Example
Text message
{
"type": "Message",
"event": {
"Info": {
"Chat": "[email protected]",
"Sender": "[email protected]",
"IsFromMe": false,
"IsGroup": false,
"AddressingMode": "pn",
"SenderAlt": "70072425046185@lid",
"ID": "3EB0ABCDEF1234567890",
"Type": "text",
"PushName": "Ali",
"Timestamp": "2026-11-28T10:15:00+05:00"
},
"Message": {
"conversation": "Hi, is this in stock?"
},
"IsEphemeral": false,
"IsViewOnce": false
}
}event.Info
| Field | Meaning |
|---|---|
Chat | The chat: a person (…@s.whatsapp.net or …@lid) or a group (…@g.us). Reply to this. |
Sender | Who wrote the message. In a private chat, the same person as Chat. |
IsFromMe | true if you sent it (for example from the phone). |
IsGroup | true if it came from a group. |
AddressingMode | pn when ids are phone numbers, lid when they are hidden ids. |
SenderAlt | The sender's other address, when WhatsApp gives one (phone if Sender is a lid, or the other way round). |
ID | The message id. Use it to reply, react, or skip repeats. |
Type | text for text, media for photos, videos, audio and files. |
MediaType | For media: image, video, audio, ptt (voice note), document, sticker… |
PushName | The name the person set in WhatsApp. |
Timestamp | When the message was sent. |
event.Message
Only the part for this kind of message is there. The most common ones:
| Field | Meaning |
|---|---|
conversation | Plain text. |
extendedTextMessage.text | Text of a reply or a message with a link. |
extendedTextMessage.contextInfo.stanzaID | For a reply: the id of the message it answers. |
imageMessage / videoMessage | A photo or video. caption has its text. |
audioMessage | Audio. PTT is true for a voice note. |
documentMessage | A file. fileName has its name. |
stickerMessage | A sticker. |
locationMessage | A location pin (degreesLatitude, degreesLongitude). |
contactMessage | A contact card (vcard). |
Media messages
A media message carries the details to download the file. Often the file itself is also in base64, with mimeType and fileName. How to download it is on How To Receive Messages and Media.
Photo in a group
{
"type": "Message",
"event": {
"Info": {
"Chat": "[email protected]",
"Sender": "70072425046185@lid",
"IsFromMe": false,
"IsGroup": true,
"AddressingMode": "lid",
"SenderAlt": "[email protected]",
"ID": "3EB0FEDCBA0987654321",
"Type": "media",
"MediaType": "image",
"PushName": "Ali",
"Timestamp": "2026-11-28T10:16:00+05:00"
},
"Message": {
"imageMessage": {
"URL": "https://mmg.whatsapp.net/o1/v/t62.7118-24/…",
"mimetype": "image/jpeg",
"caption": "This one please",
"fileSHA256": "kXq…=",
"fileLength": 48213,
"mediaKey": "Zx9…=",
"fileEncSHA256": "p0M…=",
"directPath": "/o1/v/t62.7118-24/…"
}
}
},
"base64": "data:image/jpeg;base64,/9j/4AAQ…",
"mimeType": "image/jpeg",
"fileName": "3EB0FEDCBA0987654321.jpg"
}