Incoming messages and delivery statuses
LUMA forwards WhatsApp events to your webhook in WhatsApp's standard webhook format, signed with
your secret (X-Hub-Signature-256). Subscribe your webhook to Incoming message and Delivery status
(and, if you want them, Template status and Account status).
Plan: LUMA Elevate or Enterprise. Credits: incoming messages are free.
Payload structure
Every WhatsApp event has the same outer shape:
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "WABA_ID",
"changes": [
{
"field": "messages",
"value": {
"messaging_product": "whatsapp",
"metadata": { "display_phone_number": "971500000000", "phone_number_id": "PHONE_NUMBER_ID" },
"contacts": [ { "profile": { "name": "Customer 1" }, "wa_id": "971500000001", "user_id": "USER_ID" } ],
"messages": [ ]
}
}
]
}
]
}
value.messagesis present for incoming messages,value.statusesfor delivery statuses.metadata.phone_number_idtells you which of your numbers received the event.contacts[]comes with incoming messages and with statuses (wa_id,user_id, andprofile.namewhen the customer wrote to you).- Process every item of
entry,changes,messagesandstatuses: one request can carry several.
Incoming messages
Text
"messages": [
{ "from": "971500000001", "id": "MESSAGE_ID", "timestamp": "1764064800", "type": "text",
"text": { "body": "Hi, is my order ready?" } }
]
Image, video, audio (voice notes), document, sticker
"messages": [
{ "from": "971500000001", "id": "MESSAGE_ID", "timestamp": "1764064800", "type": "image",
"image": { "id": "MEDIA_ID", "mime_type": "image/jpeg", "sha256": "FILE_HASH", "caption": "This one", "url": "MEDIA_URL" } }
]
Voice notes arrive as type: "audio" with "voice": true. Download the file with
Media download.
Button and list replies
A tap on a reply button you sent with interactive buttons:
"messages": [
{ "from": "971500000001", "id": "MESSAGE_ID", "timestamp": "1764064800", "type": "interactive",
"context": { "from": "971500000000", "id": "YOUR_MESSAGE_ID" },
"interactive": { "type": "button_reply", "button_reply": { "id": "slot_morning", "title": "Morning" } } }
]
A list choice has "type": "list_reply" and list_reply: { id, title, description }.
A tap on a template quick-reply button arrives as "type": "button" with button: { payload, text }.
Reaction
"messages": [
{ "from": "971500000001", "id": "MESSAGE_ID", "timestamp": "1764064800", "type": "reaction",
"reaction": { "message_id": "YOUR_MESSAGE_ID", "emoji": "❤️" } }
]
Location and contacts
type: "location" with location: { latitude, longitude, name, address }; type: "contacts" with a contacts
array in the same shape you use to send contact cards.
Replies
When the customer replies to a specific message, context.id is the ID of that message.
Delivery statuses
"statuses": [
{
"id": "WAMID_OF_YOUR_MESSAGE",
"status": "delivered",
"timestamp": "1764064860",
"recipient_id": "971500000001",
"pricing": { "billable": true, "pricing_model": "PMP", "category": "utility" }
}
]
status | Meaning |
|---|---|
sent | WhatsApp accepted the message |
delivered | It reached the customer's phone |
read | The customer opened it (only if they have read receipts on) |
failed | It was not delivered; errors[] has Meta's code and reason |
Statuses can arrive out of order (for example read before delivered). Keep the most advanced one.
A failed status:
"statuses": [
{ "id": "WAMID_OF_YOUR_MESSAGE", "status": "failed", "timestamp": "1764064860", "recipient_id": "971500000001",
"errors": [ { "code": 131026, "title": "Message undeliverable" } ] }
]
Mark as read and typing indicator
Show the customer that you read their message, and optionally that you are typing (the typing indicator shows for up to 25 seconds or until you reply).
POST /v1/{phoneNumberId}/messages
curl --request POST 'https://api.itechintl.com/v1/PHONE_NUMBER_ID/messages' \
--header 'Authorization: Bearer lm_live_YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"status": "read",
"message_id": "MESSAGE_ID",
"typing_indicator": { "type": "text" }
}'
| Field | Required | Description |
|---|---|---|
messaging_product | yes | whatsapp |
status | yes | read |
message_id | yes | The incoming message to mark as read |
typing_indicator.type | no | text to also show "typing" |
This path includes your PHONE_NUMBER_ID. It is not the send endpoint: messages are sent with
POST /v1/messages.
Credits: free.