API reference · v1
Build with the SMSRay API
A small, predictable REST API for OTP and transactional SMS to Nepal mobile numbers. JSON in, JSON out, one header to authenticate, signed webhooks for every status change.
Base URL
https://api.smsray.in/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
Format
JSON over HTTPS. Timestamps are ISO 8601 UTC.
Recipients
Nepal mobiles only: 96/97/98XXXXXXXX, 977 prefix accepted.
Safe retries
Idempotency-Key on any POST, kept 24 h.
Rate
20 requests per second per client by default.
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 no route can send it.
- → 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.in/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
Endpoints
Guides
Ready to send your first message?
Create a workspace with your phone or email, generate a key and follow the quickstart.