Guides

Order status

Track every order by polling, webhooks, or both.

.md

An order moves through these statuses:

Status Meaning Final?
pending Waiting for a number (usually seconds). Not charged yet. No
active A number is allocated (phone_number is set) and charged. Waiting for the SMS. No
completed The SMS arrived: sms_code and sms_content are set. Yes
expired No SMS arrived in time. The charge is refunded. Yes
cancelled You cancelled it. Any charge is refunded. Yes
failed No number could be allocated. Never charged. Yes

Two complementary paths — use either or both:

Polling (default, no setup). Every account can poll order status out of the box. The efficient pattern is list polling: one GET /orders?status=pending,active every 5 seconds covers all your in-flight orders with a single request (12 requests/min regardless of order count). Poll GET /orders/{id} for one specific order only — per-order polling multiplies request volume by your concurrency and burns your rate limit budget for no benefit.

Webhooks (optional, recommended for real-time). Register an endpoint once in Dashboard → API Keys → Webhooks, verify it, and we push order.number_allocated / order.completed and failure events with an HMAC-SHA256 signature — typically faster than any polling interval and it costs none of your rate limit. See the webhooks section below. Use delivery history in the dashboard to monitor webhook failures; polling doubles as your reconciliation path.

Polling endpoints

  • GET /orders lists your orders, newest first, with status, startTime / endTime filters and limit / offset pagination.
  • GET /orders/{id} returns one order.

Polling is on for every account by default. It is turned off only for an individual account under abuse review; requests then return 403 ORDER_QUERY_NOT_AVAILABLE. Contact support to restore access.