message.inbound
Sent when a customer sends a message to your WhatsApp business number. This includes text messages, images, documents, audio, video, stickers, location, contacts, reactions, and interactive messages (buttons, list).
Payload Example
Section titled “Payload Example”Incoming Text Message
Section titled “Incoming Text Message”{ "object": "whatsapp_business_account", "entry": [ { "id": "1234567890", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "6281234567890", "phone_number_id": "9876543210" }, "contacts": [ { "profile": { "name": "Budi Santoso" }, "wa_id": "6289876543210" } ], "messages": [ { "from": "6289876543210", "id": "msg_f1e2d3c4-b5a6-7890-abcd-ef1234567890", "timestamp": "1717200200", "type": "text", "text": { "body": "Halo, saya ingin bertanya tentang produk Anda." } } ] }, "field": "messages" } ] } ]}Reply Message
Section titled “Reply Message”{ "object": "whatsapp_business_account", "entry": [ { "id": "1234567890", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "6281234567890", "phone_number_id": "9876543210" }, "contacts": [ { "profile": { "name": "Budi Santoso" }, "wa_id": "6289876543210" } ], "messages": [ { "from": "6289876543210", "id": "msg_f1e2d3c4-b5a6-7890-abcd-ef1234567890", "timestamp": "1717200250", "type": "text", "text": { "body": "Saya tertarik dengan produk ini" }, "context": { "id": "msg_a1b2c3d4-e5f6-7890-abcd-ef1234567890", "from": "6281234567890" } } ] }, "field": "messages" } ] } ]}Interactive Message (Button)
Section titled “Interactive Message (Button)”{ "object": "whatsapp_business_account", "entry": [ { "id": "1234567890", "changes": [ { "value": { "messaging_product": "whatsapp", "metadata": { "display_phone_number": "6281234567890", "phone_number_id": "9876543210" }, "contacts": [ { "profile": { "name": "Budi Santoso" }, "wa_id": "6289876543210" } ], "messages": [ { "from": "6289876543210", "id": "msg_f1e2d3c4-b5a6-7890-abcd-ef1234567890", "timestamp": "1717200300", "type": "interactive", "interactive": { "type": "button_reply", "button_reply": { "id": "btn_confirm", "title": "Konfirmasi" } } } ] }, "field": "messages" } ] } ]}contacts[] (Contact Info)
Section titled “contacts[] (Contact Info)”| Field | Type | Description |
|---|---|---|
profile.name | string | Sender WhatsApp name |
wa_id | string | Sender WhatsApp number (E.164 format without +) |
messages[] (Message Details)
Section titled “messages[] (Message Details)”| Field | Type | Description |
|---|---|---|
from | string | Sender phone number |
id | string | Inbound message ID (msg_{uuid}) |
timestamp | string | Unix timestamp of message receipt |
type | string | Message type: text, image, document, audio, video, sticker, location, contacts, interactive, reaction, button, etc |
text.body | string | Text message body (only if type = "text") |
context.id | string | ID of the message being replied to (if this is a reply). Already converted to the msg_{uuid} format so it can be matched with messages you sent |
context.from | string | The phone number of the original message sender |
Other Message Types
Section titled “Other Message Types”Each message type has specific fields inside messages[]:
| Type | Field | Description |
|---|---|---|
image | image.id, image.caption, image.mime_type | Image with optional caption |
document | document.id, document.filename, document.mime_type | Document/file |
audio | audio.id, audio.mime_type | Voice or audio message |
video | video.id, video.caption, video.mime_type | Video |
sticker | sticker.id, sticker.mime_type | Sticker |
location | location.latitude, location.longitude, location.name, location.address | Location |
contacts | contacts[].name, contacts[].phones[] | Contact card |
interactive | interactive.type, interactive.button_reply / interactive.list_reply | Button or list response |
reaction | reaction.message_id, reaction.emoji | Emoji reaction to a message |
When Is This Event Sent?
Section titled “When Is This Event Sent?”Event message.inbound is sent when:
- A customer sends a new message to your business phone number
- A customer replies to a message you previously sent
- A customer sends a location, contact, or other media
context.idin the reply message has been swapped from Meta wamid to the platform message ID (msg_{uuid}), so you can match it directly with the ID returned by the send API.- If your account enables
inbound_disabled, eventmessage.inboundwill not be sent. - If your account enables
skip_media_ingestion, media in inbound messages will not be downloaded by the platform. - Inbound messages from phone numbers not yet in the contact database will automatically create a new contact entry.
- If you send
custom_propertieswhen sending a message, that property will appear in thecustom_propertiesfield of the inbound payload when the customer replies to that message.