
SMS API
Bulk SMS API a REST gateway for codes, alerts and campaigns
Send SMS from your app, store or booking system with HTTP requests and JSON. Prices, number checks and your opt-out list work the same as on the web send screen.
20,000Numbers per request
120Requests per minute
JSONRequest and response format
Quick start
First request in 3 steps
- 01
Create a key
Go to API in your account and create a key. Keys start with as_ and are displayed one time only.
- 02
Add the header
Add the header Authorization: Bearer <key> to every request.
- 03
Get a quote, then send
Call POST /api/v1/quote to see the cost. If it looks right, send the same body to POST /api/v1/messages.
Base URL
https:/ / allsms.store/ api/ v1Endpoints
All endpoints
Seven endpoints cover everything from a quote to a cancel. Only the country list works without a key.
- GET
/Your credit balance in dollarsapi/ v1/ balance - GET
/Price per SMS for each country, no key neededapi/ v1/ countries - POST
/Cost, parts and dropped numbers, without sendingapi/ v1/ quote - POST
/Sends now, or at schedule_at if setapi/ v1/ messages - GET
/Recent sends, paged with limit and offsetapi/ v1/ messages - GET
/One send with results by countryapi/ v1/ messages/ {id} - POST
/Cancels a scheduled send with a full refundapi/ v1/ messages/ {id}/ cancel
Sending
Send request
Put recipients in the to field, as an array or as one string with one number per line. If some numbers have no +, set country to a default code such as us or kr.
| Field | Description |
|---|---|
to | Recipients: array or line-separated string, up to 20,000 |
text | Message text, up to 10 parts |
country | Optional. Country code for numbers without + |
schedule_at | Optional. When to send: ISO 8601 with a time zone (2026-12-01T09:00:00Z) or Unix seconds, from 5 minutes to 30 days ahead |
client_ref | Optional. Your own reference, up to 64 characters |
Response · POST /api/v1/messages201
{
"ok": true,
"campaign": {
"id": "K7Q2M9XD4TPA",
"status": "sending",
"recipients": 2,
"parts": 1,
"encoding": "GSM-7",
"cost": "0.011",
"refunded": "0.00",
"sent": 0,
"failed": 0,
"queued": 2,
"test": false,
"client_ref": null,
"scheduled_at": null,
"created_at": "2026-11-25T09:00:00.000Z",
"finished_at": null,
"countries": [
{ "country": "US", "recipients": 1, "cost": "0.0043",
"sent": 0, "failed": 0, "queued": 1 },
{ "country": "GB", "recipients": 1, "cost": "0.0067",
"sent": 0, "failed": 0, "queued": 1 }
]
},
"rejected": [],
"duplicates": 0,
"opted_out": 0,
"balance": "48.989"
}POST /api/v1/messages
curl -X POST https://allsms.store/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://allsms.store/api/v1/quote \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "to": ["+14155550142", "+819012345678"], "text": "Hello" }'Response · POST /api/v1/quote200
{
"ok": true,
"recipients": 2,
"parts": 1,
"encoding": "GSM-7",
"characters": 5,
"too_long": false,
"too_many": false,
"cost": "0.0139",
"balance": "49.00",
"countries": [
{ "country": "JP", "recipients": 1, "price": "0.0096", "cost": "0.0096" },
{ "country": "US", "recipients": 1, "price": "0.0043", "cost": "0.0043" }
],
"rejected": [],
"duplicates": 0,
"opted_out": 0
}Errors
Error codes
| Code | HTTP | Meaning |
|---|---|---|
unauthorized | 401 | Missing or invalid key |
rate_limited | 429 | Per-minute request limit reached |
bad_request | 400 | Request body could not be read |
empty_text | 400 | Message text is empty |
too_long | 400 | Text is longer than 10 parts |
no_numbers | 400 | No valid numbers to send to |
too_many | 400 | More than 20,000 numbers |
bad_time | 400 | schedule_at is outside the allowed range |
low_balance | 402 | Not enough credit |
unavailable | 503 | Sending is paused, nothing was charged |
not_found | 404 | No send with that id |
not_scheduled | 409 | The send already went out or was canceled |
Limits and rules
- Each key can make 120 requests per minute.
- Amounts are returned as dollar strings, for example "0.0047".
- A send id is a random 12-character code, not a counter.
- Number checks and opt-out rules are the same as on the web send screen.