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
{
"from": "1013622581841046",
"messaging_product": "whatsapp",
"to": "16505551234",
"type": "text",
"text": { "body": "Your order has shipped." }
}from(required) is thephone_number_idof one of your numbers, or its E.164 number. WhaBuzz removes it and callsPOST /{phone_number_id}/messageson the Graph API.messaging_productdefaults towhatsappif you leave it out.- Send
to(a phone number) orrecipient(a business-scoped user id, BSUID). With neither, the answer is 400 "toorrecipientis required". biz_opaque_callback_datais passed through to Meta; Meta echoes it on the message's statuses, and it is in the status data verbatim. Statuses aresent,delivered,read,played(voice messages, since 2025-11-03) andfailed.- Nothing else is added, removed or reordered. Every message type Meta supports works the day Meta ships it: text, template, image, video, audio, document, sticker, location, contacts, interactive, reaction, flows.
- The response is Meta's, with Meta's HTTP status.
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:
{ "from": "1013622581841046", "async": true, "to": "16505551234", "type": "text", "text": { "body": "Your order has shipped." } }HTTP/1.1 202 Accepted
X-WhaBuzz-Send-Mode: async
X-WhaBuzz-Event-Id: evt_01JAB3T9X2Z5B8D1F4H7K0M3Q7
{ "status": "queued", "id": "qmsg_01JAB3T9X2Z5B8D1F4H7K0M3Q6", "from": "1013622581841046" }- The same checks still run before the answer. A bad key, an unknown or disconnected
from(409 number_not_connected), a reused Idempotency-Key, or a body with noto(orrecipient) fails synchronously with the usual 4xx, exactly as in sync mode. Everything about the message content is still Meta's call, so content errors arrive in the event. - Meta's answer arrives as the
message.outboundevent whose id is theX-WhaBuzz-Event-Idof the 202, withdata.queued_idequal to theqmsg_id.statusisaccepted(with thewamid) orfailed(with Meta'serror_codesand its response indata.response). Then the usualmessage.statusevents follow. Subscribe tomessage.outbound, or read it throughGET /v1/events. - Order and pacing: async sends go through the number's queue, the same one bulk sends use. They leave in the order you sent them, behind any batch already running, at the number's throughput. A synchronous send does not wait behind async sends, so mixing both modes on one number can reorder messages to a customer. Pick one mode per conversation.
- Never sent twice. If WhaBuzz cannot tell whether Meta took a message (the sender stopped mid-call), the event is
failedwithsend_outcome_unknownand the message is not retried. Check before resending. - Idempotency works the same in both modes.
asyncis not part of the body match, so retrying with the same key returns the first answer (200or202) whichever mode you ask for, and nothing is sent again. See Idempotency. asyncis a WhaBuzz field; it is never forwarded to Meta. A value other thantrueorfalse(or a query value other than1,true,0,false) is a400 invalid_request.- If the queue cannot take the message, WhaBuzz sends it synchronously instead and answers with
X-WhaBuzz-Send-Mode: syncand Meta's body. Always read the header or the status code, not your request.
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:
{ "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.
GET /v1/messages/batch/{batch_id}: counts by status.GET /v1/messages/batch/{batch_id}/items?status=failed: per-item results, each with Meta's response.POST /v1/messages/batch/{batch_id}/cancel: stops items not yet sent.
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.