Introduction
Overview of the KYC Karo REST API for DigiLocker KYC: base URL, environments, response format and the verification flow.
The KYC Karo API lets you verify customers with documents from DigiLocker, the Government of India's digital document wallet. You create a consent session, send your customer to DigiLocker, and fetch the documents they approve. We handle OAuth 2.0, PKCE, token storage, token refresh and file integrity checks.
Base URL
https://kyckaro.in/api/v1
All requests must use HTTPS in production. Send form-encoded or JSON bodies and include Accept: application/json.
How a verification works
- Create a session —
POST /sessionsreturns anauthorization_url. - Redirect the customer — they sign in to DigiLocker and approve the documents you requested.
- Get notified — we send the
kyc_session.authorizedwebhook and redirect the customer to yourredirect_url. - Fetch data — call the document endpoints with the session ID.
Environments
| Test | Live | |
|---|---|---|
| API key prefix | kk_test_ | kk_live_ |
| DigiLocker | Sandbox with sample data | Real DigiLocker |
| Billing | Free | Charged per successful call |
Response format
Every response uses the same envelope. Successful responses contain data; failed responses contain error. The meta.request_id is also returned in the X-Request-Id header — include it when contacting support.
{ "success": true, "data": { … }, "meta": { "request_id": "9b1f…", "charged": 10.0 } }
{ "success": false, "error": { "code": "insufficient_balance", "message": "…" }, "meta": { "request_id": "…", "charged": 0 } }
Versioning
The current version is v1, included in the URL. We only make backwards-compatible changes within a version, such as adding new fields. Build your integration to ignore unknown fields.