← Blog

·

WhatsApp Webhook Payload Examples for Every Incoming Message Type

Updated on October 29, 2026

Every WhatsApp webhook payload shares the same shape: object → entry[] → changes[] → value, with field: "messages". Inside value, a messages array means an incoming message and a statuses array means a status update for a message you sent; messages[].type tells you which object to read (text, image, interactive, reaction and so on). Below you’ll find the JSON for each type, checked against Meta’s official reference, and a drop-in router in Node.js and Python.

This is a lookup reference. To build the endpoint itself (verification, signature, returning 200), read our guide to WhatsApp API webhooks; for the big picture of the Cloud API, start with the official WhatsApp API guide.

The common envelope

Here is a complete incoming text message, following Meta’s text messages reference (sample values):

Prefer to see it in practice? Watch the step by step in the video below.

Video in Portuguese (with subtitles)

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "102290129340398",
      "changes": [
        {
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "15550783881",
              "phone_number_id": "106540352242922"
            },
            "contacts": [
              {
                "profile": { "name": "Sheena Nelson" },
                "wa_id": "16505551234",
                "user_id": "US.13491208655302741918"
              }
            ],
            "messages": [
              {
                "from": "16505551234",
                "from_user_id": "US.13491208655302741918",
                "id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgASGBQzQTRBNjU5OUFFRTAzODEwMTQ0RgA=",
                "timestamp": "1761750000",
                "type": "text",
                "text": { "body": "Does it come in another color?" }
              }
            ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}

What each part means:

FieldWhat it is
entry[].idAccount ID. Meta’s current reference calls it the Messaging account ID, the part of the WABA that now holds templates, billing and webhooks
metadata.phone_number_idThe business number that received the message. Use it to pick the right tenant or instance
contacts[].profile.nameThe user’s WhatsApp profile name
contacts[].wa_id and messages[].fromThe user’s phone number. May be missing if the user adopted a username (see below)
contacts[].user_id and messages[].from_user_idThe BSUID, a per-business user identifier
messages[].idThe message wamid. Use it as your idempotency key
messages[].timestampUnix timestamp in seconds, as a string
messages[].typeWhich object to read: text, image, button, interactive, etc.

Phone number, BSUID and username

Since April 2026, Meta includes the BSUID (business-scoped user ID) in every messages webhook: user_id in contacts and from_user_id on the message, whether or not the user has a username. If the user turns on a username, contacts[].profile.username shows up and the phone number (wa_id and from) may be omitted. According to the BSUID documentation, the phone number is still included if that business number messaged or called the user’s phone number (or received a message or call from it) in the last 30 days, or if the user is in your contact book. BSUIDs carry a country prefix, like US.13491208655302741918.

In practice: don’t make from a required key for your contact record. Store wa_id when it’s present and always store user_id. The full story is in WhatsApp usernames and BSUID.

Payload examples by incoming message type

From here on I show only the value.messages[0] object, because the envelope never changes. Values are samples; field names follow Meta’s reference page for each type.

text

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "text",
  "text": { "body": "Does it come in another color?" }
}

Forwarded messages include context.forwarded: true (forwarded 5 times or fewer) or context.frequently_forwarded: true (more than 5).

image and video

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "image",
  "image": {
    "caption": "Receipt",
    "mime_type": "image/jpeg",
    "sha256": "SfInY0gGKTsJlUWbwxC1k+FAD0FZHvzwfpvO0zX0GUI=",
    "id": "1003383421387256",
    "url": "https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=..."
  }
}

Video has the same shape, with type: "video" and a video object (caption, mime_type, sha256, id, url). The file itself is not in the webhook: you use the id to download it. Step by step in how to download media users send you.

audio (with the voice flag)

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "audio",
  "audio": {
    "mime_type": "audio/ogg; codecs=opus",
    "sha256": "wvqXMe6n7n1W0zphvLPoLj+s/NtKqmr3zZ7YzTP7xFI=",
    "id": "1908647269898587",
    "url": "https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=...",
    "voice": true
  }
}

voice: true means a voice note recorded in WhatsApp; false means an uploaded audio file. That’s the flag to check before sending audio to speech-to-text. Meta notes that the url field on media has been rolling out gradually since November 12, 2025, so treat it as optional.

document

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "document",
  "document": {
    "caption": "My invoice",
    "filename": "invoice.pdf",
    "mime_type": "application/pdf",
    "sha256": "V5OPpLD/gEG6Xjg0MbmQDLFgcKsL+j5LfY4ny/pZ4MY=",
    "id": "622684793477189",
    "url": "https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=..."
  }
}

