smsking

For developers

From getting a number to reading the code, all by API

One API key lets your program check the balance, look up prices, get numbers, read codes and cancel. Every response is JSON, and prices are dollar amounts as strings.

Authentication

Create a key on the API key page in your account, then send it in the header of every request. The key is shown only once, when you create it. Making a new one turns off the old key right away.

Authorization: Bearer YOUR_KEY
# or
X-Api-Key: YOUR_KEY

Base URL https://smsking.online/api/v1

Rate limit

Each key can make up to 120 requests per minute. Going over returns 429 (rate_limited), so wait a moment and try again. When polling for a code, every 3~5 seconds is enough.

GET/balance

Check balance

Returns your current balance in dollars.

# Request
curl https://smsking.online/api/v1/balance \
  -H "Authorization: Bearer YOUR_KEY"

# Response
{ "ok": true, "balance": "12.40", "currency": "USD" }
GET/services

List services

All 1,043 available services, with country counts and lowest prices. The service value is the name you use when getting a number.

# Request
curl https://smsking.online/api/v1/services \
  -H "Authorization: Bearer YOUR_KEY"

# Response
{ "ok": true, "services": [
  { "service": "telegram", "name": "Telegram", "countries": 167, "from": "0.10" }
] }
GET/prices?service=telegram

Prices by country

Prices by country for one service. country is a two-letter country code (id, us, gb).

# Request
curl https://smsking.online/api/v1/prices?service=telegram \
  -H "Authorization: Bearer YOUR_KEY"

# Response
{ "ok": true, "service": "telegram", "prices": [
  { "country": "id", "dial": "+62", "price": "0.133" }
] }
POST/numbers

Get a number

Send service and country to get a number right away. The price is taken from your balance. Use the id in the response to check for codes. Accepts JSON or form data.

# Request
curl -X POST https://smsking.online/api/v1/numbers \
  -H "Authorization: Bearer YOUR_KEY" \
  -d service=telegram -d country=id

# Response
{ "ok": true, "id": "S62AYTG9T3MJ", "service": "telegram", "country": "id",
  "number": "+62 427 015 069", "price": "0.133", "status": "waiting",
  "created_at": "2026-11-15T08:10:00.000Z", "expires_at": "2026-11-15T08:30:00.000Z", "codes": [] }
GET/numbers/{id}

Number status and codes

The number's status (waiting, received, refunded, canceled) and every code received so far. If no code arrives within 20 minutes, the status changes to refunded and the price is returned.

# Request
curl https://smsking.online/api/v1/numbers/S62AYTG9T3MJ \
  -H "Authorization: Bearer YOUR_KEY"

# Response
{ "ok": true, "id": "S62AYTG9T3MJ", "status": "received",
  "codes": [ { "code": "51382", "text": "Telegram code: 51382", "received_at": "..." } ], ... }
POST/numbers/{id}/cancel

Cancel a number

Before a code arrives, this cancels the number and returns the price to your balance right away. refunded holds the amount returned.

# Request
curl -X POST https://smsking.online/api/v1/numbers/S62AYTG9T3MJ/cancel \
  -H "Authorization: Bearer YOUR_KEY"

# Response
{ "ok": true, "id": "S62AYTG9T3MJ", "status": "canceled", "refunded": "0.133", ... }

Errors

On failure, ok is false and error holds the reason.

StatuserrorMeaning
401unauthorizedThe key is missing or wrong.
429rate_limitedOver the per-minute request limit.
400bad_serviceUnknown service name.
400bad_countryThat country does not have numbers for this service.
402low_balanceBalance too low.
503unavailableNo numbers for that country right now. You were not charged.
404not_foundNo number with that id.
409cannot_cancelCannot cancel, because a code already arrived or the time ran out.

A typical flow

  1. 1

    Call prices to see a service's prices by country, and pick a country.

  2. 2

    Send service and country to numbers to get a number.

  3. 3

    Enter the number in the service you are signing up for and have it send a verification text.

  4. 4

    Call numbers/{id} every 3~5 seconds and use the code once it shows up in codes.

  5. 5

    If nothing arrives after 2~3 minutes, call cancel to get refunded and try another country.