orvachat

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

FieldMeaning
ChatThe chat: a person (…@s.whatsapp.net or …@lid) or a group (…@g.us). Reply to this.
SenderWho wrote the message. In a private chat, the same person as Chat.
IsFromMetrue if you sent it (for example from the phone).
IsGrouptrue if it came from a group.
AddressingModepn when ids are phone numbers, lid when they are hidden ids.
SenderAltThe sender's other address, when WhatsApp gives one (phone if Sender is a lid, or the other way round).
IDThe message id. Use it to reply, react, or skip repeats.
Typetext for text, media for photos, videos, audio and files.
MediaTypeFor media: image, video, audio, ptt (voice note), document, sticker…
PushNameThe name the person set in WhatsApp.
TimestampWhen the message was sent.

event.Message

Only the part for this kind of message is there. The most common ones:

FieldMeaning
conversationPlain text.
extendedTextMessage.textText of a reply or a message with a link.
extendedTextMessage.contextInfo.stanzaIDFor a reply: the id of the message it answers.
imageMessage / videoMessageA photo or video. caption has its text.
audioMessageAudio. PTT is true for a voice note.
documentMessageA file. fileName has its name.
stickerMessageA sticker.
locationMessageA location pin (degreesLatitude, degreesLongitude).
contactMessageA 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"
}