Send a text message
POST /v1/messages/text — a plain text WhatsApp message.
Notes
textmust not be blank, and is capped at 4,096 characters. Longer messages are rejected with400 invalid_requestrather than silently truncated.- WhatsApp’s own formatting works inside
text:*bold*,_italic_,~strikethrough~, and```monospace```. - Line breaks are just
\nin the JSON string. - Trailing blank space and newlines are removed before sending, so a message built by string concatenation does not arrive with empty lines at the bottom. Whitespace at the start is kept exactly as you sent it — a price list or order summary aligned with spaces keeps its shape.
- Emoji are fine. Send them as normal UTF-8 characters.
Examples
Authorizations
Your API key, sent in an apikey request header. Never in the URL, never as a Bearer token.
Body
Which of your connected numbers to send FROM. Copy it from your numbers screen in the portal, or from GET /v1/instances. It must belong to your account.
"3f9c1a2b-7d4e-4c81-9f0a-2b6d5e8c1a34"
The recipient, with country code and no leading zero — for example 919876543210. Spaces, dashes, brackets and a leading + are accepted and stripped; 6 to 15 digits must remain.
"919876543210"
The message body. Must not be blank. Up to 4,096 characters. Trailing blank space and newlines are removed before sending; anything at the START of the message is kept exactly as you sent it, so a price list aligned with spaces keeps its shape.
1 - 4096"Your order #2043 has shipped."
Send this message as a reply, quoting an earlier one. Use the data.message_id returned by a previous send.
128"3EB0C1D2F4A5B6C7D8E9"
Set true when the quoted message is one you sent from this number. Only valid together with quoted_message_id.

