Skip to content

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).

POST {your_webhook_url}
{
"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"
}
]
}
]
}
POST {your_webhook_url}
{
"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"
}
]
}
]
}
POST {your_webhook_url}
{
"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"
}
]
}
]
}
FieldTypeDescription
profile.namestringSender WhatsApp name
wa_idstringSender WhatsApp number (E.164 format without +)
FieldTypeDescription
fromstringSender phone number
idstringInbound message ID (msg_{uuid})
timestampstringUnix timestamp of message receipt
typestringMessage type: text, image, document, audio, video, sticker, location, contacts, interactive, reaction, button, etc
text.bodystringText message body (only if type = "text")
context.idstringID 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.fromstringThe phone number of the original message sender

Each message type has specific fields inside messages[]:

TypeFieldDescription
imageimage.id, image.caption, image.mime_typeImage with optional caption
documentdocument.id, document.filename, document.mime_typeDocument/file
audioaudio.id, audio.mime_typeVoice or audio message
videovideo.id, video.caption, video.mime_typeVideo
stickersticker.id, sticker.mime_typeSticker
locationlocation.latitude, location.longitude, location.name, location.addressLocation
contactscontacts[].name, contacts[].phones[]Contact card
interactiveinteractive.type, interactive.button_reply / interactive.list_replyButton or list response
reactionreaction.message_id, reaction.emojiEmoji reaction to a message

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.id in 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, event message.inbound will 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_properties when sending a message, that property will appear in the custom_properties field of the inbound payload when the customer replies to that message.