Send a message
All outbound messages use a single endpoint:
POST /messagesAuthorization: Bearer YOUR_API_KEYThe body is always a recipient (to) plus a message object. The message object is tagged by type, and its remaining fields depend on that type.
{ "to": "972501234567", "message": { "type": "text", "body": "Hello" }}The to value is the recipient address — typically the bare phone number, the same value you receive as from on inbound webhooks.
{ "to": "972501234567", "message": { "type": "text", "body": "Hello" }}{ "to": "972501234567", "message": { "type": "image", "mediaUrl": "https://example.com/photo.jpg", "caption": "Look at this" }}Voice note (ptt) vs audio
Section titled “Voice note (ptt) vs audio”ptt is a WhatsApp voice note; audio is a generic audio attachment. They are separate types because automations often treat them differently (for example, voice notes get transcribed).
{ "to": "972501234567", "message": { "type": "ptt", "mediaUrl": "https://example.com/voice.ogg" }}Document
Section titled “Document”{ "to": "972501234567", "message": { "type": "document", "mediaUrl": "https://example.com/invoice.pdf" }}Sending media
Section titled “Sending media”Media messages (image, ptt, audio, video, document) accept media in two ways:
mediaUrl— preferred. No size limit beyond what WhatsApp accepts.base64— convenience for automation/AI workflows. Decoded size must be ≤ 16 MB; larger payloads are rejected with413.
mimeType and filename are optional and usually inferred. See Working with media for details.
For the complete schema of every type, see the API Reference and Message types.