Exhibit A
Watch one WAMID tie a message's life together
- Your server
- Cloud APIgraph.facebook.com
- CustomerWhatsApp app
- Webhook endpoint
Step 9 of 9Request
Webhook endpoint(internal step)
Dedupe on WAMID + status, then update
Retries can repeat events; the WAMID makes them safe to ignore.
- Request — solid arrow — a call that expects an answer
- Response — dashed arrow — the answer coming back
- Event — dotted arrow — something happened and is pushed out
- Async — double head — fire-and-forget, nobody waits
Step 9 of 9: Webhook endpoint (internal) — Dedupe on WAMID + status, then update. Retries can repeat events; the WAMID makes them safe to ignore.
What is the WhatsApp message ID (WAMID)?
The WhatsApp Message ID, or WAMID, is the identifier WhatsApp gives every message on the Business Platform. It is a string that starts with wamid. followed by a long encoded value, such as wamid.HBgMOTE5ODEyMzQ1Njc4FQIAERgS…. When you send through the messages endpoint, POST /{PHONE_NUMBER_ID}/messages, the response returns it as messages[0].id; when a customer messages you, the inbound webhook carries it as messages[].id. Every message — template, free-form reply, media, interactive or inbound — has its own.
Its job is correlation. Each event on the statuses webhook for an outbound message — sent, delivered, read or failed — names it in statuses[].id, so every message status can be matched to the exact send even when thousands are in flight and events arrive out of order. When a customer replies to a specific message or taps a button on a template, the inbound message's context.id holds the WAMID of the message they answered. Reactions point at their target with reaction.message_id, and you pass a WAMID yourself to mark a message as read (status: read with message_id) or to send a contextual reply (context.message_id).
A WAMID identifies a message, not a person: the customer is the WhatsApp ID (wa_id) and your sending number is the phone number ID. It is also WhatsApp's identifier rather than yours. To carry your own reference through the lifecycle, send biz_opaque_callback_data (up to 512 characters) with the message; it comes back on that message's status webhooks beside the WAMID. Meta documents no internal structure, so store and compare the WAMID as an exact, opaque string.
Key takeaways
- A WAMID is the unique, opaque wamid.* string WhatsApp assigns to each message, outbound or inbound.
- The send response returns it as messages[0].id, and every sent, delivered, read or failed status webhook repeats it as statuses[].id.
- Replies, reactions, mark-as-read and contextual replies all point at a message by its WAMID.
- Store it before the first status can arrive, and deduplicate webhooks on WAMID plus status.
- Never parse it: Meta documents no internal format, so store and compare the exact string.
How does InfiQ help with the WhatsApp message ID (WAMID)?
InfiQ returns the wamid in its send response and includes it in every message.sent, message.delivered, message.read and message.failed webhook, so you can match each status to the message you sent.
Webhooks & API on InfiQHow does the WhatsApp message ID (WAMID) work?
Send and capture
Read
messages[0].idfrom the 200 response and write it to your message record straight away, together with your own ID for the message.Track the lifecycle
Status webhooks arrive with
statuses[].id. Update that record's status and never move it backwards: read beats delivered, and delivered beats sent.Deduplicate
Use the WAMID plus the status as the idempotency key, because retries and out-of-order delivery can repeat the same event.
Thread replies
On inbound messages, read
context.idto find which of your messages the customer replied to, or which template's button they tapped.Act on a message
Pass an inbound message's WAMID to mark as read (optionally with a typing indicator), to react to it or to quote it in a reply.
The WhatsApp message ID (WAMID) in code
{"messaging_product": "whatsapp","contacts": [{ "input": "+919812345678", "wa_id": "919812345678" }],"messages": [{ "id": "wamid.HBgMOTE5ODEyMzQ1Njc4FQIAERgSQjE3RTQ5NUY0NjhBMzdBQzQA" }]}
The 200 response to POST /v26.0/{PHONE_NUMBER_ID}/messages. messages[0].id is the WAMID.
Common mistakes with the WhatsApp message ID (WAMID)
Parsing the WAMID
Decoding it to pull out a phone number or timestamp breaks the day the encoding changes. Treat it as an opaque string.
Saving it too late
If the WAMID is written after other slow work, a fast
sentwebhook can arrive first and find nothing. Persist it in the step that handles the response, or let the webhook worker retry unknown WAMIDs briefly.Deduplicating on the WAMID alone
One WAMID has several legitimate statuses. Keying idempotency on the WAMID only drops the delivered event after the sent one; use WAMID plus status.
Truncating or case-folding it
Short columns and case-insensitive comparisons corrupt IDs. Use a text column without a tight length cap and match exactly, case-sensitively.
Confusing it with the wa_id
The wa_id is the customer; the WAMID is one message. Joining tables on the wrong one produces reports that look plausible and are wrong.
Why does the WhatsApp message ID (WAMID) matter?
Without the WAMID, delivery reporting is guesswork. Billing counts delivered messages, and the delivered status, matched by WAMID, is the evidence behind each charge. Support agents use it to find the exact message a customer is talking about. Engineers rely on it for webhook deduplication, because Meta retries failed deliveries for up to seven days. It also stops a message's status moving backwards from read to delivered, and links each reply to the campaign or notification that prompted it.
Example: Tracing a failed OTP in Gurugram
A Gurugram fintech's login service sends an authentication template and stores the returned WAMID with the login session, also putting the session ID in biz_opaque_callback_data. Seconds later a failed status arrives for that WAMID with error 131026. The service finds the session from the callback data, tells the app to offer SMS instead, and logs the failure against the exact message. The next day a support agent handling the customer's complaint searches by phone number, sees the WAMID, its failed status and the error code, and resolves the ticket in one reply.
WAMID FAQs
What does WAMID stand for?+
Where do I find the WAMID after sending a message?+
How do I reply to a specific WhatsApp message through the API?+
Is the WAMID the same as the wa_id?+
Can the same WAMID arrive in more than one webhook?+
Best practices for the WhatsApp message ID (WAMID)
- Index the WAMID column: every status webhook looks it up.
- Show the WAMID in your support tool so agents can quote it to your provider.
- Put your own message ID in
biz_opaque_callback_dataso status events can be routed without a lookup.