Send message

Sends a WhatsApp message to a recipient. The type field determines the structure of the body and which additional object must be included (for example, text, image, template).

Authentication

x-api-keystring
Account authentication key.

Request

This endpoint expects an object.
tostringRequired

Recipient. Two alternative formats: a number in E.164 format (^\+[1-9]\d{1,14}\$, e.g. +5215512345678) or a BSUID (^[A-Z]{2}\.[A-Za-z0-9]{1,128}\$, e.g. MX.1264908862298277) — the anonymous contact id Meta assigns on “Click to WhatsApp” flows, carried by inbound webhooks in message.from_user_id. If neither format matches, the API rejects with 400. Note: a BSUID has no real phone number behind it, so if the send fails and an SMS fallback was requested, the chain is marked exhausted directly without attempting the SMS.

typeenumRequired
reply_tostringOptional

Optional. message_id (wamid) of a previous message this one replies to; the recipient sees it quoted.

textobjectOptional
imageobjectOptional

Provide link or id, but not both.

videoobjectOptional

Provide link or id, but not both.

audioobjectOptional

Provide link or id, but not both.

documentobjectOptional

Provide link or id, but not both.

stickerobjectOptional

Provide link or id, but not both.

locationobjectOptional
contactslist of objectsOptional
reactionobjectOptional
Reaction to a previously sent or received message.
interactiveobjectOptional
templateobjectOptional

Dynamic values for sending a template. carousel and buttons cannot coexist at the root.

fallbackobjectOptional

Optional SMS fallback for this send: if the WhatsApp message fails definitively (synchronously or through a status webhook), the API automatically retries the same recipient over SMS with this content. It fires only once per message (atomic lock: if the synchronous failure and a late webhook arrive almost simultaneously, only the first one triggers it) and it is a single hop — no further cascade. Requires the multichannel fallback to be enabled for the account (errorCode 380/381 otherwise). If fallback is not sent, behavior is exactly the current one.

Response

Message accepted by the provider.
message_idstringOptional

Message identifier in Meta (wamid.xxx). Comes empty ("") when the send failed synchronously and the SMS fallback was activated.

statusstringOptional

Indicates that Meta accepted the send request (accepted), or queued when the send failed synchronously and the request included fallback.sms (the backup SMS was queued).

fallback_idstringOptionalformat: "uuid"

Only present when the send failed synchronously and the request included fallback.sms: identifier to correlate the backup SMS in the webhooks (its status events arrive as SMS webhooks carrying this id as message_id, plus origin_identifier pointing back to the WhatsApp send). When the fallback fires later through a status webhook instead, correlate through origin_identifier.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error