Error Reference

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.

CodeStatusMeaning
400Bad RequestRequest validation failed (missing or invalid parameters)
400Bad RequestInvalid email site format (code EMAIL_SITE_INVALID): applies to email activation creation and reorder. Previously this case returned 500.
401UnauthorizedAuthentication required or invalid API key
402Payment RequiredInsufficient wallet balance to complete the action
403ForbiddenAuthenticated, but not authorized for this resource
404Not FoundResource not found (e.g. activation ID does not exist)
409ConflictRequest conflicts with current state (e.g. activation already completed)
422Unprocessable EntityRequest is well-formed but semantically invalid
422Unprocessable EntityEmail site not supported (code EMAIL_SITE_NOT_SUPPORTED): applies to email activation creation and reorder. Previously this case returned 500.
429Too Many RequestsRate limit exceeded: see Retry-After header
429Too Many RequestsConcurrent activation limit: JSON code ACTIVATION_CONCURRENCY_LIMIT (fields limit, open). Wait, then retry.
429Too Many RequestsAnti-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.
500Internal Server ErrorUnexpected server error: retry with exponential backoff
502Bad GatewayUpstream 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.
503Service UnavailableUpstream 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.

CodeMeaning
UPSTREAM_BUSYThe provider is busy or limiting requests. Retry later with backoff.
UPSTREAM_REFUSEDThe provider refused the request. Do not retry it unchanged; contact support if it persists.
UPSTREAM_PRICE_MISMATCHThe price changed since you read it. Fetch the current price and retry.
UPSTREAM_INVALID_REQUESTThe 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_ERRORAny other upstream failure. Retry later.
BANNED_EMAILThe email address is blocked for this service. Request a different address.
NO_ACTIVATIONThe activation was not found upstream.
EARLY_CANCEL_DENIEDCancellation 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 CodeHTTPMeaning
BAD_KEY401Invalid or missing API key
BAD_ACTION400Action parameter missing or malformed
BAD_SERVICE400Service code not recognized
BAD_COUNTRY400Country parameter not recognized
BAD_STATUS400Invalid status value for setStatus
WRONG_ACTION400Action name not supported
NO_BALANCE402Insufficient wallet balance
NO_NUMBERS404No numbers available for this service+country combination
NO_ACTIVATION404Activation ID not found or not yours
RATE_LIMITED429Rate limit exceeded: slow down or wait for reset
REQUEST_LIMIT200From 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_SQL500Internal 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.

short
5
per 1 second
medium
30
per 10 seconds
long
100
per 60 seconds

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: 27937

Cancel window

Every activation carries the two fields that decide a cancel, so your client never has to discover the answer with a rejected request.

cancellableAtWhat it meansDELETE
nullThe activation has reached a final state, a received code included. It can never be cancelled.409
futureThe early-cancel cooldown is still running. Cancel opens at this timestamp.400
pastCancel 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 429

Idempotency

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

  1. Do not resend the POST. Call GET /api/v1/activations?status=PENDING,WAITING&limit=50 with the same API key.
  2. Match by service.code, country.isoCode and createdAt within a few seconds of your original request time. Results are newest first; follow nextCursor if needed.
  3. Step3
  4. If no matching activation appears within 2 minutes, it's safe to buy again: send a new POST.
  5. If you do nothing, an activation that receives no SMS expires automatically and is refunded in full. refundTxn in 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.

Need more details?

Go back to the main docs for endpoints and request examples.