Replies (Quoting)
How to send a reply that quotes a specific previous WhatsApp message using the context field with a message_id.
A quoted reply attaches a context block to any outgoing message that references a previous
message by its message_id (wamid). WhatsApp shows the original message in a grey quoted box
above the new reply — exactly like manually swiping to reply in WhatsApp.
Sending a quoted reply#
Add a context field with the message_id of the message you want to quote:
{
"messaging_product": "whatsapp",
"to": "919959623255",
"type": "text",
"context": {
"message_id": "wamid.HBgMOTE5OTU5NjIzMjU1FQIAERgSMURCRTFEOUZCMkU4MTZDMzIyAA=="
},
"text": {
"body": "Yes, I can help you with that!"
}
}What the recipient sees:
┌──────────────────────────────┐
│ 💬 "Hi, I need help with..." │ ← quoted original message
└──────────────────────────────┘
Yes, I can help you with that!The context field works with any message type — text, image, document, interactive, etc.
The message type and context are independent.
Frequently asked#
How do I reply to a specific message on WhatsApp API?
Add a context object to your message with message_id set to the wamid of the message you
want to quote. WhatsApp shows the original message in a grey box above your reply.
What is the context field in the WhatsApp API?
It links your outgoing message to a previous message by its wamid. WhatsApp renders the linked message as a quote above your reply.
Where do I get the message_id to quote?
From the API response when a message was sent (messages[0].id), or from the webhook
payload when a message was received (messages[0].id).
Can I quote any message type with context?
Yes. The context field works on any outgoing message type — text, image, document,
interactive, etc.
Gotchas & common mistakes#
Was this page helpful?
Still stuck? Open a support ticket and our team will help.