DEVELOPER API
SMS API Send with one key
Send texts from your app, store or booking system through SMSOnline. Same prices and rules as the web send screen.
20,000Numbers per request
120Requests per minute
JSONIn and out
QUICK START
Get started
- 01Create a key on the API page in your account (it starts with so_).
- 02Send the header Authorization: Bearer <key> with every request.
- 03Check the cost with POST /api/v1/quote, then send with POST /api/v1/messages.
Base URL
https://smsonline.blog/api/v1
ENDPOINTS
Endpoints
| Request | What it does |
|---|---|
GET /api/v1/balance | Balance in US dollars |
GET /api/v1/countries | Countries and price per SMS (no key needed) |
POST /api/v1/quote | Cost, parts and removed numbers before sending |
POST /api/v1/messages | Send, or schedule with schedule_at |
GET /api/v1/messages | Recent sends (limit, offset) |
GET /api/v1/messages/{id} | One send with results per country |
POST /api/v1/messages/{id}/cancel | Cancel a schedule before it sends, full refund |
SEND
Sending
The to field is an array of numbers or newline-separated text. To use numbers without +, set country to a default country code (like us or kr).
| Field | Description |
|---|---|
to | Recipients. Array or newline text, up to 20,000 |
text | The message. Up to 10 parts |
country | Optional. Country code for numbers without + |
schedule_at | Optional. ISO time with a time zone (for example 2026-12-01T09:00:00Z) or Unix seconds, 5 minutes to 30 days ahead |
client_ref | Optional. Your own reference, up to 64 characters |
Response · 201201 Created
{
"ok": true,
"campaign": {
"id": "K7Q2M9XD4TPA",
"status": "sending",
"recipients": 2,
"parts": 1,
"encoding": "GSM-7",
"cost": "0.012",
"countries": [
{ "country": "US", "recipients": 1, "cost": "0.0047" },
{ "country": "GB", "recipients": 1, "cost": "0.0073" }
]
},
"rejected": [],
"duplicates": 0,
"opted_out": 0,
"balance": "48.988"
}POST /api/v1/messages
curl -X POST https://smsonline.blog/api/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": ["+14155550142", "+447400123456"],
"text": "Your order #A2847 has shipped."
}'POST /api/v1/quote
curl -X POST https://smsonline.blog/api/v1/quote \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "to": ["+14155550142", "+819012345678"], "text": "Hello" }'Response · 200200 OK
{
"ok": true,
"recipients": 2,
"parts": 1,
"encoding": "GSM-7",
"cost": "0.0147",
"balance": "49.00",
"countries": [
{ "country": "JP", "recipients": 1, "price": "0.01", "cost": "0.01" },
{ "country": "US", "recipients": 1, "price": "0.0047", "cost": "0.0047" }
],
"rejected": [],
"duplicates": 0,
"opted_out": 0
}ERRORS
Error codes
| Code | HTTP | Meaning |
|---|---|---|
unauthorized | 401 | Missing or wrong key |
rate_limited | 429 | Over the per-minute limit |
bad_request | 400 | Couldn't read the body |
empty_text | 400 | The text is empty |
too_long | 400 | The text is over 10 parts |
no_numbers | 400 | No numbers can be sent |
too_many | 400 | More than 20,000 numbers |
bad_time | 400 | Schedule time out of range |
low_balance | 402 | Not enough balance |
unavailable | 503 | Sending is not open right now (nothing charged) |
not_found | 404 | No such send |
not_scheduled | 409 | Already sent or canceled |
Limits and rules
- Up to 120 requests a minute per key.
- Amounts are US dollar strings ("0.0047").
- Send ids are 12-character codes, not sequence numbers.
- The same number checks and opt-out list as the web send screen.