API Overview
Introduction to the Mersal API — base URL, endpoint families, and where to go next.
The Mersal API lets you send SMS, WhatsApp, and email messages, and access AI completions, directly from your own backend instead of the dashboard. All requests and responses use JSON.
Base URL
https://mersal.it/apiTwo endpoint families
Mersal's API is split into two families that use different authentication mechanisms:
- Channel-sending endpoints —
/api/sms/send,/api/whatsapp/send,/api/email/send, and related lookup endpoints. These authenticate with your personal API key via theApi-keyheader (or a fallback query/body parameter). See Authentication. - AI Gateway —
/api/ai/v1/chat/completionsand/api/ai/v1/models. This is an OpenAI-compatible endpoint that authenticates with a separate Bearer token created for AI Pool access. See AI Gateway: Chat Completions.
The channel Api-key header and the AI Gateway's Authorization: Bearer token are two different key types, generated in different places in the dashboard. They are not interchangeable.
Sending messages
Each channel has its own dedicated endpoint and request shape:
SMS: Send
POST /api/sms/send — text messages via an approved sender ID or an Android SIM.
WhatsApp: Send
POST /api/whatsapp/send — text and media (images, files, audio, video).
Email: Send
POST /api/email/send — HTML email with DKIM and open tracking.
All three accept a contact array, so you can send to multiple recipients in a single request.
Checking send status
To look up the status of messages you've already sent, Mersal exposes read endpoints per channel:
Pass a specific message ID to fetch that single record, or omit {id} to list your most recent sends for that channel. These use the same Api-key authentication as the send endpoints.
