API reference · v1
Build with the SMSRay API
A small, predictable REST API for OTP and transactional SMS. JSON in, JSON out, one header to authenticate, signed webhooks for every status change. Samples in cURL, Node.js, Python, PHP and Go.
Base URL
https://api.smsray.com/api/sms/v1Authentication
x-api-key: ls_live_…48 hexEndpoints
- POST
/sms/send - POST
/sms/otp/send - POST
/sms/otp/verify - GET
/sms/messages/:id - GET
/sms/balance - GET
/sms/coverage
Format
JSON over HTTPS. Timestamps are ISO 8601 UTC.
Numbers
E.164 recommended; national format accepted for your workspace's country.
Safe retries
Idempotency-Key on any POST, kept 24 h.
Rate
20 requests per second per client by default.
Take the reference with you
The whole API reference as a PDF, plus machine-readable specs generated from these docs.
First request
One call sends an SMS
POST a number and your text. You get a messageId back in the reply, and the message status follows by webhook or lookup.
- → Cost reserved from your balance at accept, refunded if delivery finally fails.
- → Segments and encoding returned so you always know what you paid for.
- → REST only — any language with an HTTP client works.
curl https://api.smsray.com/api/sms/v1/sms/send \
-H "x-api-key: $SMSRAY_API_KEY" \
-H "content-type: application/json" \
-H "Idempotency-Key: order-1042-shipped" \
-d '{ "to": "+9779801234567", "text": "Your order #1042 has shipped." }'Message lifecycle
Every message has a status you can trust
Each change is pushed to your webhook once, signed, and retried on a backoff schedule if your server misses it.
Reference
Everything in the docs
Get started
API reference
Guides
Ready to send your first message?
Talk to sales and we set up your workspace. Then sign in, generate a key and follow the quickstart. OTP works on day one.
Already a customer? Log in