Docs

Developers

Errors & limits

JSON errors always include a human message and a stable code. Branch on code in software; show error to people.

Error shape

Body is { "error": "...", "code": "..." }. HTTP status matches the table below.

Codes

codeHTTPWhen
MISSING_API_KEY401No X-API-Key / Bearer token
INVALID_API_KEY401Key format or secret is wrong
ACCOUNT_SUSPENDED403Account disabled
INSUFFICIENT_BALANCE402Wallet cannot cover the charge
SERVICE_UNAVAILABLE404 / 502No stock, or the service is temporarily down
RENTAL_NOT_FOUND404Unknown id, or it belongs to another account
CANCEL_NOT_ALLOWED404Only WAITING temporary rentals can be cancelled
INVALID_COUNTRY400Country not in GET /api/v1/countries
VALIDATION_ERROR400Missing or invalid JSON fields
RATE_LIMITED429Too many requests — honor Retry-After

Idempotency

For POST /api/v1/rentals, POST .../renew, and long-term create, send Idempotency-Key: <uuid> (max 256 chars). Reusing the same key with the same body within 24 hours returns the original response instead of charging twice.

  • IDEMPOTENCY_IN_PROGRESS — 409, same key still processing
  • IDEMPOTENCY_KEY_REUSED — 422, same key but different body
  • IDEMPOTENCY_KEY_REQUIRED — 400, bulk long-term rent (quantity > 1) without a key

Rent without a key is not safe to retry

Two clicks without Idempotency-Key can create two numbers and two charges. Always send a unique key per intended rent.

Rate limits

Per API key (default 100 requests/minute). Public endpoints are limited per IP. HTTP 429 includes a Retry-After header and code: "RATE_LIMITED".