Developer API
The SMS API, one key and JSON
Send texts automatically from your shop, app or booking system. The API uses the same credit and prices as web sending, with the same number checks.
20,000numbers in one call
120calls a minute
JSONbodies both ways

One requestUp to 20,000 numbers
Quick start
Your first request
- 01Create a key on the API page of your account. It starts with smk_ and is shown only once.
- 02Attach it to each call as Authorization: Bearer <key>.
- 03Check the cost with POST /api/v1/quote, then send with POST /api/v1/messages.
Base URL
https://smsmarket.shop/api/v1
Endpoints
Endpoint list
| Request | What it does |
|---|---|
GET /api/v1/balance | Remaining credit in USD |
GET /api/v1/countries | Price per country, no key needed |
POST /api/v1/quote | Cost, part count and skipped numbers, without sending |
POST /api/v1/messages | Send now, or add schedule_at to schedule |
GET /api/v1/messages | Recent campaigns, paged with limit and offset |
GET /api/v1/messages/{id} | One campaign with results by country |
POST /api/v1/messages/{id}/cancel | Cancel a scheduled send before it goes out, with a full refund |
Sending
Sending a message
Pass the to field as a JSON array, or as text with one number per line. When numbers have no plus sign, set the country field to their country code, for example us or kr.
| Field | Meaning |
|---|---|
to | Recipients: an array or one number per line, up to 20,000 |
text | Message text, up to 10 parts |
country | Optional. Country code for numbers written without + |
schedule_at | Optional. A moment 5 minutes to 30 days ahead, as ISO time with a zone (for example 2026-12-01T09:00:00Z) or Unix seconds |
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.0101",
"countries": [
{ "country": "US", "recipients": 1, "cost": "0.0039" },
{ "country": "GB", "recipients": 1, "cost": "0.0062" }
]
},
"rejected": [],
"duplicates": 0,
"opted_out": 0,
"balance": "49.9899"
}POST /api/v1/messages
curl -X POST https://smsmarket.shop/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://smsmarket.shop/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.0124",
"balance": "50.00",
"countries": [
{ "country": "JP", "recipients": 1, "price": "0.0085", "cost": "0.0085" },
{ "country": "US", "recipients": 1, "price": "0.0039", "cost": "0.0039" }
],
"rejected": [],
"duplicates": 0,
"opted_out": 0
}Errors
Error codes
| Code | HTTP | Meaning |
|---|---|---|
unauthorized | 401 | Key absent or unknown |
rate_limited | 429 | Too many calls in this minute |
bad_request | 400 | Body is not readable JSON |
empty_text | 400 | text has nothing in it |
too_long | 400 | text runs past 10 parts |
no_numbers | 400 | No valid numbers left |
too_many | 400 | Over 20,000 numbers in one call |
bad_time | 400 | schedule_at falls outside the window |
low_balance | 402 | Not enough credit |
unavailable | 503 | Sending unavailable right now, no credit taken |
not_found | 404 | No campaign with that id |
not_scheduled | 409 | Already sent or cancelled |
Limits and notes
- Each key may make 120 calls per minute.
- Money comes back as a USD string such as "0.0042".
- Campaign ids are random 12-character codes, not sequential numbers.
- The opt-out list and number checks work exactly as in web sending.