> ## Documentation Index
> Fetch the complete documentation index at: https://exchanger-api.iexexchanger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors and retries

> Read Exchanger API HTTP errors, handle rate limits and quotas, and retry requests safely after a failure.

When Exchanger API returns an error, read the HTTP status and `error.code`. For example, after `429 rate_limit_exceeded`, wait for the stated delay. After `429 quota_exceeded`, wait until the quota resets.

## What an error looks like

In this example, the per-minute limit resets in 12 seconds.

```http theme={null}
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
X-Request-Id: request-rate-17
X-Correlation-Id: exchange-17
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 12
Retry-After: 12
```

```json theme={null}
{
  "state": 1,
  "message": "Too many API requests. Try again later.",
  "code": 429,
  "error": {
    "code": "rate_limit_exceeded",
    "type": "rate_limit_exceeded",
    "details": {
      "limit": 60,
      "retry_after": 12
    }
  },
  "meta": {
    "request_id": "request-rate-17",
    "correlation_id": "exchange-17",
    "timestamp": "2026-11-21T18:40:00.000000Z"
  }
}
```

| Field | How to use it |
| - | - |
| `state` | `1` means an error. Successful responses use `0` and return `result`. |
| `code` | The HTTP status in the response body. |
| `error.code` | The machine-readable code for choosing a handler. `error.type` mirrors it. |
| `message` | A human-readable log message. It can vary by locale. |
| `error.details` | An object with error data or `null`. For form errors, check `fields` and any machine-readable codes in `issues[]`. |
| `meta` | Request and correlation identifiers and the response timestamp. |

Log any unrecognized error code and fall back to handling the HTTP status. For a response from a proxy, use the HTTP status and headers. For a network timeout, follow the retry rules below.

## What to fix in a request

