Errors & Rate Limits
Complete reference for error codes, HTTP status mapping, rate limit policies, and retry strategies.
HTTP Status Codes
Modern REST API uses standard HTTP status codes. The response body includes a structured error object.
| Code | Status | Meaning |
|---|---|---|
| 400 | Bad Request | Request validation failed (missing or invalid parameters) |
| 400 | Bad Request | Invalid email site format (code EMAIL_SITE_INVALID): applies to email activation creation and reorder. Previously this case returned 500. |
| 401 | Unauthorized | Authentication required or invalid API key |
| 402 | Payment Required | Insufficient wallet balance to complete the action |
| 403 | Forbidden | Authenticated, but not authorized for this resource |
| 404 | Not Found | Resource not found (e.g. activation ID does not exist) |
| 409 | Conflict | Request conflicts with current state (e.g. activation already completed) |
| 422 | Unprocessable Entity | Request is well-formed but semantically invalid |
| 422 | Unprocessable Entity | Email site not supported (code EMAIL_SITE_NOT_SUPPORTED): applies to email activation creation and reorder. Previously this case returned 500. |
| 429 | Too Many Requests | Rate limit exceeded: see Retry-After header |
| 429 | Too Many Requests | Concurrent activation limit: JSON code ACTIVATION_CONCURRENCY_LIMIT (fields limit, open). Wait, then retry. |
| 429 | Too Many Requests | Anti-abuse limit (error "Too Many Requests"; from 2026-10-20 the JSON body also carries code ANTI_ABUSE_THROTTLE). Applied temporarily when an account has requested many numbers in a recent window, cancelled almost all of them and received no code. Use the numbers you hold or wait, then retry. |
| 500 | Internal Server Error | Unexpected server error: retry with exponential backoff |
| 502 | Bad Gateway | Upstream failure. The body message is usually "Upstream error: <CODE>" (eSIM orders: "Upstream eSIM error: <CODE>"). From 2026-10-20, <CODE> is one of the codes listed below; until then it may be a raw code. |
| 503 | Service Unavailable | Upstream provider unavailable: retry later |
Upstream error codes (HTTP 502)
The 502 message usually has the form "Upstream error: <CODE>"; eSIM orders use "Upstream eSIM error: <CODE>". From 2026-10-20, <CODE> is one of our own codes, never a provider string, and eSIM orders only return UPSTREAM_BUSY, UPSTREAM_REFUSED, UPSTREAM_INVALID_REQUEST or UPSTREAM_ERROR.
Match on the "Upstream error: " or "Upstream eSIM error: " prefix. If you do not recognise the code, treat it as a generic error. Some 502 responses carry a plain explanation without a code; if the prefix is missing, treat it as a generic error too.
| Code | Meaning |
|---|---|
| UPSTREAM_BUSY | The provider is busy or limiting requests. Retry later with backoff. |
| UPSTREAM_REFUSED | The provider refused the request. Do not retry it unchanged; contact support if it persists. |
| UPSTREAM_PRICE_MISMATCH | The price changed since you read it. Fetch the current price and retry. |
| UPSTREAM_INVALID_REQUEST | The provider rejected the request as invalid, or the item was not found (for eSIM orders, the package). Check the request parameters, such as service, country or package. |
| UPSTREAM_ERROR | Any other upstream failure. Retry later. |
| BANNED_EMAIL | The email address is blocked for this service. Request a different address. |
| NO_ACTIVATION | The activation was not found upstream. |
| EARLY_CANCEL_DENIED | Cancellation is not allowed yet. Wait for the cancel window, then retry. |
Error response shape (JSON)
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 27937
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 2026-05-10T00:00:00.000Z
{
"error": "rate_limit_exceeded",
"message": "Daily API limit reached. Contact support for higher tier.",
"retryAfter": 27937,
"limit": 10000,
"usage": 10000
}SMS-Activate Text Codes
SMS-Activate compatible endpoint returns plain text codes. Each code maps to an HTTP status for tooling that needs both.
Prices are in USD, with 3 decimal places, and equal the amount actually charged (list price before any loyalty discount). The price you read from the API is the price you pay.
| Text Code | HTTP | Meaning |
|---|---|---|
| BAD_KEY | 401 | Invalid or missing API key |
| BAD_ACTION | 400 | Action parameter missing or malformed |
| BAD_SERVICE | 400 | Service code not recognized |
| BAD_COUNTRY | 400 | Country parameter not recognized |
| BAD_STATUS | 400 | Invalid status value for setStatus |
| WRONG_ACTION | 400 | Action name not supported |
| NO_BALANCE | 402 | Insufficient wallet balance |
| NO_NUMBERS | 404 | No numbers available for this service+country combination |
| NO_ACTIVATION | 404 | Activation ID not found or not yours |
| RATE_LIMITED | 429 | Rate limit exceeded: slow down or wait for reset |
| REQUEST_LIMIT | 200 | From 2026-10-20 (previously ERROR_SQL): Too many concurrent activations or requests. Wait, then retry.From 2026-10-20 (previously ERROR_SQL): HTTP 200, plain-text body REQUEST_LIMIT — returned only by the SMS-Activate compatible endpoint (/stubs/handler_api.php)From 2026-10-20 the endpoint answers REQUEST_LIMIT (until then it answers ERROR_SQL in these cases). REQUEST_LIMIT covers two cases: the concurrency limit and the anti-abuse limit. |
| ERROR_SQL | 500 | Internal server error: retry later |
Rate Limits
Per-API-key throttle. Multiple servers using one key share a single bucket.
Burst limits
Three concurrent throttle tiers protect against bursts and sustained abuse. Hitting any tier returns 429.
Daily Quota
Default 10,000 requests per API key per day. Resets at UTC midnight.
- Public catalog endpoints (services, countries) are exempt from daily quota
- Quota counter increments on every authenticated request, regardless of response status
- Pro tier with higher limits available: contact support
Response Headers
Every authenticated API response includes rate limit headers so clients can self-throttle proactively.
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9543
X-RateLimit-Reset: 2026-05-10T00:00:00.000Z
Retry-After: 27937Cancel window
Every activation carries the two fields that decide a cancel, so your client never has to discover the answer with a rejected request.
| cancellableAt | What it means | DELETE |
|---|---|---|
| null | The activation has reached a final state, a received code included. It can never be cancelled. | 409 |
| future | The early-cancel cooldown is still running. Cancel opens at this timestamp. | 400 |
| past | Cancel is open now. cancellable is true. | 200 |
Read the field, do not probe the endpoint
Retrying a rejected DELETE cannot change the answer. An activation that returns 409 will return 409 for the rest of its life, and one inside the cooldown keeps returning 400 until cancellableAt passes.
Example: cancel only when the API says you can
# Read the field instead of probing the endpoint
activation = get(f"/v1/activations/{id}")
if activation["cancellableAt"] is None:
pass # final state, a cancel would answer 409
elif activation["cancellable"]:
delete(f"/v1/activations/{id}")
else:
# the cooldown is still running; waiting beats retrying
sleep(seconds_until(activation["cancellableAt"]))
delete(f"/v1/activations/{id}")Retry Strategy
How to handle transient failures without flooding the API or losing data.
Do
- • Honor Retry-After header on 429 responses
- • Use exponential backoff for 5xx errors (1s, 2s, 4s, 8s)
- • Retry up to 5 times, then surface error to the user
Don’t
- • Retry 4xx errors except 429: they are deterministic
- • Hammer the API after 429: wait the full Retry-After period
- • Retry POST /activations without checking idempotency
Recommended retry pattern
# Pseudocode — exponential backoff with Retry-After
attempt = 0
while attempt < 5:
response = call_api()
if response.status == 200:
break # success
if response.status == 429:
wait = response.headers.get('Retry-After', 2 ** attempt)
sleep(wait)
attempt += 1
continue
if response.status >= 500:
sleep(2 ** attempt) # exponential
attempt += 1
continue
raise APIError(response) # 4xx other than 429Idempotency
Some operations charge your wallet. Retrying naively can cause double charges.
POST /api/v1/activations is not idempotent
A retried request that the server already processed creates a second activation and a second charge. Never retry blindly after a timeout or a connection error.
Recovery after a timeout or unclear response
- Do not resend the POST. Call
GET /api/v1/activations?status=PENDING,WAITING&limit=50with the same API key. - Match by
service.code,country.isoCodeandcreatedAtwithin a few seconds of your original request time. Results are newest first; follownextCursorif needed. - Step3
- If no matching activation appears within 2 minutes, it's safe to buy again: send a new POST.
- If you do nothing, an activation that receives no SMS expires automatically and is refunded in full.
refundTxnin the list shows the refund.
If you run several purchases for the same service and country in parallel, matching by time is not exact. Keep at most one in-flight purchase per service/country pair.
Changes
Dated changes to error behaviour. Dates marked planned are not live yet.
2026-10-20 (planned)
- The SMS-Activate compatible endpoint now answers REQUEST_LIMIT for the concurrency limit and for the anti-abuse limit (previously ERROR_SQL).
- The 502 error message carries our mapped code instead of the raw upstream code, on SMS and eSIM endpoints alike. The format "Upstream error: <CODE>" (eSIM: "Upstream eSIM error: <CODE>") is unchanged.
- The REST anti-abuse 429 body gains a code field (ANTI_ABUSE_THROTTLE). This is additive; existing fields are unchanged.
- Catalog responses gain a new upstreamCode field. The legacy service code field keeps returning the same value during the transition period.