API reference
Six endpoints, two webhook events, one auth header and one error shape.
Basics
| Base URL | https://api.smsray.com/api/sms/v1 |
| Authentication | x-api-key: ls_live_… on every request. See Authentication. |
| Format | JSON over HTTPS. Timestamps are ISO 8601 UTC. |
| Numbers | E.164 recommended; national format accepted for your workspace's country. See Numbers & countries. |
| Errors | { "error", "code", "details"? } with a conventional HTTP status. See Errors. |
| Safe retries | Idempotency-Key on any POST, kept 24 h. See Idempotency. |
Endpoints
| Method | Path | What it does |
|---|---|---|
POST | /sms/send | Send an SMS, as free text or from an approved template. |
POST | /sms/otp/send | Generate and send a 6-digit code. |
POST | /sms/otp/verify | Check the code your user typed. |
GET | /sms/messages/:id | Look up a message and its status. |
GET | /sms/balance | Workspace balance, rates and your counters. |
GET | /sms/coverage | Where this key can send, and where SMSRay delivers. |
Webhook events
| Event | When |
|---|---|
message.status | A message reaches sent, delivered, undelivered or failed. |
message.inbound | A recipient replies to one of your messages. |
Machine-readable specs
- OpenAPI 3.1 — /openapi.json: every public v1 endpoint, generated from these docs. Import it into your API client, code generator or gateway.
- Postman collection — /postman.json: ready-made requests. Set the
apiKeyvariable and send. - API reference PDF: the whole reference as one document.
Your keys and live examples