Skip to content
SMSRay

API reference

Six endpoints, two webhook events, one auth header and one error shape.

Basics

API basics
Base URLhttps://api.smsray.com/api/sms/v1
Authenticationx-api-key: ls_live_… on every request. See Authentication.
FormatJSON over HTTPS. Timestamps are ISO 8601 UTC.
NumbersE.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 retriesIdempotency-Key on any POST, kept 24 h. See Idempotency.

Endpoints

Public v1 endpoints
MethodPathWhat it does
POST/sms/sendSend an SMS, as free text or from an approved template.
POST/sms/otp/sendGenerate and send a 6-digit code.
POST/sms/otp/verifyCheck the code your user typed.
GET/sms/messages/:idLook up a message and its status.
GET/sms/balanceWorkspace balance, rates and your counters.
GET/sms/coverageWhere this key can send, and where SMSRay delivers.

Webhook events

Webhook events
EventWhen
message.statusA message reaches sent, delivered, undelivered or failed.
message.inboundA recipient replies to one of your messages.

Machine-readable specs

Your keys and live examples

Signed in? The portal's developer page shows your own keys with every example pre-filled for them.