Bulk SMS Verification API for Developers
Bulk SMS verification API guide for developers — Python examples, rate limits, webhooks, and SmsBuyz endpoints for mass activations.
Once you are running more than a handful of authorized verifications a day, doing them by hand stops making sense. The SmsBuyz v1 API lets you automate the whole order lifecycle, but "bulk" does not mean one call that buys hundreds of numbers. It means running many single-number orders reliably and in parallel, with sensible limits, clean error handling and no forgotten orders. This guide shows how to design that, using only the endpoints that exist in the API documentation.
Key takeaways
- There is no batch-buy endpoint. Each buy call creates one order; volume comes from running orders in parallel.
- Each order follows buy, then check, then finish or cancel, and waits up to 20 minutes for its SMS.
- Your account has a cap on simultaneously open orders. Keep concurrency bounded and back off on 503 responses.
- Cancel orders you no longer need while they are PENDING; the amount returns to your balance.
- Automate only accounts you are authorized to operate, within each platform's rules. No fake accounts, spam or ban evasion.
What does "bulk" SMS verification mean with the SmsBuyz API?
Bulk SMS verification means processing many independent orders automatically, not buying many numbers in one request. Each call to GET /v1/user/buy/activation/{country}/{operator}/{product} returns exactly one order with one number. Your system then checks that order with GET /v1/user/check/{id} until it is RECEIVED, uses the code, and closes it with finish, or closes it early with cancel. Throughput comes from running several of these lifecycles at the same time.
Who should automate SMS verification at volume?
Automation makes sense for teams that repeatedly verify accounts they are responsible for. Examples include QA and release testing of sign-up flows in products your company operates, agencies onboarding accounts on behalf of clients who have authorized them, and internal tools that set up service accounts for your own organisation. It does not make sense, and is not an acceptable use, for creating fake or disposable accounts in bulk, manipulating engagement, sending spam, or getting around bans. Platforms detect coordinated accounts through far more than phone numbers, and those uses break their terms.
How should you architect a high-volume verification worker?
Use a queue, a small pool of workers, and a persistent record of every order. A design that holds up well:
- Job queue. Put each verification job (country, product, internal job ID) on a queue such as Redis, SQS or a database table.
- Bounded worker pool. Run a fixed number of workers, each handling one order at a time. Start small and increase only while error rates stay low.
- Persist the order ID immediately. Store the returned
idagainst your job before doing anything else, so a crashed worker can resume or cancel it. - Check on an interval. Call
checkevery 3 to 5 seconds, the interval the documentation recommends, and stop at the order'sexpirestime. - Always close the order. Finish it after the code is used, or cancel it if you no longer need it. A sweeper job should look for PENDING orders your system has lost track of.
- Notify downstream. Emit your own internal event or webhook when a job succeeds or fails. SmsBuyz does not push callbacks; your workers poll.
What does one order lifecycle look like in code?
Here is a minimal shell version of one worker's loop using curl and jq. It buys a number, checks for up to 20 minutes, and either finishes or cancels:
TOKEN="your_api_key"
BASE="https://smsbuyz.com/v1"
AUTH="Authorization: Bearer $TOKEN"
ORDER=$(curl -s "$BASE/user/buy/activation/us/any/telegram" -H "$AUTH")
ID=$(echo "$ORDER" | jq -r '.id // empty')
if [ -z "$ID" ]; then echo "Buy failed: $ORDER"; exit 1; fi
echo "Number: $(echo "$ORDER" | jq -r '.phone')"
for i in $(seq 1 240); do # 240 x 5 s = 20 minutes
RESP=$(curl -s "$BASE/user/check/$ID" -H "$AUTH")
case "$(echo "$RESP" | jq -r '.status // empty')" in
RECEIVED)
echo "Code: $(echo "$RESP" | jq -r '.sms[0].code')"
# ...submit the code to the target app, then:
curl -s "$BASE/user/finish/$ID" -H "$AUTH" >/dev/null
exit 0 ;;
CANCELED|BANNED|TIMEOUT|FINISHED)
echo "Order closed"; exit 1 ;;
esac
sleep 5
done
curl -s "$BASE/user/cancel/$ID" -H "$AUTH" # refunds if still PENDINGIn production you would write the same logic in your main language, add timeouts to every HTTP call, and log each state change against your job ID.
How many orders can you run at once?
You can run several orders in parallel, but your account has a limit on how many can be open at the same time. When you reach it, buy requests are refused with a 503, the same status used when a country has no stock. Treat 503 on buy as "slow down": pause that worker, retry after a delay with exponential backoff, and consider another country if it persists. Closing orders promptly, by finishing or cancelling, frees capacity for new ones.
How do you handle errors and retries at scale?
| Response | Typical cause | Worker action |
|---|---|---|
| 400 | Unknown product or country, insufficient balance, invalid state change | Do not retry blindly; fix input or pause all workers and top up |
| 401 / 403 | Missing or invalid API key | Stop the pool and alert |
| 404 | Order not found for this account | Mark job failed; check your stored IDs |
| 409 | Order busy with another request, or no longer pending | Wait briefly, then check the order again |
| 503 | No numbers available, open-order limit reached, or cancellation not yet confirmed | Back off and retry; try another country |
One detail matters for cancellation: if the SMS arrives just as you cancel, the cancel call can return the order with its code instead of refunding it. Always read the returned status rather than assuming the cancel succeeded.
How do you keep costs predictable?
Keep costs predictable by checking prices and balance before you scale up, and by closing orders you do not need. Read prices from /v1/guest/prices or /v1/guest/products/{country}/any close to buying time rather than hard-coding them, and check /v1/user/profile for your balance before starting a batch. Set a per-job budget and a daily cap in your own system. Reconcile regularly using /v1/user/orders and /v1/user/payments, which list your orders and balance movements.
What rules apply to automated verification?
Automation does not change the rules: every target platform's terms, rate limits and anti-abuse policies still apply, and so do SmsBuyz's own terms. Keep volumes proportionate to genuine needs, verify only accounts you are authorized to operate, and never use the API to create fake accounts or evade bans. For single-order examples and the full endpoint list, read the API developer guide. Commonly automated services include Telegram, WhatsApp and Microsoft. Current costs are on the price list.
Ready to get started?
Create a free account and review the live route, price and any applicable campaign terms before payment.