Send & receive WhatsApp
Send WhatsApp messages from a number you connect by scanning a QR code — no templates, no business verification. Once connected, drive it from the API for OTPs, order updates and receipts, and receive replies on your own webhook.
Connect a number
WhatsApp is enabled per project. In the dashboard open Project → WhatsApp and click Request WhatsApp. Once our team provisions your channel you'll get an email; return to that page, scan the QR code with WhatsApp (Settings → Linked devices → Link a device), and the number is live for sending and receiving. One number per project.
Request parameters
The request body is JSON. Provide to plus exactly one content field. text doubles as the caption for image, video and document. Media is sent by public URL — there is no upload step.
| Field | Required | Type | Description |
|---|---|---|---|
| to | Yes | String | Recipient in E.164 (2547XXXXXXXX) or a full JID (2547...@s.whatsapp.net). |
| text | One of | String | Message text, or the caption for a media message. |
| imageUrl | One of | URL | Public URL of an image (with optional text caption). |
| videoUrl | One of | URL | Public URL of a video (with optional text caption). |
| audioUrl | One of | URL | Public URL of an audio file. Add "voice": true for a voice note. |
| documentUrl | One of | URL | Public URL of a document. Optional documentFilename and text. |
| stickerUrl | One of | URL | Public URL of a .webp sticker. |
| location | One of | Object | { latitude, longitude, name?, address? } |
| contact | One of | Object | { fullName, phone, organization? } |
Sample request
Required headers
POST /api/v1/whatsapp/send
Content-Type: application/json
Authorization: Bearer Your_Project_API_KEY
Text (e.g. an OTP)
curl -X POST https://sozuri.net/api/v1/whatsapp/send \
-H "Authorization: Bearer $SOZURI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "to": "254700000000", "text": "Your OTP is 123456" }'
Image with a caption
curl -X POST https://sozuri.net/api/v1/whatsapp/send \
-H "Authorization: Bearer $SOZURI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "to": "254700000000", "imageUrl": "https://example.com/receipt.png", "text": "Your receipt" }'
Response
200 OK — the same shape for every message type:
{
"status": "sent",
"messageId": "BAE5F...",
"to": "254700000000",
"timestamp": "2026-07-19T10:30:00.000Z"
}
Receiving messages
Set an inbound webhook URL when you request WhatsApp (or ask support to add one). Each 1:1 message your number receives is POSTed to that URL:
{
"event": "message.received",
"from": "254700000000",
"chatId": "254700000000@s.whatsapp.net",
"message": { "id": "ABC", "type": "text", "text": "hi", "fromMe": false },
"timestamp": "2026-07-19T10:30:00.000Z"
}
Media (image/video/audio/document/sticker) arrives with a media object carrying a
download url and the caption in message.text. Each request is signed —
verify the x-chatzuri-signature: sha256=<hmac> header (HMAC-SHA256 of the raw body
with your channel secret) and respond 2xx quickly.
Error responses
| HTTP | code | When |
|---|---|---|
| 400 | INVALID_REQUEST | Missing to, nothing to send, or more than one content field. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 409 | CHANNEL_NOT_CONFIGURED | WhatsApp isn't connected for this project — scan the QR in the dashboard. |
| 429 | RATE_LIMITED | Rate limit or monthly quota reached. |
| 502 | PROCESSING_ERROR | The WhatsApp gateway was unreachable or errored. |