> ## 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.

# Quickstart

> Get credentials, make your first idto verification call, and read the response, in one pass.

<video controls src="https://idto-sdk-usage-demo-bucket.s3.ap-south-1.amazonaws.com/docs/v1/video/quickstart-first-call-v2.mp4" poster="https://idto-sdk-usage-demo-bucket.s3.ap-south-1.amazonaws.com/docs/v1/video/quickstart-first-call-v2.jpg" />

Prefer a collection? Import the [Postman collection](https://idto-sdk-usage-demo-bucket.s3.ap-south-1.amazonaws.com/docs/v1/postman/idto-api-2026-10.postman_collection.json) and set your base URL and key pair in its variables.

**1. Get credentials**

Every call to idto needs two headers: `X-Client-ID` and `X-API-Key`. Ask your idto account manager for staging keys and build against `https://dev.idto.ai`. Staging calls reach live verification sources and deduct staging credits, so use only identities you are authorised to verify. Production keys come from the dashboard after go-live; then switch the base URL to `https://prod.idto.ai`.

| Environment | Base URL | Notes |
| - | - | - |
| Production | `https://prod.idto.ai` | Keys from the dashboard after go-live. Billed. |
| Staging | `https://dev.idto.ai` | Keys on request from your idto account manager. Calls reach live sources, so use identities you are authorised to verify. Staging credits are deducted from your staging account. |

See [Environments](https://idto.mintlify.site/environments.md) and [Authentication](https://idto.mintlify.site/authentication.md) for the detail.

```bash theme={null}
export IDTO_CLIENT_ID="your_client_id"
export IDTO_API_KEY="your_api_key"
```

**2. Check your keys**

Confirm the key pair before you spend anything. `POST /auth/sdk/token` exchanges it for a short-lived token: it reaches no verification source and deducts no credits, so the result depends only on your keys. Send your client ID as `client_id` and your API key as `client_secret`.

```bash cURL theme={null}
curl --request POST \
  --url https://dev.idto.ai/auth/sdk/token \
  --header "Content-Type: application/json" \
  --data "{\"client_id\": \"$IDTO_CLIENT_ID\", \"client_secret\": \"$IDTO_API_KEY\"}"
```

A valid pair returns HTTP `200`. This is what staging returned on 2026-10-04, with the token shortened:

```json theme={null}
{
  "access_token": "eyJ...",
  "token_type": "bearer",
  "expires_in": 900,
  "session_id": null
}
```

A wrong or inactive pair returns HTTP `401` with `{"detail": "Invalid client credentials"}` or `{"detail": "Client is inactive"}`. Fix the keys before going further. You can discard the token: verification calls use the two headers, not this token. See [Authentication](https://idto.mintlify.site/authentication.md) for when the token is used.

**3. Make a verification call**

`POST /v2/verify/pan_validation` checks whether a PAN exists and is active, and returns the name and holder category on file. It requires `user_consent: true` in the body.

```bash cURL theme={null}
curl --request POST \
  --url https://dev.idto.ai/v2/verify/pan_validation \
  --header "X-Client-ID: $IDTO_CLIENT_ID" \
  --header "X-API-Key: $IDTO_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "pan_number": "ABCDE1234F",
    "user_consent": true
  }'
```

```python Python theme={null}
import os
import requests

response = requests.post(
    "https://dev.idto.ai/v2/verify/pan_validation",
    headers={
        "X-Client-ID": os.environ["IDTO_CLIENT_ID"],
        "X-API-Key": os.environ["IDTO_API_KEY"],
    },
    json={"pan_number": "ABCDE1234F", "user_consent": True},
)
print(response.status_code, response.json())
```

**4. Read the outcome**

Branch on the HTTP status and `error_code`, never on `status` alone. These are the three outcomes of a well-formed call:

| Outcome | HTTP | `status` | `error_code` | `data` | `billed` |
| - | - | - | - | - | - |
| Match | `200` | `success` | `null` | The result | `true` |
| No record | `200` | `success` | `IDTO_202` | `null` | `true` |
| Invalid PAN | `400` | `error` | `IDTO_001` | Absent | `false` |

`ABCDE1234F` is a placeholder, not a PAN anyone holds, so it never returns a match. On staging it comes back as either of the last two rows, depending on which verification source serves your account: the source either rejects it as invalid (`IDTO_001`, free) or looks it up and finds no record (`IDTO_202`, billed). Both prove your integration works. On 2026-10-04 staging returned the invalid row:

```json theme={null}
{
  "status": "error",
  "message": "Invalid PAN format. Please check and retry.",
  "error_code": "IDTO_001",
  "chargeble": "false",
  "user_consent": "false",
  "billed": false
}
```

`chargeble` and `user_consent` are legacy fields kept for older integrations: read `billed` instead. A match looks like this, with placeholder values; `category` comes from the fourth character of the PAN, for example `individual` for `P`:

```json theme={null}
{
  "status": "success",
  "message": "PAN verified successfully.",
  "error_code": null,
  "data": {
    "pan_name": "RAHUL SHARMA",
    "pan_number": "ABCDE1234F",
    "pan_status": "Valid",
    "category": "individual"
  },
  "chargeble": "true",
  "user_consent": "true",
  "billed": true,
  "tranx_id": "00000000-0000-0000-0000-000000000000",
  "timestamp": "2026-01-01T00:00:00.000000+00:00"
}
```

Keep the `tranx_id` from every 2xx response: it identifies the call when you contact support. `IDTO_001` means the input needs fixing, so ask the user to check and re-enter it rather than retrying. The other outcomes:

| HTTP | `error_code` | Meaning | Billed |
| - | - | - | - |
| 422 | `IDTO_001` | A required field such as `user_consent` is missing, or has the wrong type | No |
| 400 | `IDTO_005` | `user_consent` is `false` | No |
| 401 | none | Missing or wrong key pair | No |
| 429 | `IDTO_006` | The verification source is limiting requests, retry with backoff. See [Rate limits](https://idto.mintlify.site/concepts/rate-limits.md) | No |
| 503 | `IDTO_008` | Busy, retry with backoff | No |

A call is charged when it finishes with a 2xx response whose `status` is `"success"`, unless a verification session already pays for that step; see [Billing](https://idto.mintlify.site/concepts/billing-consent.md#billing) for the cases that follow from that rule. Every raised error has the shapes listed in [Error response shapes](https://idto.mintlify.site/concepts/request-response.md#error-response-shapes). To retry safely after a timeout or a `503`, send an `Idempotency-Key` header with a value you generate per verification, and reuse it on the retry with the same body. See [Idempotency](https://idto.mintlify.site/concepts/idempotency.md).

## Next steps

> [card] [Go-live checklist](https://idto.mintlify.site/go-live-checklist.md)
>
> What to confirm before production.

> [card] [Error codes](https://idto.mintlify.site/reference/v2-error-codes.md)
>
> Every code, its HTTP status and whether it bills.

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


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