| Response | Action |
| - | - |
| `401` with `api_token_required`, `authentication_required`, or `token_inactive` | Check the `Authorization: Bearer …` header, the token status, and the exchange domain. |
| `401` with `signature_required` or `invalid_signature` | Check the [HMAC v2 signature](https://exchanger-api.iexexchanger.com/en/start/authentication.md). Compare the path, query, exact body bytes, and signed idempotency key. |
| `401` with `signature_expired` or `signature_replay` | Synchronize your clock. Use a fresh timestamp and nonce and sign each new attempt. |
| `403` with `scope_denied` or `ip_not_allowed` | Check `error.details.required_scopes` if present, and compare the outbound IP with `error.details.ip`. Ask the operator about account restrictions. |
| `403 api_user_disabled` | Ask the operator to enable API access for this account before retrying. |
| `403 api_admin_account_denied` | Use a dedicated integration account permitted by the operator. |
| `403 account_banned` | Stop requests. Check `error.details.ends_at` when supplied and contact the operator about access. |
| `404 webhook_endpoint_not_found` | List subscriptions with the same credentials and check the endpoint ID before repeating the request. |
| `404 not_found` or `405 method_not_allowed` | Verify the identifier, owner, path, and HTTP method. The API can return `404` for records inaccessible to your key. |
| `409` with `idempotency_in_progress` | The first attempt is still running. Retry with the same key and input after `Retry-After` or when the lock ends, if the response gives its expiry. |
| `409` with `idempotency_conflict` | Compare the body and key with the original request. For other conflict codes, check the details of the operation. |
| `413` | Check the JSON size. The default limit is 1 MiB and your installation can set a different value. File uploads have separate limits. |
| `422` with `validation_failed`, `invalid_filter`, or `invalid_idempotency_key` | Correct the indicated fields, filter, or key. For `invalid_cursor`, restart from the first page with the desired filters and sort order. |
| `422` with `webhook_endpoint_limit_exceeded` | Read `error.details.max`. The [webhook list](https://exchanger-api.iexexchanger.com/en/api-reference/webhooks/get-private-webhooks.md) shows current subscriptions and their limit. |

### Read the reason for a refusal

| Response | How to handle it |
| - | - |
| `403 ip_not_allowed` with `error.details.reason: "tor_access_denied"` | The exchange restricts Tor access. Stop automatic retries and contact the operator about the access policy. |
| `409 http_error` with `error.details.reason: "protocol_retired"` | A historical webhook delivery or saved webhook management response uses a retired protocol. Check the current subscription and resource before sending a new test. |
| `422 validation_failed` with `error.details.issues[].code: "unsupported_event_type"` | When creating or updating a webhook subscription, select an event from the catalog returned by `GET /api/v3/private/webhooks`. |
| Other `http_error` | A client-side HTTP failure has no more specific API code. Use the actual HTTP status and check the request before retrying. |
| `500 server_error` or another `5xx` with that code | Record the request ID. Check the outcome of a write before retrying. A proxy can also return its own error body. |

For card verification, `verification_protection` carries the reason in `error.details.reason`. The HTTP status depends on that reason.

| HTTP | Reason | Action |
| - | - | - |
| `403` | `verified_contact_required` | Complete contact verification before submitting again. |
| `409` | `submission_in_progress`, `admission_expired`, `idempotency_conflict` | Check the previous submission and its input. Honor any `Retry-After`. |
| `429` | `pending_limit`, `rate_limit`, `daily_limit`, `rejection_cooldown`, `network_limit`, `reused_photo` | Check pending submissions or the supplied photo and wait for the relevant restriction to clear. Honor any `Retry-After`. |
| `503` | `paused` | The exchange has paused submissions. Check with the operator before trying again. |

A successful [order preflight](https://exchanger-api.iexexchanger.com/en/guides/exchange/quote-and-preflight.md) can still report field problems in `result.preflight.validation_issues`. A successful order read can return a pending or unsuccessful payment state. Check the [order and payment status](https://exchanger-api.iexexchanger.com/en/guides/exchange/payment-and-status.md) before starting another payment.

## When to retry after 429

The API first applies a per-minute outbound IP limit. A separate token limit applies after authentication for private requests. The default base limit is 120 requests per minute. Integrations that share an IP can share the network limit. Use the values returned by your installation.

| Header | Meaning |
| - | - |
| `X-RateLimit-Limit` | The applied rate limit. |
| `X-RateLimit-Remaining` | Requests left in the current window. |
| `X-RateLimit-Reset` | Seconds until the window resets. |
| `Retry-After` | The retry delay. For `rate_limit_exceeded`, it can also appear as `error.details.retry_after`. |

Daily and monthly quotas are tracked separately for the current key. On `quota_exceeded`, read `error.details.period` and schedule the next attempt after `error.details.resets_at` or `X-Api-Quota-Reset`. Read [`GET /private/usage`](https://exchanger-api.iexexchanger.com/en/api-reference/platform/get-private-usage) with the `public-api:usage:read` scope to check current usage and remaining quota. This read also consumes quota. Once the key reaches its quota, the read itself can return `429 quota_exceeded`. Use the reset time from that response. If both quotas are exhausted, the API reports the daily period first. The monthly quota can still block the next request after the daily reset.

| Quota header | Meaning |
| - | - |
| `X-Api-Quota-Period` | The period of the main quota headers, `day` or `month`. Regular responses use `day`. |
| `X-Api-Quota-Limit`, `X-Api-Quota-Used`, `X-Api-Quota-Remaining` | Limit, usage, and remaining quota for that period. An unlimited limit or remaining quota is reported as `unlimited`. |
| `X-Api-Quota-Reset` | The reset time in ISO 8601 format when available. |
| `X-Api-Quota-Month-Limit`, `X-Api-Quota-Month-Remaining`, `X-Api-Quota-Month-Reset` | Monthly values included in regular responses. |

## What to do after 503, 5xx, or a timeout

* **`503 site_maintenance`.** The API temporarily rejects write requests. Use `GET` to read the current state while the API is available. Retry commands after `Retry-After`.
* **`503 api_disabled`.** Ask the operator whether the API is enabled on this installation.
* **Another `5xx` or network timeout.** Retry reads with increasing delay. For a command, first check whether it produced a result. To retry an idempotent command, retain the original key and input, then [sign the request again](https://exchanger-api.iexexchanger.com/en/guides/reliability/idempotency.md).

## What to include when reporting a problem

Record the method, path, time, HTTP status, and `error.code`. Include `X-Request-Id` for one attempt and `X-Correlation-Id` for a sequence of related requests. Both IDs are also in `meta`. Remove tokens, signatures, secrets, and personal data before sharing the report with the exchange operator.

> [accordion] Diagnose the API response with an assistant
>
> ```text theme={null}
> Diagnose an Exchanger API v3 error and give me a safe next action.
> I have [METHOD_AND_PATH], [HTTP_STATUS] and [REDACTED_RESPONSE].
> If I received no response, treat the request outcome as unknown.
>
> Check the relevant operation and the retry rules.
> https://exchanger-api.iexexchanger.com/en/api
> https://exchanger-api.iexexchanger.com/en/guides/reliability/errors
> https://exchanger-api.iexexchanger.com/en/guides/reliability/idempotency
>
> Use the HTTP status, error.code, redacted error.details and any rate limit
> or quota headers. For 429, distinguish rate_limit_exceeded from quota_exceeded.
> If a proxy returned a response without JSON, state what the response supports.
> When uncertain, give a check that would distinguish the likely causes.
>
> Report the likely cause, first diagnostic check, reference links and retry decision.
> After a write times out, verify the operation before retrying. Reuse the original
> idempotency key with a fresh signature only when the method supports it.
> List what to send the operator, including request_id and correlation_id.
> Analyze the supplied evidence without making requests or asking for credentials
> or payment details.
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.