Skip to content
API documentation

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

  1. Create a session — POST /sessions returns an authorization_url.
  2. Redirect the customer — they sign in to DigiLocker and approve the documents you requested.
  3. Get notified — we send the kyc_session.authorized webhook and redirect the customer to your redirect_url.
  4. Fetch data — call the document endpoints with the session ID.

Environments

TestLive
API key prefixkk_test_kk_live_
DigiLockerSandbox with sample dataReal DigiLocker
BillingFreeCharged 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.