Messages
The messages endpoint lets you send any type of content to WhatsApp numbers.
Endpoint
POST /v1/messages
Available types
| Type | Subtype | Description |
|---|---|---|
text | — | Plain text with optional link preview |
image | — | JPEG or PNG image |
video | — | MP4 or 3GP video |
audio | — | Audio file or voice note (OGG/OPUS) |
document | — | PDF, Word, Excel, and others |
sticker | — | Animated or static sticker (.webp) |
location | — | Map location pin |
contacts | — | One or more contact cards |
reaction | — | Emoji reaction to a received message |
interactive | cta_url | Button that opens a URL |
interactive | button | Up to 3 quick-reply buttons |
interactive | list | Scrollable list of options |
interactive | location_request_message | Request user's location |
For Meta-approved templates, use the POST /v1/messages/template endpoint.
Base structure
Every message includes waba_id, to, type, and a field named after the type:
{
"waba_id": "your_waba_id",
"to": "+5511999999999",
"type": "text",
"text": { "body": "Hello!" }
}
The phone_id field is optional — when omitted, the WABA's default phone number is used.
Response
{
"messaging_product": "whatsapp",
"contacts": [{ "input": "+5511999999999", "wa_id": "5511999999999" }],
"messages": [{ "id": "wamid.HBgL..." }]
}
messages[0].id is the wamid — use it to correlate status webhooks.
Customer service window
Non-template types can only be sent within the 24-hour window after the user's last message. Outside this window, use templates.