Developers
From an API key to a delivered message in ten minutes.
Four endpoints, plain JSON, a bearer key you make yourself, and an error code on every refusal that your program can act on. No SDK to install: any HTTP client is enough.
curl -X POST https://sms.rayenda.com/api/v1/sms \
-H "Authorization: Bearer rs_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "to": "8801712345678", "message": "Your code is 4821" }'
// 201 Created
{ "id": "SMS-7KQ2M9XB4TRW", "status": "queued", "parts": 1, "cost": "0.40" }
Quick start
Three steps to a delivered message.
Open an account, get verified, recharge. Then this.
Make a key
In the panel, under API keys: a name and, if you want, the one server IP it may be used from. The key starts with rs_live_ and is shown once; copy it then.
Authorization: Bearer rs_live_YOUR_KEY
Send a message
Post a number with its country code and a text to /sms. The answer is the message's ID, its parts and its cost; it is already charged and on its way.
{
"to": "8801712345678",
"message": "Your code is 4821"
}
Read the status
Get /sms/{id} and see whether it was delivered, and when. A failed message says so, and its credits are already back.
{
"id": "SMS-7KQ2M9XB4TRW",
"status": "delivered",
"delivered_at": "2026-10-06T09:15:07Z"
}
The API
Four endpoints. That is all of it.
Base URL https://sms.rayenda.com/api/v1. JSON in, JSON out, real HTTP status codes. Examples in curl, PHP and Node in the reference.
Send one message
A number and a text; a sender ID if you have one. Answers with the ID, the parts and the cost.
In the referenceSend to many
The same text to up to 1,000 numbers. Each becomes its own message; a bad number is set aside with its reason.
In the referenceRead a message
Its status, when it was sent and delivered, and whether it was refunded.
In the referenceRead the balance
The credits you can spend now, until when, and the package whose rates apply.
In the referenceErrors
One shape, a stable code, a real status.
Every refusal is the same JSON: a code your program switches on and a message a person can read. The codes never change, so what you handle today still works next year.
A refused request charges nothing. In a bulk request, a number that cannot be sent to is set aside under rejected with the same codes, and the others go out.
{
"error": {
"code": "insufficient_credits",
"message": "Not enough credits for this request."
}
}
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | No key, or no such key. |
| 402 | insufficient_credits | The request costs more than you have. Nothing is sent or charged. |
| 403 | invalid_sender_id | The name is not an approved one of your account. |
| 422 | invalid_number | Not a phone number with its country code. |
| 422 | message_too_long | More than 10 parts. |
| 429 | rate_limited | More than 600 requests in a minute on one key. |
Limits
The numbers you will want before you design.
These are the limits the API enforces today; the reference reads them from the same place, so the two never disagree.
- Numbers in international format: 8801712345678 or +880…. A local number is refused, never guessed.
- A message is charged when it is accepted; the status endpoint tells you the rest. There is no webhook yet, so poll by ID.
- There is no idempotency key: a request that answered 201 was sent, so do not retry it. Retry only a network failure or a 429.
600
Requests a minute per key
1,000
Numbers in one bulk request
10
Parts at most in one message
160 / 70
Characters in one part, plain text / any other script
Testing
No sandbox. Real messages to your own phone.
There is one kind of key, and it sends real messages. To test, send two or three to your own number and read them back by ID: it costs a few credits, and the 2.00 free credits every verified account gets for the API cover it. What you test is exactly what runs.
Send to yourself
One message to your own number proves the key, the number format and the text. The answer's cost is what the pricing page says.
Make the refusals happen
A local number gives invalid_number, a made-up name gives invalid_sender_id, a wrong key gives 401. None of them costs anything.
Watch it in the panel
Every message from the API is in Messages with the key it came from, its status and its cost; the ledger shows the charge and any refund.
The free credits are for the API only, valid 30 days after verification, and never refunded or paid out.
Good practice
Four things the engineers would tell you.
Keep the key on the server
Never in a web page or a mobile app. Tie it to your server's IP, and make one key per system so you can revoke one without touching the rest.
Store the message ID
Keep id against your own record. It is how you read the status later and what support will ask for.
Switch on the code
Handle error.code, not the message text. The text may be reworded; the code will not.
Watch the balance
Read /balance from your monitoring and alert yourself before insufficient_credits does. We email before the credits expire, too.
The reference has the rest.
Every field, every status, every error code, with examples you can paste. It reads its limits from the same place the API does.