Send a message to a recipient via SMS or WhatsApp.
Channel selection:
channel is omitted and messageType is text, defaults to SMSmessageType is anything other than text, WhatsApp is used automaticallyWhatsApp 24-hour window:
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Optional sender profile ID. If omitted, the project's default sender will be used.
"sender_12345"
Request body to send a message.
Recipient phone number in E.164 format or email address.
"+56912345678"
Delivery channel. Use 'auto' for intelligent routing. If omitted with non-text messageType, WhatsApp is used. For email recipients, defaults to 'email'.
auto, sms, whatsapp, email Type of message. Defaults to 'text'.
text, image, video, audio, document, sticker, location, contact, buttons, list, 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.
Message accepted for delivery.