Send a Message
Request Parameters
The messaging channel to use. Must be one of:
sms, whatsapp, telegram, email, slack.The recipient identifier. Use an E.164-formatted phone number (e.g.
+244912345678) for sms, whatsapp, and telegram. Use an email address for email. Use a Slack channel ID or user ID for slack.Your registered Sender ID or verified email address. Sender IDs are configured in your Zexa dashboard under Settings → Senders. Use
GET /sender-ids to retrieve your registered Sender IDs programmatically.The plain-text message content. Required unless
template is provided.The email subject line. Applies to the
email channel only.An HTML body for email messages. When provided alongside
body, the body field serves as the plain-text fallback for email clients that do not render HTML.A WhatsApp-approved message template. Use this instead of
body for WhatsApp messages that require a pre-approved template.An ISO 8601 UTC datetime string specifying when to send the message (e.g.
2026-07-01T09:00:00Z). Omit this field to send the message immediately.Request Examples
Response Fields
The unique message identifier, prefixed with
msg_ (e.g. msg_a1b2c3d4). Use this ID to retrieve the message status later.The initial delivery status of the message. See the Delivery Statuses table below.
The channel the message was sent on.
The recipient identifier as provided in the request.
ISO 8601 UTC timestamp of when the message was created.
201 Created):
Error Scenarios
| Status | Error | Description |
|---|---|---|
400 | invalid_request | Missing required fields or malformed JSON body |
401 | unauthorized | API key is missing or invalid |
422 | validation_error | to is not in E.164 format, or from is not a registered Sender ID |
422 | insufficient_credits | Account does not have enough credits to send the message |
429 | rate_limit_exceeded | Too many requests — retry after the time indicated in Retry-After |
Delivery Statuses
| Status | Description |
|---|---|
queued | Message has been accepted and is waiting to be dispatched to the carrier or channel |
sent | Message has been dispatched to the downstream carrier or channel provider |
delivered | The carrier or channel confirmed successful delivery to the recipient’s device |
failed | Delivery failed after all retry attempts; check the error field for the reason |
undeliverable | The destination is permanently unreachable (e.g. invalid number, deactivated account) |
Get Message Status
Retrieve the current status of a message by its ID. For production workloads, prefer webhooks over polling to reduce latency and API usage.For production applications, use webhooks to receive delivery status updates in real time rather than polling this endpoint. Polling introduces latency and counts against your rate limit.
List Sender IDs
Retrieve all Sender IDs registered on your account. Thefrom field in a send request must match one of these values for SMS, WhatsApp, and Telegram messages.
Response Fields
An array of Sender ID objects registered to your account.
Pagination metadata.
