> ## Documentation Index
> Fetch the complete documentation index at: https://idto.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Rate limits

> What limits apply to server and SDK calls, what you receive when you hit one, and how to retry.

## What a 429 means

idto applies no per-key request quota to calls made with `X-Client-ID` and `X-API-Key`. A 429 from a verification call means one of three things, and the body tells you which:

| Body | Meaning | Retry? |
| - | - | - |
| `error_code: "IDTO_006"` | The verification source behind the product is limiting requests or could not take this one in time | Yes, with backoff |
| `error_code: "IDTO_206"` | The OTP attempts for this `okyc_get_result` session are used up | No, request a new OTP |
| `detail: "This verification session has used its allowance. Start a new session."` | An SDK token bound to one verification session has used its call allowance | No, start a new session |

None of these are billed. Capacity on idto's side is protected by load shedding, which answers 503, not 429.

## Server-to-server calls

| HTTP | `error_code` | When | What to do |
| - | - | - | - |
| 503 | `IDTO_008` | idto is shedding load, or a verification source is not responding | Retry with exponential backoff and jitter |
| 429 | `IDTO_006` | The verification source behind the product is limiting requests | Retry with backoff; spread bulk jobs over time |
| 503 | `IDTO_103` or `IDTO_403` | The source could not complete this verification right now | Retry shortly |

None of these are billed. For bulk jobs, run a bounded worker pool rather than firing every request at once, and treat a burst of `IDTO_008` as a signal to reduce concurrency.

### How load shedding works

Each idto server holds a fixed number of slots for calls that are waiting on a verification source. When every slot is busy, a new request does not queue behind them: it is answered at once with `IDTO_008` and HTTP 503, before any verification starts and before any charge. That is deliberate. A fast 503 you can retry is better than a request that hangs until your own timeout fires and leaves you unsure whether it ran.

On v2 the body is the standard error envelope:

```json theme={null}
{
  "status": "error",
  "message": "The verification service is facing downtime due to issues from the source. Please drop a mail to tech@idto.ai, and try again later.",
  "error_code": "IDTO_008",
  "data": null,
  "billed": false,
  "chargeble": "false",
  "user_consent": "false"
}
```

On v1 the same condition returns 503 with the fields nested under `detail`, `status` set to `"failed"`, and a `Retry-After: 5` header. Honour `Retry-After` whenever it is present. On v1 a source limit is also a 429 under `detail`: usually an object with `error_code: "IDTO_006"`, and on some products only a `message` string. See [Error response shapes](https://idto.mintlify.site/concepts/request-response.md#error-response-shapes).

## OTP attempts

`okyc_get_result` allows **5** OTP submissions per `session_id`. Only a wrong OTP (`IDTO_205`, HTTP 422) uses up an attempt; a submission that fails for any other reason, such as a busy source, is given back. Once the attempts are used, further submissions for that `session_id` return `IDTO_206` with HTTP 429 and are not sent to the source. Do not retry `IDTO_206`: ask the user to request a new OTP with `okyc_generate_otp`, which returns a new `session_id`.

## SDK sessions

When an SDK token is bound to one verification session, for example the token behind a verification link, it can only be used for that session. Each bound session allows **60** verification calls. Past that, calls return:

```json theme={null}
{ "detail": "This verification session has used its allowance. Start a new session." }
```

with HTTP `429`. Start a new session for the user. Related session errors:

| HTTP | `detail` | Cause |
| - | - | - |
| 403 | `This client must supply the verification session it is working on.` | The session header is missing |
| 403 | `This token belongs to a different verification session.` | The token was minted for another session |
| 403 | `That verification session does not belong to this client.` | The session is unknown or belongs to a different account |
| 409 | `That verification session is no longer in progress.` | The session already finished |

None of these session errors is worth retrying unchanged. Each one means the user needs a fresh session, or your app is sending the wrong session token.

## Verification links

The hosted page behind a verification link is opened by your user, not by your server, and it has two limits of its own. Too many attempts from one network in a minute return 429 with `Too many attempts from this network. Wait a minute and try again.` A link whose account balance is below the minimum needed to run it also returns 429, with a message asking the user to contact your business. Recharge from **Billing** in the dashboard to clear the second one.

## Which 429 to retry

Three different things return HTTP 429 on a verification call, and only one of them clears on its own. Branch on `error_code` or `detail`, not on the status alone:

| Response | Retry? |
| - | - |
| 429 `IDTO_006` | Yes, with backoff |
| 429 `IDTO_206` | No, start a new OTP session |
| 429 with the session allowance `detail` | No, start a new SDK session |
| 503 `IDTO_008`, `IDTO_103`, `IDTO_403` | Yes, with backoff |

## Retry pattern

```python theme={null}
import random
import time
import uuid

import requests

RETRYABLE_CODES = {"IDTO_006", "IDTO_008", "IDTO_103", "IDTO_403"}


def verify(url, headers, body, attempts=5):
    headers = {**headers, "Idempotency-Key": str(uuid.uuid4())}
    for attempt in range(attempts):
        response = requests.post(url, headers=headers, json=body, timeout=60)
        if response.status_code < 400:
            return response
        is_json = response.headers.get("content-type", "").startswith("application/json")
        code = response.json().get("error_code") if is_json else None
        if code not in RETRYABLE_CODES:
            return response
        time.sleep(min(2 ** attempt, 30) + random.random())
    return response
```

The key is created once, outside the loop, so a request that did complete is replayed on the next attempt instead of run and billed twice. See [Idempotency](https://idto.mintlify.site/concepts/idempotency.md).

## Production checklist

* A bounded worker pool for bulk jobs, sized so `IDTO_008` stays rare.
* Exponential backoff with jitter, capped, and a maximum number of attempts.
* Retries only on `IDTO_006`, `IDTO_008`, `IDTO_103` and `IDTO_403`, never on 4xx validation errors.
* An `Idempotency-Key` on every v2 retry.
* Alerts on a sustained rise in `IDTO_008`, which means your concurrency is too high for current capacity.

Was this page helpful? Email us at [tech@idto.ai](mailto:tech@idto.ai?subject=Docs%20feedback%3A%20Rate%20limits) with the page link.


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