The NOMEROK SMS activation API lets a script, bot or test suite do what you’d otherwise do by hand in the dashboard: check the balance and prices, order a virtual number for a service and country, poll for the SMS code, ask for another code, and finish or cancel. It’s a REST API with JSON responses, and there’s also a handler_api.php endpoint for software built for the SMS-Activate protocol.
Below: what the API is for and what it isn’t, authentication and limits, the endpoints, the order lifecycle and statuses, the compatible protocol, how money and refunds work, and practical advice for QA and automation.
What the API is for, and what it isn’t
The API is for receiving verification texts on virtual numbers. Typical uses:
- QA and end-to-end tests. Check your own app’s phone sign-up with real mobile numbers from different countries before each release.
- Internal tools. A support or operations team that regularly needs codes for test or company accounts gets them without logging in to the dashboard.
- Existing software. Programs and scripts that already speak the SMS-Activate protocol can switch providers by changing the base URL and key.
It is not an API for sending one-time passwords to your own customers. If you’re looking for an “SMS verification API” to text codes to your users, you need an SMS gateway or a verification provider such as Twilio Verify, Vonage or a similar service. And it isn’t for mass registrations, spam or fraud, which our acceptable use policy forbids.
Authentication, format and limits
Create a key in your dashboard, in the API section, after you sign up. Send it with every request in the Authorization header as a bearer token: Authorization: Bearer nk_live_…. Keep the key server-side; anyone with it can spend your balance.
- Format: JSON requests and responses over HTTPS.
- Rate limit: 60 requests per minute per key. That’s plenty for normal use if you don’t poll faster than every few seconds.
- Errors: an HTTP 4xx status with a body like { "error": "NO_BALANCE", "message": "…" }. Branch on the error code, not on the message text.
- Money: amounts are integers in kopiyky, hundredths of a Ukrainian hryvnia: 1800 means 18.00 UAH. The English site shows approximate dollar prices, but the API works in UAH.
Endpoints
| Method and path | What it does |
|---|---|
| GET /api/v1/balance | Account balance and currency |
| GET /api/v1/services | List of services with their codes, such as telegram |
| GET /api/v1/prices?service=telegram | Price, stock and delivery rate by country for a service |
| POST /api/v1/orders | Buy a number: service, country, mode and an optional max_price |
| GET /api/v1/orders/:id | Order status and any codes received |
| POST /api/v1/orders/:id/cancel | Cancel if no SMS has arrived yet; the money is refunded |
| POST /api/v1/orders/:id/again | Ask for one more SMS on the same number |
| POST /api/v1/orders/:id/finish | Close the activation once you’re done |
An order request looks like { "service": "telegram", "country": "UA", "mode": "sms", "max_price": 2500 }. The response returns the order id, the number in international format without the plus, the price, the status and an expiry time. Request and response examples are shown under each method on this page.
Order lifecycle
After you order, the number is reserved for you alone and waits 20 minutes for a text. Poll the order every few seconds; once a code arrives, it appears in the codes array with a timestamp. If the target app needs a second code, call again: repeat codes are free while the activation is open. When you’re done, call finish.
If no SMS arrives, you don’t need a separate refund request: the order closes on its own after 20 minutes and the money goes back to your balance. You can also cancel earlier, as long as no SMS has arrived yet.
- 1Pricespick a country with stock and an acceptable price
- 2OrderPOST with service, country and max_price
- 3Enter the numberyour test or tool types it into the target app
- 4PollGET the order every few seconds until codes appear
- 5Finish or cancelfinish when done; cancel if nothing came
Order statuses
- waitingnumber issued, no SMS yet
- receivedat least one code arrived
- finishedyou closed the activation
- cancelled / refundedcancelled by you or closed after 20 minutes without a code, money returned
| Status | Meaning | What your code should do |
|---|---|---|
| waiting | Waiting for the SMS | Keep polling; give up and cancel if your own timeout passes |
| received | A code has arrived | Read the latest item in codes, then finish or request again |
| finished | Closed by you | Stop polling |
| cancelled / refunded | Cancelled, money returned | Order a new number, perhaps from another country |
handler_api.php compatibility
Plenty of existing software, from registration tools to QA scripts, talks to SMS activation services through the handler_api.php protocol popularised by SMS-Activate. NOMEROK accepts that protocol at /stubs/handler_api.php on our domain, with your key in the api_key parameter, and answers with the familiar text responses. In many tools, switching means changing the base URL and the key.
| Action | What it does | Typical responses |
|---|---|---|
| getBalance | Account balance | ACCESS_BALANCE:amount in UAH |
| getNumber | Buy a number for a service and country, optionally with maxPrice | ACCESS_NUMBER:id:number, NO_NUMBERS, NO_BALANCE |
| getStatus | Activation status | STATUS_WAIT_CODE, STATUS_WAIT_RETRY, STATUS_OK:code, STATUS_CANCEL |
| setStatus=3 | Request one more SMS | ACCESS_RETRY_GET |
| setStatus=6 | Finish the activation | ACCESS_ACTIVATION |
| setStatus=8 | Cancel, money refunded | ACCESS_CANCEL |
| getPrices | Prices and number counts | JSON: country → service → cost, count |
NOMEROK is a separate service and isn’t affiliated with SMS-Activate; see our SMS-Activate alternative page for a fuller comparison and migration notes.
Before you switch existing software
- API key created in the dashboard and stored server-side
- Base URL pointed at /stubs/handler_api.php
- Service and country codes checked for the services you use
- maxPrice converted to UAH
- A few manual activations tested before full automation
- Retry and cancel handling verified
- Currency. Balance, prices and maxPrice are in UAH. If your software had a price cap in dollars or another currency, convert it.
- Service and country codes. Common short codes such as tg are supported, but check rare services against the documentation.
- Auto-cancel. A failed activation closes after 20 minutes and refunds itself, so you don’t need extra refund logic.
- Polling. Respect the 60-requests-per-minute limit; one status check every few seconds per order is enough.
Run a few activations manually first, then switch on automation and watch how your software handles repeat codes and cancellations.
Prices, stock and choosing a country
Prices depend on the service and country pair, change with supplier stock during the day, and are the same as in the dashboard. Call the prices endpoint before ordering and pass max_price so your script never pays more than you planned. The delivery rate in the response helps you pick countries where codes for that service arrive most reliably.
You can see the same data without code in the price table and on each service page in the catalogue. For services that aren’t listed, order Other, which accepts a text from any sender.
Paying for API usage
The API spends the same balance as the dashboard; there’s no separate API plan or monthly fee. Top up by card from any bank, Apple Pay, Google Pay or crypto, with a minimum top-up of 100 UAH. You pay only for activations: an order that never receives a code is refunded automatically.
Numbers bought through the API are the same real mobile numbers as in the dashboard, issued to one customer at a time. For accounts you’ll keep and log back into, a single 20-minute activation isn’t enough: use a rented number instead.
Good practice for automation
- Keep keys secret. Never ship the key in a mobile app or front-end code; call the API from your backend or CI.
- Handle NO_NUMBERS and NO_BALANCE. Fall back to another country or alert a human rather than retrying in a tight loop.
- Use your own timeout. If your test can’t wait 20 minutes, cancel after your limit; the money comes back if no SMS arrived.
- Log order ids. When you contact support, the id lets us find the activation quickly.
- Don’t mix test and production accounts on the same numbers; it makes recovery and audits harder.
For tests that also need a specific IP country, pair numbers with proxies so the number, IP and locale match.