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.
/balanceCheck 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" }
/servicesList 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" } ] }
/prices?service=telegramPrices 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" } ] }
/numbersGet 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": [] }
/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": "..." } ], ... }
/numbers/{id}/cancelCancel 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.
| Status | error | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing or wrong. |
| 429 | rate_limited | Over the per-minute request limit. |
| 400 | bad_service | Unknown service name. |
| 400 | bad_country | That country does not have numbers for this service. |
| 402 | low_balance | Balance too low. |
| 503 | unavailable | No numbers for that country right now. You were not charged. |
| 404 | not_found | No number with that id. |
| 409 | cannot_cancel | Cannot cancel, because a code already arrived or the time ran out. |
A typical flow
- 1
Call prices to see a service's prices by country, and pick a country.
- 2
Send service and country to numbers to get a number.
- 3
Enter the number in the service you are signing up for and have it send a verification text.
- 4
Call numbers/{id} every 3~5 seconds and use the code once it shows up in codes.
- 5
If nothing arrives after 2~3 minutes, call cancel to get refunded and try another country.