Messages
Send WhatsApp messages through the API: text, images, documents, reply buttons, lists, products, payment requests, reactions and approved templates.
Messages are what you send to your customers. Every kind of message uses one endpoint, Send a message. The type field says what you're sending, and a field with the same name holds the content:
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "text",
"text": { "body": "Hello!" }
}What you can send
text: plain text, with optional link previews and WhatsApp formatting (*bold*,_italic_,~strike~).image,video,audio,document,sticker: a file, sent by public link or by the ID of a file you uploaded.location: a map pin.contacts: contact cards the customer can save.interactive: messages the customer answers by tapping:- Reply buttons: up to 3 buttons.
- List: a menu of up to 10 choices.
- Link button: opens a web page.
- Location request: asks the customer to share their location.
- Address request: a delivery address form (India and Singapore).
- Product and product list: items from your catalog.
- Carousel: up to 10 swipeable cards.
- Order details and order status: payment requests and order updates (Payments, India only).
reaction: an emoji reaction to one of the customer's messages.template: a message format approved in advance by WhatsApp. It's the only type you can send outside the 24-hour window. See Templates.
Replies and read receipts
- Quote a message. Add
"context": { "message_id": "wamid.…" }to show your message as a reply to an earlier one. - Show blue ticks. Send
"status": "read"with an incomingmessage_id. The customer then sees that you've read their message.
After you send
A successful response returns the message ID. It means WhatsApp accepted the message, not that it was delivered. Progress (sent, delivered, read or failed) arrives on your webhook as a message status event.