Skip to main content
The Messages API lets you send a single message to one recipient on any channel supported by Zexa — SMS, WhatsApp, Telegram, email, or Slack. Each successful request returns a unique message ID and an initial delivery status. Use the message ID to poll for status updates, or set up a webhook to receive delivery events pushed to your server in real time.

Send a Message

Request Parameters

string
required
The messaging channel to use. Must be one of: sms, whatsapp, telegram, email, slack.
string
required
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.
string
required
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.
string
The plain-text message content. Required unless template is provided.
string
The email subject line. Applies to the email channel only.
string
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.
object
A WhatsApp-approved message template. Use this instead of body for WhatsApp messages that require a pre-approved template.
string
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

string
The unique message identifier, prefixed with msg_ (e.g. msg_a1b2c3d4). Use this ID to retrieve the message status later.
string
The initial delivery status of the message. See the Delivery Statuses table below.
string
The channel the message was sent on.
string
The recipient identifier as provided in the request.
string
ISO 8601 UTC timestamp of when the message was created.
Example response (201 Created):

Error Scenarios

Delivery Statuses

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.
Example response:
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. The from field in a send request must match one of these values for SMS, WhatsApp, and Telegram messages.

Response Fields

array
An array of Sender ID objects registered to your account.
object
Pagination metadata.
Example response:
To register a new Sender ID or manage existing ones in the dashboard, visit Sender IDs. Sender ID registration may require carrier approval and can take up to 72 hours depending on the channel and country.