The API your own server calls to buy numbers, read their codes and manage your dollar balance.
- Base path:
/reseller/v1. - Authentication: every request sends
Authorization: Bearer <key>, the Reseller API key from the website's reseller section (ocr_…, shown once when it is created; creating a new key revokes the old one at once). A missing, unknown, revoked or suspended key gets401 unauthenticated(as does a key whose account is blocked or deleted). A key with an IP allowlist, used from an address outside it, gets403 reseller_ip_not_allowed. HTTPS only. Never send your key over plain http: if you ever did, create a new key at once. When you create a new key, switch your servers to it at once: requests still sending the old key get401, and 20 failed authentications a minute from one address pause that address for up to a minute. - Rate limits: past 50 requests a second per key and client address (an IPv6 client counts by its /64), or
after 20 failed authentications a minute from one address, requests get
429 rate_limitedwith aRetry-Afterheader andretryAfterSeconds. Past the per-key limit a 10-second block follows for that key and address: every request during it gets the same 429 with the seconds left, and none lengthens it. The Reseller's own rate (50 a second across all its addresses) answers 429 without a block: retry afterRetry-After. Buys (createOrder) and cancels (cancelOrder) have their own per-second limits (10 each), with no block. - Limits and blocks: at most a set number of numbers wait for a code at once, and a service in a country (or
the whole account) is blocked for a while after too few codes;
removeLimitslifts the blocks a few times a UTC day.getLimitsgives the rules, the current numbers and the blocks now. - Levels: the top-ups credited in the previous UTC week set this week's level, and its discount is already in
every price (
getLevel). - Webhooks: set one https URL in the website's reseller section. Each event is a POST with a JSON body
{type, timestamp, data}and the Standard Webhooks headerswebhook-id(the same on every retry: deduplicate on it),webhook-timestamp(Unix seconds) andwebhook-signature(v1,+ Base64 HMAC-SHA256 ofid.timestamp.body, keyed with the Base64-decoded part of the secret afterwhsec_). Verify with any Standard Webhooks library and refuse a timestamp more than 5 minutes off. Answer 2xx within 10 seconds; anything else, redirects included (never followed), is retried by default after 5 s, 30 s, 2 min, 10 min, 30 min, 1 h, 2 h, 4 h, 8 h and 8 h, then given up. Deliveries can arrive out of order and more than once, and a completed order may still get a laterorder.sms_received. The event bodies are under Webhooks below. - Money is the
Moneyschema in US dollars:amountMicrosis 1e-6 of a dollar (1.50 USD = 1500000) andcurrencyisUSD. Never a float. - Prices are the Reseller's own, in USD (
listPrices), charged to the Reseller wallet. A number that gets no code (cancelled, expired or failed) is refunded in full. - Idempotency: buying (
createOrder) and cancelling (cancelOrder) require anIdempotency-Keyheader, a unique value per action (a UUID). Retrying with the same key returns the same result and never charges twice; the same key with a different request isidempotency_key_reused. - Errors are
application/problem+json(RFC 9457) with a stablecode. Branch oncode, never ontitleordetail. - Lists use cursor pagination:
?cursor=&limit=returns{ items, nextCursor }; sendnextCursorback ascursoruntil it is absent. - JSON fields are camelCase. IDs are opaque strings. Timestamps are RFC 3339 UTC.