Sending
Send a text message
POST
/v1/messagesSend a text message to a phone number or a chat. The call returns when WhatsApp has accepted the message (one ✓). Whether it reaches the phone is tracked separately, see Delivery status.
Request
POST https://api.api-supp.com/v1/messages
| Field | Type | Notes |
|---|---|---|
recipient | string | Required. Phone digits or a full JID (a group JID works too) |
message | string | Required. The text |
type | string | "text" (the default) |
bash
curl -X POST "https://api.api-supp.com/v1/messages" \
-H "Authorization: Bearer wat_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"recipient": "14155550132", "message": "Your order has shipped"}'Response
json
{
"ok": true,
"recipient": "14155550132@s.whatsapp.net",
"wa_message_id": "3EB0CB97F37F91F563B060",
"media": null
}Keep wa_message_id to check delivery.
Errors
400recipient missing502WhatsApp rejected the message503the number isn't connected right now
Hebrew, Arabic, emoji and accents: send the body from a UTF-8 file. Some shells (often on Windows) turn non-ASCII characters into
? before curl sees them, and the recipient gets question marks. Write the JSON to a file and send it with curl --data-binary @body.json -H "Content-Type: application/json; charset=utf-8". Use --data-binary, not -d.