Basics

Errors

Errors use normal HTTP status codes and always return the same JSON shape:

403 Forbidden
{
    "ok": false,
    "error": {
        "code": "insufficient_scope",
        "message": "This key does not have the balance:read permission. Create a key with it in the dashboard.",
        "docs": "https://dev.adolfjon.uz/docs/errors#insufficient_scope",
        "required_scope": "balance:read"
    },
    "meta": {
        "request_id": "req_9d1f0a2b3c4e5f6a7b80"
    }
}

Branch on error.code, not on the message: messages may get clearer over time, codes never change within v1. Some errors add fields such as param, required_scope or retry_after.

Every response, success or error, carries meta.request_id and an X-Request-Id header. Include it when you contact support; it lets us find your exact request.

All codes

CodeHTTPMeaning and what to do
invalid_request400A parameter is wrong. error.param names it.
unauthorized401No key, or the key is not valid.
key_expired401The key passed its 90-day expiry. Roll it or create a new one.
key_revoked401The key was revoked.
account_blocked403The account that owns the key cannot use the API.
app_not_approved403Live key used before the app was approved. Use a test key until then.
app_rejected403The app was not approved.
app_suspended403The app is suspended; all its keys stop working.
insufficient_scope403The key lacks the permission. error.required_scope names it.
ip_not_allowed403The key has an IP allowlist and this IP is not on it.
not_found404No such endpoint or object.
method_not_allowed405v1 is read-only: only GET works.
rate_limited429Over the per-minute limit. Wait error.retry_after seconds.
daily_quota_exceeded429Over the daily limit. It resets at 00:00 Tashkent time (UTC+5).
server_error500Our fault. Retry with backoff and send us the request_id if it repeats.
api_disabled503The API is turned off for maintenance. See the status page.
api_unavailable503The API is not available yet.

Retrying

  • 4xx: do not retry the same request; fix it first. The only exception is 429: wait retry_after seconds.
  • 5xx: retry with backoff (for example 1 s, 2 s, 4 s, up to 5 tries).