Send a message
Send a message to a recipient via SMS or WhatsApp.
Channel selection:
- If
channelis omitted andmessageTypeistext, defaults to SMS - If
messageTypeis anything other thantext, WhatsApp is used automatically
WhatsApp 24-hour window:
- Free-form messages (non-template) require an open 24h window
- Window opens when the user messages you first
- Use template messages to initiate conversations outside the window
Plan allowances and email billing:
- WhatsApp, Telegram, Instagram and Messenger share an allowance of 2,000 messages per month on Free. Over it, sends return 429 with code
a2p_limit_exceededand upgrade details; the counter resets on the 1st of each month. Paid plans have no message caps - Email is billed from your prepaid balance in 1,000-message blocks: 0.80 per 1,000 marketing (broadcast) emails. A block is charged when your monthly count crosses each 1,000 boundary, and at zero balance email sends return 402 with code
insufficient_balance. Free teams start with $2 of credit and additionally cap at 3,000 emails/month and 100/day. Teams on earlier plans keep their original email quotas instead - SMS and voice are billed per message from your balance on every plan
Email recipient pre-flight:
Email messages are validated automatically before dispatch. Sends that would be a guaranteed hard bounce are failed instead of sent, protecting your bounce rate: the message transitions to failed (visible via GET /v1/messages/{messageId} and the message.failed webhook) with errorCode set to EMAIL_INVALID_RECIPIENT (malformed address), EMAIL_DOMAIN_NOT_FOUND (recipient domain has no MX or A records), or EMAIL_RECIPIENT_SUPPRESSED (address is on your suppression list after a previous bounce or complaint). Advisory signals (role addresses, disposable domains) do not block sends — check them beforehand with POST /v1/introspect/email.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional sender profile ID. If omitted, the project's default sender will be used.
"sender_12345"
Body
Request body to send a message.
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 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.
"+56912345678"
Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is auto-selected based on sender capabilities and recipient type. For email recipients, defaults to 'email'.
auto, sms, sms_oneway, whatsapp, telegram, email, instagram, messenger, voice Type of message. Defaults to 'text'.
text, image, video, audio, document, sticker, location, contact, buttons, list, cta_url, request_contact_info, location_request, reaction, template Text body for text messages or caption for media messages.
"Your verification code is 123456."
Additional content for non-text message types.
Email subject line. Required when channel is 'email' or recipient is an email address.
998"Your order confirmation"
HTML body for email messages. If provided, email will be sent as multipart with both text and HTML.
Reply-To email address for email messages.
"support@example.com"
Optional idempotency key to avoid duplicate sends.
"msg_01HZY4ZP7VQY2J3BRW7Z6G0QGE"
Arbitrary metadata to associate with the message.
Whether to enable automatic fallback to SMS if WhatsApp fails. Defaults to true.
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.
"es-ES"
Email attachments. Only supported when channel is 'email'. Maximum 40MB total size.
50Response
Message accepted for delivery.
