Introduction
Ersaal REST API — send SMS, verify OTP, and manage your project
Overview
The Ersaal API is a RESTful service that lets you send SMS messages, verify one-time passwords, and manage your project programmatically.
Base URL
https://sms.lamah.comAll requests must be made over HTTPS. Every request requires an Authorization header with a Bearer token.
What you can do
| Category | Endpoints |
|---|---|
| SMS | Send single, bulk, template, and group messages |
| OTP | Initiate and verify one-time passwords |
| Project | Get details, balance, contacts, and usage stats |
Request format
All requests must include:
Content-Type: application/json
Accept: application/json
Authorization: Bearer YOUR_API_TOKENResponse format
All responses are JSON. Successful responses return a 2xx status with a data object. Errors return a consistent structure:
{
"message": "Human-readable error",
"code": "MACHINE_READABLE_CODE",
"details": {}
}Rate limits
| Endpoint group | Limit |
|---|---|
| SMS | 100 requests / minute |
| OTP | 10 requests / minute per phone number |
| Other | 1000 requests / minute |
Rate limit info is returned in response headers (X-RateLimit-Limit, X-RateLimit-Remaining).
Get your API token from the dashboard under Projects → Project Details.