sticker

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "sticker",
  "sticker": {
    "mime_type": "image/webp",
    "sha256": "wvqXMe6n7n1W0zphvLPoLj+s/NtKqmr3zZ7YzTP7xFI=",
    "id": "1908647269898587",
    "url": "https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=...",
    "animated": true
  }
}

location

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "location",
  "location": {
    "address": "101 Forest Ave, Palo Alto, CA 94301",
    "latitude": 37.44221496582,
    "longitude": -122.16165924072,
    "name": "Philz Coffee",
    "url": "https://philzcoffee.com/"
  }
}

contacts

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "contacts",
  "contacts": [
    {
      "name": { "first_name": "Barbara", "last_name": "Johnson", "formatted_name": "Barbara J. Johnson" },
      "org": { "company": "Social Tsunami" },
      "phones": [{ "phone": "+1 (415) 555-0829", "wa_id": "14155550829", "type": "MOBILE" }]
    }
  ]
}

Watch the naming: the contacts array inside messages[] holds the shared contact cards. It’s not the envelope’s value.contacts, which identifies the sender.

button (template quick reply)

When a user taps a quick-reply button on a template, the type is button, not interactive:

{
  "context": { "from": "15550783881", "id": "wamid.HBgL...TEMPLATE" },
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "button",
  "button": { "payload": "CANCEL_ORDER_8812", "text": "Cancel" }
}

button.payload carries the value you set when sending the template; button.text is the label. context.id is the wamid of the template that was tapped. The send-side payloads are in how to send a template via the API.

interactive: button_reply and list_reply

Replies to interactive messages (reply buttons and lists sent outside templates) arrive with type: "interactive" and a subtype in interactive.type:

{
  "context": { "from": "15550783881", "id": "wamid.HBgL...ORIGINAL" },
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "interactive",
  "interactive": {
    "type": "button_reply",
    "button_reply": { "id": "confirm", "title": "Confirm" }
  }
}
{
  "context": { "from": "15550783881", "id": "wamid.HBgL...ORIGINAL" },
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "interactive",
  "interactive": {
    "type": "list_reply",
    "list_reply": { "id": "priority_express", "title": "Priority Mail Express", "description": "Next Day to 2 Days" }
  }
}

Route on the button or row id, never on title, which can change wording or language.

interactive: nfm_reply (WhatsApp Flow response)

When a user completes a Flow, the answer arrives on the same messages webhook with interactive.type set to nfm_reply:

{
  "context": { "from": "15550783881", "id": "wamid.HBgL...FLOW" },
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "interactive",
  "interactive": {
    "type": "nfm_reply",
    "nfm_reply": {
      "name": "flow",
      "body": "Sent",
      "response_json": "{\"flow_token\": \"order-8812\", \"zip\": \"94301\", \"slot\": \"morning\"}"
    }
  }
}

Two details that break integrations: response_json is a string (call JSON.parse), and Meta’s Flow response guide says the response does not include the Flow ID. To know which Flow it came from, use the flow_token you sent or a custom field in the Flow payload. More in WhatsApp Flows: forms inside the chat.

interactive: product

When a user sends a single-product message from your catalog, you get interactive.type: "product" with retailer_id, title, description, currency_code, price_amount, sale_price_amount and url.

reaction

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "reaction",
  "reaction": { "message_id": "wamid.HBgL...YOUR_MESSAGE", "emoji": "👍" }
}

If the user removes the reaction, you get the same object without emoji. reaction.message_id points to the message that was reacted to.

order (catalog cart)

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "order",
  "order": {
    "catalog_id": "194836987003835",
    "text": "Love these!",
    "product_items": [
      { "product_retailer_id": "di9ozbzfi4", "quantity": 2, "item_price": 30, "currency": "USD" },
      { "product_retailer_id": "nqryix03ez", "quantity": 1, "item_price": 25, "currency": "USD" }
    ]
  }
}

The webhook doesn’t compute totals or shipping: sum quantity * item_price on your side and check prices against your own catalog.

referral (Click to WhatsApp ad)

Messages that start from a Click to WhatsApp ad carry a referral object next to the regular content:

{
  "referral": {
    "source_url": "https://fb.me/3cr4Wqqkv",
    "source_id": "120226305854810726",
    "source_type": "ad",
    "body": "Summer Succulents are here!",
    "headline": "Chat with us",
    "media_type": "image",
    "image_url": "https://scontent.xx.fbcdn.net/...",
    "ctwa_clid": "Aff-n8ZTODiE79d22KtAwQ...",
    "welcome_message": { "text": "Hi there! Let us know how we can help!" }
  },
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "text",
  "text": { "body": "Can I get more info about this?" }
}

