WhaBuzzdocs
Guides

Sending messages

POST Meta's own message body plus from; opt-in async sends (202 now, Meta's answer as an event); bulk batches, read receipts, and what comes back.

WhaBuzz does not have its own message format. You send Meta's /messages body, with one extra field, from.

#Send one message

POST /v1/messages

json
{
  "from": "1013622581841046",
  "messaging_product": "whatsapp",
  "to": "16505551234",
  "type": "text",
  "text": { "body": "Your order has shipped." }
}

WhaBuzz does not check the 24-hour window, template category, opt-out status or content. Meta decides, and if Meta refuses you see Meta's error unchanged (see Errors).

Free-form messages need an open customer service window (the customer messaged you in the last 24 hours). To start a conversation use a template.

#Headers you get back

X-WhaBuzz-Request-Id (req_…), X-WhaBuzz-Event-Id (evt_…, the message.outbound event that records this send), X-WhaBuzz-Send-Mode (sync or async, see Async sends), X-WhaBuzz-Processing-Ms and Server-Timing: wb;dur=…, meta;dur=….

#Async sends

By default POST /v1/messages waits for Meta and returns Meta's answer. Most of that time is Meta's (often 100 to 200 ms). If you don't need the wamid in the response, ask for async mode with "async": true in the body or ?async=1 in the URL:

json
{ "from": "1013622581841046", "async": true, "to": "16505551234", "type": "text", "text": { "body": "Your order has shipped." } }
json
HTTP/1.1 202 Accepted
X-WhaBuzz-Send-Mode: async
X-WhaBuzz-Event-Id: evt_01JAB3T9X2Z5B8D1F4H7K0M3Q7

{ "status": "queued", "id": "qmsg_01JAB3T9X2Z5B8D1F4H7K0M3Q6", "from": "1013622581841046" }

X-WhaBuzz-Send-Mode is sync when the body is Meta's answer and async when the message was queued. A synchronous send can also come back 202 / async while the number is paused or a batch is running. Sync remains the default in this API version; a future API version will make async the default, and you will be able to ask for sync explicitly.

#Retry safely

Send an Idempotency-Key header. See Idempotency.

#Mark as read

POST /v1/messages/read takes from and message_id (the wamid of an inbound message), and shows the customer blue ticks. Add "typing_indicator":{"type":"text"} to also show the typing indicator.

#Bulk sends

POST /v1/messages/batch queues 1 to 10,000 messages in one call and answers 202 immediately:

json
{ "id": "bat_01JAB3K9X2S8C4M7Q1V5R6T0YZ", "status": "queued", "total": 3 }

The body is from, an optional client_ref (your reference, unique per tenant; repeating it returns the existing batch) and messages, an array of Meta /messages bodies without from. Items are sent in order at the number's pacing, which is Meta's messaging throughput: 20 per second for a standard number, 50 for a high-throughput one. A scheduler runs every minute and sends up to 900 items per run, so a batch of 10,000 takes about 12 minutes on a standard number. See Rate limits and pacing.

Meta errors on an item are recorded on that item and never retried by WhaBuzz, because resending a rejected message is your decision, not ours. When the batch finishes you receive a batch.completed event (WhaBuzz events). Each item also produces its own message.outbound event and, later, message.status events.

#What happens after a send

Meta's HTTP answer means "accepted", not "delivered". Delivery, read and failure arrive later as message.status events matched on the wamid in the send response.

This page as Markdown: /guides/messages.md. All docs in one file: /llms-full.txt. Status.