Skip to main content
The Zexa REST API gives you programmatic access to every feature available in the Zexa dashboard — send messages across SMS, WhatsApp, Telegram, email, and Slack; manage contacts and contact lists; launch broadcast campaigns; and track delivery status in real time. Every request follows a consistent JSON-based format, making it straightforward to integrate Zexa into any backend stack or automation workflow.

Base URL

All API requests target the following base URL:
Every endpoint path is appended to this base. For example, to check your account’s credit balance:

Request Format

Send all request bodies as JSON and include the Content-Type: application/json header on every POST and PATCH request. The API always responds with JSON, regardless of whether the request succeeds or fails.

Authentication

Every request must include your API key as a Bearer token in the Authorization header:
Generate API keys in your dashboard under Settings → API Keys. See the Authentication page for full details, key rotation guidance, and security best practices.

Rate Limits

The API enforces per-account rate limits to ensure fair usage across all customers. When you exceed your limit, the API returns a 429 Too Many Requests response. Implement exponential backoff in your retry logic — wait a short interval after the first failure, then double the wait time on each subsequent retry before trying again.
The Retry-After response header on a 429 response indicates the number of seconds to wait before retrying.

Error Responses

All errors return a consistent JSON body so you can handle them uniformly in your code:

HTTP Status Codes

The API uses standard HTTP status codes to indicate the outcome of each request.

Pagination

All list endpoints support cursor-based pagination via the page and per_page query parameters. The default page size is 50; the maximum is 100.
Every paginated response wraps results in a data array alongside a meta object:
Use meta.total together with per_page to calculate the number of pages and determine when you have retrieved all records.

Endpoint Reference

The table below lists every public endpoint in the Zexa REST API and where it is documented.

Next Steps

Authentication

Generate your API key and learn how to pass it securely in every request.

Send a Message

Send your first message across any supported channel with a single API call.

Campaigns

Broadcast messages to entire contact lists using the Campaigns API.

Contacts

Build and manage your recipient database programmatically.

Webhooks

Receive real-time delivery status events pushed directly to your server.

Sender IDs

Register and manage the Sender IDs used to identify your messages.