source_id is the ad ID and ctwa_clid is the click ID you store for attribution. image_url only appears on image ads; video ads include video_url and thumbnail_url instead. Ads shown in WhatsApp Status do not include ctwa_clid.

unsupported

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "unsupported",
  "errors": [
    {
      "code": 131051,
      "title": "Message type unknown",
      "message": "Message type unknown",
      "error_data": { "details": "Message type is currently not supported." }
    }
  ],
  "unsupported": { "type": "poll_creation" }
}

You get this when the user sends something the Cloud API doesn’t deliver, such as a poll. unsupported.type says what it was (poll_creation, gif, pin and others listed in the reference). Good practice: reply asking the user to send it as text.

system

{
  "from": "16505551234",
  "id": "wamid.HBgL...",
  "timestamp": "1761750000",
  "type": "system",
  "system": {
    "body": "User Sheena Nelson changed from 16505551234 to 12195555358",
    "wa_id": "12195555358",
    "type": "user_changed_number",
    "user_id": "US.13491208655302741918",
    "previous_user_id": "US.10230984751029384756"
  }
}

Tells you the user changed phone numbers (user_changed_number) or their BSUID changed (user_changed_user_id). Update the contact with the new wa_id and user_id.

edit and revoke (Coexistence only)

For numbers running in Coexistence (WhatsApp Business app plus API), Meta documents two extra types: edit, when the user edits a message within 15 minutes (with edit.original_message_id and the new version in edit.message), and revoke, when the user deletes a message (with revoke.original_message_id). Outside Coexistence, these types don’t arrive.

Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →

Status updates for messages you sent (statuses)

When the webhook describes something you sent, value carries statuses instead of messages:

{
  "id": "wamid.HBgL...YOUR_MESSAGE",
  "status": "delivered",
  "timestamp": "1761750010",
  "recipient_id": "16505551234",
  "pricing": {
    "billable": true,
    "pricing_model": "PMP",
    "type": "regular",
    "category": "utility"
  }
}

status can be sent, delivered, read, played (first playback of a voice message) or failed. A few details from the status reference:

  • From v24.0 on, the conversation object is omitted, except for free entry point windows.
  • The pricing object appears in only one of the webhooks for a given message (sent or delivered/read), not both.
  • billable will be deprecated; Meta recommends using pricing.type together with pricing.category.
  • On failed, you get errors[] with code, title, message and error_data.details.

A failure looks like this:

{
  "id": "wamid.HBgL...",
  "status": "failed",
  "timestamp": "1761750020",
  "recipient_id": "16505551234",
  "errors": [
    {
      "code": 131049,
      "title": "This message was not delivered to maintain healthy ecosystem engagement.",
      "message": "This message was not delivered to maintain healthy ecosystem engagement.",
      "error_data": { "details": "In order to maintain a healthy ecosystem engagement, the message failed to be delivered." }
    }
  ]
}

Building a status state machine from these events is covered in message status via webhook.

Account-level errors

There’s a third shape: system, app or account problems arrive in value.errors[], with no messages or statuses. Meta’s example is code 130429 (Rate limit hit). Log it and alert; don’t treat it as a message.

How to route by type in code

The logic never changes: loop over every entry, change, message and status (one POST can carry several), then branch on type.

Node.js

// handlers: replace console.log with your own logic
function routeMessage(msg, contact, phoneNumberId) {
  const user = { phone: msg.from ?? contact?.wa_id, bsuid: msg.from_user_id ?? contact?.user_id };

  switch (msg.type) {
    case "text":
      return console.log("text", user, msg.text.body, msg.referral?.ctwa_clid);
    case "image":
    case "video":
    case "audio":
    case "document":
    case "sticker":
      return console.log("media", msg.type, msg[msg.type].id, msg.audio?.voice);
    case "location":
      return console.log("location", msg.location.latitude, msg.location.longitude);
    case "contacts":
      return console.log("cards", msg.contacts.length);
    case "button":
      return console.log("template quick reply", msg.button.payload);
    case "interactive": {
      const it = msg.interactive;
      if (it.type === "button_reply") return console.log("button", it.button_reply.id);
      if (it.type === "list_reply") return console.log("list", it.list_reply.id);
      if (it.type === "nfm_reply") return console.log("flow", JSON.parse(it.nfm_reply.response_json));
      return console.log("interactive", it.type);
    }
    case "reaction":
      return console.log("reaction", msg.reaction.message_id, msg.reaction.emoji ?? "(removed)");
    case "order":
      return console.log("order", msg.order.product_items);
    case "system":
      return console.log("system", msg.system.type);
    case "unsupported":
      return console.log("unsupported", msg.unsupported?.type, msg.errors?.[0]?.code);
    default:
      return console.log("new type, store for review", msg.type);
  }
}

