From $0.0018 per SMS

Top-up guideContact

For developers

SMS gateway API Bulk SMS and OTP over REST

Connect your app, online store or booking system to the WorldText SMS gateway. Prices and sending rules match the web console.

20,000Max numbers per request
120Requests per minute per key
JSONRequest and response

Quick start

First request

  1. 01Go to the API page in your account and generate a key. Keys begin with wt_.
  2. 02Add the header Authorization: Bearer <key> to each request.
  3. 03Get a price with POST /api/v1/quote, then send through POST /api/v1/messages.

Base URL

https://worldtext.world/api/v1

Endpoints

Endpoint list

Method and pathPurpose
GET /api/v1/balanceYour current balance, in USD
GET /api/v1/countriesCovered countries with the rate per SMS (works without a key)
POST /api/v1/quotePrice, part count and filtered numbers, without sending
POST /api/v1/messagesSend now, or later when schedule_at is set
GET /api/v1/messagesList of recent sends (limit, offset)
GET /api/v1/messages/{id}A single send and its results by country
POST /api/v1/messages/{id}/cancelCancels a scheduled send that hasn't gone out and refunds it in full

Send

Sending messages

Pass the to field as an array of numbers, or as text with one number per line. For numbers written without +, set the country field to a two-letter country code, such as us or kr.

FieldDetails
toWho gets it. An array, or one number per line, at most 20,000
textMessage body, no more than 10 parts
countryOptional. Two-letter country code for numbers without +
schedule_atOptional. An ISO timestamp that includes a time zone (such as 2026-12-01T09:00:00Z) or Unix seconds, between 5 minutes and 30 days from now
client_refOptional. A reference of your own, 64 characters max
Response · 201201 Created
{
  "ok": true,
  "campaign": {
    "id": "K7Q2M9XD4TPA",
    "status": "sending",
    "recipients": 2,
    "parts": 1,
    "encoding": "GSM-7",
    "cost": "0.0105",
    "countries": [
      { "country": "US", "recipients": 1, "cost": "0.0041" },
      { "country": "GB", "recipients": 1, "cost": "0.0064" }
    ]
  },
  "rejected": [],
  "duplicates": 0,
  "opted_out": 0,
  "balance": "48.9895"
}
POST /api/v1/messages
curl -X POST https://worldtext.world/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://worldtext.world/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.0131",
  "balance": "49.00",
  "countries": [
    { "country": "JP", "recipients": 1, "price": "0.009", "cost": "0.009" },
    { "country": "US", "recipients": 1, "price": "0.0041", "cost": "0.0041" }
  ],
  "rejected": [],
  "duplicates": 0,
  "opted_out": 0
}

Errors

Error responses

CodeHTTPCause
unauthorized401No key, or the key is invalid
rate_limited429Too many requests this minute
bad_request400The request body could not be parsed
empty_text400No message text
too_long400Text runs past 10 parts
no_numbers400None of the numbers are sendable
too_many400Over 20,000 numbers in one request
bad_time400schedule_at is outside the allowed window
low_balance402Balance too low for this send
unavailable503Sending is paused at the moment, and no credit was taken
not_found404That send id doesn't exist
not_scheduled409The send already went out or was canceled

Limits

  • Each key can make up to 120 requests per minute.
  • Money values come back as USD strings, for example "0.0047".
  • A send id is a random 12-character code, not a running number.
  • Number filtering and the opt-out list work the same as in the web console.
Get an API key