Skip to main content
POST
Send a message

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body to send a message. No Zavu-Sender header: where it leaves from comes from conversationId, then from, then the project default. to is required, except with conversationId, where it defaults to whoever the conversation is with.

to
string

Recipient phone number in E.164 format, email address, WhatsApp business-scoped user ID (BSUID, e.g. US.13491208655302741918), or numeric chat ID (for Telegram/Instagram/Messenger). A phone number written with spaces, dashes, dots or parentheses after its + (+56 9 1234 5678) is read as the E.164 number; bare digits are not (see 400 on this operation). A BSUID is routed to WhatsApp and sent via the recipient field; use it to message a contact who adopted a username and whose phone number is hidden.

Required unless conversationId is given. With conversationId it may be omitted (it is the conversation's contact: its email for channel: "email", else the identifier it is filed under); if given it must be one of that conversation's identifiers (its key, email or BSUID, in any formatting), else 400 naming to and conversationId.

Example:

"+56912345678"

channel
enum<string>

auto, or a transport. auto applies the fixed order described on POST /v2/messages.

Available options:
auto,
sms,
sms_oneway,
whatsapp,
telegram,
email,
instagram,
messenger,
voice
messageType
enum<string>
default:text

Type of message. Defaults to 'text'.

Available options:
text,
image,
video,
audio,
document,
sticker,
location,
contact,
buttons,
list,
cta_url,
request_contact_info,
location_request,
reaction,
template
text
string

Text body for text messages or caption for media messages.

Example:

"Your verification code is 123456."

content
object

Additional content for non-text message types.

subject
string

Email subject line. Required when channel is 'email' or recipient is an email address.

Maximum string length: 998
Example:

"Your order confirmation"

htmlBody
string

HTML body for email messages. If provided, email will be sent as multipart with both text and HTML.

replyTo
string<email>

Reply-To email address for email messages.

Example:

"support@example.com"

idempotencyKey
string

Optional idempotency key to avoid duplicate sends.

Example:

"msg_01HZY4ZP7VQY2J3BRW7Z6G0QGE"

metadata
object

Arbitrary metadata to associate with the message.

fallbackEnabled
boolean
default:true

Whether to enable automatic fallback to SMS if WhatsApp fails. Defaults to true.

voiceLanguage
string

Language code for voice text-to-speech (e.g., 'en-US', 'es-ES', 'pt-BR'). If omitted, language is auto-detected from recipient's country code.

Example:

"es-ES"

attachments
object[]

Email attachments. Only supported when channel is 'email'. Maximum 40MB total size.

Maximum array length: 50
from
string

Which of your addresses sends (see GET /v2/channels): an E.164 number in any common formatting, an email address, @botname, @username, a Page id. Resolved inside your project only. Omitted: the project default, the same one /v1 uses when no Zavu-Sender header is sent. Ignored when conversationId is set, and with a test-mode key, which always sends from the WhatsApp sandbox.

An address that no entry has returns 404 not_found. An address two of your senders share (a number whose WhatsApp was connected on one sender and SMS on another) resolves when channel names the transport; otherwise it returns 409 ambiguous_from with details.candidates[{address, type, v1SenderId}], and in that case, and only then, from also accepts one of those v1SenderId values.

Example:

"+13125551212"

conversationId
string

Reply inside an existing conversation: the message leaves from the sender that last handled it (from on the Conversation), and goes to whoever the conversation is with, so to may be omitted. A to that is not the conversation's contact is refused with 400 (details.errors on to and conversationId, details.conversationTo) instead of silently opening another conversation. Takes precedence over from. When channel is omitted, routing.reason is then conversation. A conversation of another project returns 404; one with no sender recorded returns 409 no_channel. The 202's message.conversationId is set whenever the conversation the message is filed in already exists; it is absent only for a recipient's first message, whose conversation is created after the response. A reply to a conversation that an inbound email opened reaches the right person but is filed in a separate conversation keyed by the email address.

Response

Accepted. message.status is queued.

message
object
required
routing
object
required

What the engine decided at send time. Reports only decisions the engine makes; it does not rank channels by price or by WhatsApp window state.