export function handleWebhook(body) {
  if (body.object !== "whatsapp_business_account") return;
  for (const entry of body.entry ?? []) {
    for (const change of entry.changes ?? []) {
      if (change.field !== "messages") continue;
      const v = change.value;
      const phoneNumberId = v.metadata?.phone_number_id;
      for (const msg of v.messages ?? []) {
        const contact = (v.contacts ?? []).find(
          (c) => c.wa_id === msg.from || c.user_id === msg.from_user_id
        );
        routeMessage(msg, contact, phoneNumberId);
      }
      for (const st of v.statuses ?? []) {
        console.log("status", st.id, st.status, st.errors?.[0]?.code);
      }
      for (const err of v.errors ?? []) {
        console.error("account error", err.code, err.title);
      }
    }
  }
}

Python

import json

def route_message(msg: dict) -> None:
    t = msg.get("type")
    if t == "text":
        print("text", msg["text"]["body"])
    elif t in ("image", "video", "audio", "document", "sticker"):
        print("media", t, msg[t]["id"])
    elif t == "button":
        print("template quick reply", msg["button"]["payload"])
    elif t == "interactive":
        it = msg["interactive"]
        if it["type"] == "nfm_reply":
            print("flow", json.loads(it["nfm_reply"]["response_json"]))
        else:
            print("interactive", it["type"], it.get(it["type"], {}).get("id"))
    elif t == "reaction":
        print("reaction", msg["reaction"].get("emoji", "(removed)"))
    else:
        print("other type", t)

def handle_webhook(body: dict) -> None:
    for entry in body.get("entry", []):
        for change in entry.get("changes", []):
            if change.get("field") != "messages":
                continue
            value = change["value"]
            for msg in value.get("messages", []):
                route_message(msg)
            for st in value.get("statuses", []):
                print("status", st["id"], st["status"])

Rules for both:

  • Return 200 before processing. Push the raw body to a queue and handle it in a worker. When Meta doesn’t get a 200, it retries with decreasing frequency for up to 7 days, which creates duplicates.
  • Deduplicate on wamid. For statuses, use id + status.
  • Always have a default branch. Meta keeps adding types (edit, revoke, BSUID system events). Store the unknown instead of crashing.
  • Payloads can be up to 3 MB, per the webhooks overview. Size your body parser accordingly.
  • Validate the X-Hub-Signature-256 signature on the raw body: see how to validate the webhook signature.

If nothing reaches your endpoint, work through the webhook troubleshooting checklist. To run this router in a serverless function, see serverless WhatsApp webhooks.

How to do this with Vectalk

With Vectalk, webhooks are Meta’s webhooks: the payload hitting your URL is the same object → entry → changes → value structure shown here, so the router above works unchanged. You register the URL with POST https://apis.vectalk.com.br/api/webhooks, passing instance_id, url and name, and you can register several URLs per instance (all of them get the same event). The Vectalk webhooks documentation asks for an HTTP 200 in under 20 seconds; otherwise the event is resent. Create your account at apps.vectalk.com.br/register.

FAQ

What’s the difference between the button type and the interactive type?

button is a tap on a quick-reply button of a template and carries button.payload and button.text. interactive is a reply to an interactive message sent inside the service window (reply buttons, list, Flow, product) and carries its subtype in interactive.type.

Why is the from field missing from my webhook?

The user adopted a username and that business number hasn’t exchanged messages or calls with their phone number in the last 30 days (and they aren’t in your contact book). In that case, use from_user_id (the BSUID) to identify and reply to them.

How do I know which Flow an nfm_reply came from?

The response doesn’t include the Flow ID. Use the flow_token you set when sending (it comes back inside response_json) or add your own field to the Flow payload.

Does the webhook include the image or audio file?

No. It includes the media id, mime_type and sha256. You download the file using the id and your access token.

Can one POST contain more than one message?

Yes. entry, changes, messages and statuses are all arrays. Iterate over all of them instead of reading only the first item.


Official sources checked on October 29, 2026: Messages webhook (Meta), Text, Image, Audio, Document, Sticker, Location, Contacts, Button, Interactive, Reaction, Order, Unsupported, System, Edit, Revoke, Status, Errors, Webhooks overview, Business-scoped user IDs, Receiving Flow response, Vectalk webhooks documentation.

Try the official WhatsApp API today

Create your account, generate a token and send your first message with the quick-start guide. Same payloads and webhooks as Meta's Cloud API.