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

  1. 01Create a key on the API page in your account (it starts with so_).
  2. 02Send the header Authorization: Bearer <key> with every request.
  3. 03Check the cost with POST /api/v1/quote, then send with POST /api/v1/messages.

Base URL

https://smsonline.blog/api/v1

ENDPOINTS

Endpoints

RequestWhat it does
GET /api/v1/balanceBalance in US dollars
GET /api/v1/countriesCountries and price per SMS (no key needed)
POST /api/v1/quoteCost, parts and removed numbers before sending
POST /api/v1/messagesSend, or schedule with schedule_at
GET /api/v1/messagesRecent sends (limit, offset)
GET /api/v1/messages/{id}One send with results per country
POST /api/v1/messages/{id}/cancelCancel 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).

FieldDescription
toRecipients. Array or newline text, up to 20,000
textThe message. Up to 10 parts
countryOptional. Country code for numbers without +
schedule_atOptional. ISO time with a time zone (for example 2026-12-01T09:00:00Z) or Unix seconds, 5 minutes to 30 days ahead
client_refOptional. 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

CodeHTTPMeaning
unauthorized401Missing or wrong key
rate_limited429Over the per-minute limit
bad_request400Couldn't read the body
empty_text400The text is empty
too_long400The text is over 10 parts
no_numbers400No numbers can be sent
too_many400More than 20,000 numbers
bad_time400Schedule time out of range
low_balance402Not enough balance
unavailable503Sending is not open right now (nothing charged)
not_found404No such send
not_scheduled409Already 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.
Create an API key