Skip to main content

API Overview

Introduction to the Mersal API — base URL, endpoint families, and where to go next.

2 min read

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.

The journey of every send request — from your server to delivery and status updates

Base URL

https://mersal.it/api

Two 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 the Api-key header (or a fallback query/body parameter). See Authentication.
  • AI Gateway/api/ai/v1/chat/completions and /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:

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:

GEThttps://mersal.it/api/get/sms/{id?}
GEThttps://mersal.it/api/get/whatsapp/{id?}
GEThttps://mersal.it/api/get/email/{id?}

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.

Next steps

Was this page helpful?
API Overview · Mersal Docs