Digi Locker

2 endpoints · Core API

DigiLocker is a flagship initiative of Ministry of Electronics & IT (MeitY) under Digital India programme. DigiLocker aims at 'Digital Empowerment' of citizen by providing access to authentic digital documents to citizen's digital document wallet. DigiLocker is a secure cloud based platform for storage, sharing and verification of documents & certificates.

Benefits

DigiLocker offers users a safe platform for document access on a public cloud. It serves as a platform for the digital issuance and verification of documents and certificates, eliminating the need for paper copies. The issued documents that are accessible through DigiLocker are accepted the same as the original, physical documents.

Business use case — please read before integrating

Prefer the Aadhaar-based fetch flow over the mobile-number flow. Based on direct guidance from the DigiLocker team, the Aadhaar flow (using_aadhaar: true) is more reliable and has a higher success rate for fetching user data. Wherever possible, encourage your users to authenticate with Aadhaar rather than mobile number.

Why the mobile-number flow can fail: If a user's mobile number is registered with MeriPehchaan but their KYC details are not fully compliant or up to date in their DigiLocker account, the login/fetch can fail. In that case the user must first log in to their DigiLocker account, manually correct or complete the required KYC information, and then retry with the same mobile number.

Recommended best practice: For the smoothest experience and the highest fetch success rates, default your integration to the Aadhaar-based flow (using_aadhaar: true). If you do offer the mobile-number flow, handle failures gracefully — prompt the user to retry with Aadhaar, or guide them to log in to DigiLocker and complete their KYC before retrying.

Authentication flows

Aadhaar flow (using_aadhaar: true):

  1. User enters their Aadhaar number.
  2. User enters the OTP sent to the mobile number linked to that Aadhaar.
  3. User enters their DigiLocker PIN. (If forgotten, the user can choose "Forgot PIN" and reset it using their date of birth.)
  4. User gives consent, and the requested documents/details are fetched.

Mobile-number flow (using_aadhaar: false):

  • The user can authenticate with their mobile number, or alternatively with their username, Aadhaar number, PAN, or Driving Licence.
  • The only requirement is that the user already has a DigiLocker account set up.
POST

/api/v1/digilocker/init

#

Get digilocker request url details The credit is deducted from your wallet now, when the link is created, but this response shows `isBillable: false` because the charge is not final yet. It becomes final on the first document fetch (that response shows `isBillable: true`), where each additional document uses one more credit. If the link expires before the user completes it, the credit is refunded automatically.

docs.signcare.io/core/api/aadhaar/digi-locker/#post-api-v1-digilocker-init

Request parameters:

        → <b>docs (required):</b> Array of document type codes: ADHAR, PANCR, DRVLC, RVCER.

        → <b>webhookUrl (conditional):</b> Required unless a default webhook URL is configured for this API on your account.

        → <b>redirectUrl (optional):</b> Where to send the user after the DigiLocker process.

        → <b>mobileNumber (optional):</b> Used only when `using_aadhaar` is false.

        → <b>using_aadhaar (optional, default false):</b> Set true for the Aadhaar-based sign-in.

        → <b>consent (required, default "Y"):</b> Must be Y. A value of N is rejected.

        → <b>request_id (optional):</b> Your own unique ID to track this request. A UUID is generated if omitted.

Headers

  • X-API-KEY
    stringrequired
    Your secret API key for the environment you are calling (Stage and Live use different keys).
  • X-API-APP-ID
    stringrequired
    The App ID issued together with the key.
  • Content-Type
    stringrequired
    application/json

Body parameters

application/json
  • consent
    stringrequired
    Required. The end user's consent to this verification. Send `Y`.
    minLength 1default Y
  • consent_text
    stringrequired
    Required. The consent statement shown to the end user. Send the default text from the sample.
    minLength 1default I hear by declare my consent agreeme…
  • request_id
    stringoptional
    Optional. Your own id to correlate this call in your logs. A unique id is generated if you leave it out.
    nullable
  • docs
    array<string>required
    Required. Array of DigiLocker document type codes to fetch: ADHAR (Aadhaar), PANCR (PAN card), DRVLC (driving licence), RVCER (vehicle registration).
    default ["ADHAR","PANCR"]
  • webhookUrl
    stringconditional
    Conditional: required unless a default webhook URL is configured for this API on your account. HTTPS URL that receives the DigiLocker results. A value sent here overrides the account default.
    nullabledefault https://example.com/digilocker-webho…
  • redirectUrl
    stringoptional
    Optional. URL to redirect the user to after the DigiLocker process is completed.
    nullabledefault https://example.com/digilocker-done
  • mobileNumber
    stringoptional
    Optional. 10-digit mobile number of the user, used only when using_aadhaar is false. If no DigiLocker account exists for this number, the user is moved to the Aadhaar flow. Format is not validated.
    nullabledefault 9876543210
  • using_aadhaar
    booleanoptional
    Optional. Defaults to false. Set true to have the user sign in with their Aadhaar number, an OTP and their DigiLocker PIN. Recommended for the highest fetch success rate.
    default false
Sample request body
{ "consent": "Y", "consent_text": "I hear by declare my consent agreement for fetching my information via SignCare API", "docs": [ "ADHAR", "PANCR" ], "webhookUrl": "https://example.com/digilocker-webhook", "redirectUrl": "https://example.com/digilocker-done", "mobileNumber": "9876543210", "using_aadhaar": false }

Responses

200OK
  • success
    booleanoptional
    No description.
  • statusCode
    integer (int32)optional
    No description.
    default 200
  • message
    stringoptional
    No description.
    nullabledefault XXXXX
  • data
    objectoptional
    Response model returned after initiating a DigiLocker session.
    4 fields
    • request_url
      stringoptional
      URL to redirect the user for DigiLocker authorization.
      nullable
    • request_timestamp
      string (date-time)optional
      Timestamp when the request was created.
    • expires_at
      string (date-time)optional
      Expiration timestamp for the DigiLocker session URL.
    • transection_Id
      stringoptional
      Unique transaction identifier for tracking the DigiLocker session.
      nullable
  • messages
    array<string>optional
    No description.
    nullable
  • request_id
    stringoptional
    No description.
    nullable
  • isBillable
    booleanoptional
    Whether this request was charged: true if it was, false if not. Errors always show false. Flows that finish later (ITR Fetch, SHCIL eStamp, DigiLocker, eSign) show false here, because the charge is made when the result is ready. eSign charges each signer when they complete signing. DigiLocker deducts the credit when the link is created and refunds it automatically if the link expires before the user completes it.
Example
{ "success": false, "statusCode": 200, "message": "XXXXX", "data": { "request_url": "string", "request_timestamp": "2026-01-01T00:00:00Z", "expires_at": "2026-01-01T00:00:00Z", "transection_Id": "string" }, "messages": [ "string" ], "request_id": "string", "isBillable": false }
400Bad Request
  • data
    objectoptional
    No description.
  • messages
    array<string>optional
    No description.
    nullable
  • request_id
    stringoptional
    No description.
    nullable
  • success
    booleanoptional
    No description.
    default false
  • message
    stringoptional
    No description.
    nullabledefault XXXXX
  • isBillable
    booleanoptional
    No description.
  • statusCode
    integer (int32)optional
    No description.
    default 400
Example
{ "data": {}, "messages": [ "string" ], "request_id": "string", "success": false, "message": "XXXXX", "isBillable": false, "statusCode": 400 }
401Unauthorized
  • data
    objectoptional
    No description.
  • messages
    array<string>optional
    No description.
    nullable
  • request_id
    stringoptional
    No description.
    nullable
  • success
    booleanoptional
    No description.
    default false
  • message
    stringoptional
    No description.
    nullabledefault XXXXX
  • isBillable
    booleanoptional
    No description.
  • statusCode
    integer (int32)optional
    No description.
    default 401
Example
{ "data": {}, "messages": [ "string" ], "request_id": "string", "success": false, "message": "XXXXX", "isBillable": false, "statusCode": 401 }
500Internal Server Error
  • data
    objectoptional
    No description.
  • messages
    array<string>optional
    No description.
    nullable
  • request_id
    stringoptional
    No description.
    nullable
  • success
    booleanoptional
    No description.
    default false
  • message
    stringoptional
    No description.
    nullabledefault XXXXX
  • isBillable
    booleanoptional
    No description.
  • statusCode
    integer (int32)optional
    No description.
    default 500
Example
{ "data": {}, "messages": [ "string" ], "request_id": "string", "success": false, "message": "XXXXX", "isBillable": false, "statusCode": 500 }
Code samplescurl · Node.js · Python
Stage: uat-ext.signcare.io
curl -X POST 'https://uat-ext.signcare.io/api/v1/digilocker/init' \ -H 'X-API-KEY: YOUR_API_KEY' \ -H 'X-API-APP-ID: YOUR_APP_ID' \ -H 'Content-Type: application/json' \ -d '{ "consent": "Y", "consent_text": "I hear by declare my consent agreement for fetching my information via SignCare API", "docs": [ "ADHAR", "PANCR" ], "webhookUrl": "https://example.com/digilocker-webhook", "redirectUrl": "https://example.com/digilocker-done", "mobileNumber": "9876543210", "using_aadhaar": false }'
GET

/api/v1/digilocker/details/{transactionId}

#

Get digilocker document details by transactionId. Returns exactly the same response structure as the Digilocker webhook. If the data is older than 30 days, it returns a response indicating it is permanently deleted. For the Aadhaar (ADHAR) document, DataXml contains the raw eAadhaar XML alongside the parsed Details.

docs.signcare.io/core/api/aadhaar/digi-locker/#get-api-v1-digilocker-details-transactionid

Headers

  • X-API-KEY
    stringrequired
    Your secret API key for the environment you are calling (Stage and Live use different keys).
  • X-API-APP-ID
    stringrequired
    The App ID issued together with the key.

Path parameters

  • transactionId
    stringrequired
    Required. The `transection_Id` value returned by the init call.

Responses

200OK
  • success
    booleanoptional
    No description.
  • statusCode
    integer (int32)optional
    No description.
    default 200
  • message
    stringoptional
    No description.
    nullabledefault XXXXX
  • data
    objectoptional
    No description.
    2 fields
    • transactionId
      stringoptional
      No description.
      nullable
    • docs
      array<object>optional
      No description.
      nullable
      Each item: 7 fields
      • issued
        objectoptional
        No description.
        11 fields
        • name
          stringoptional
          No description.
          nullable
        • type
          stringoptional
          No description.
          nullable
        • size
          stringoptional
          No description.
          nullable
        • date
          stringoptional
          No description.
          nullable
        • parent
          stringoptional
          No description.
          nullable
        • mime
          array<string>optional
          No description.
          nullable
        • uri
          stringoptional
          No description.
          nullable
        • doctype
          stringoptional
          No description.
          nullable
        • description
          stringoptional
          No description.
          nullable
        • issuerId
          stringoptional
          No description.
          nullable
        • issuer
          stringoptional
          No description.
          nullable
      • docType
        stringoptional
        No description.
        nullable
      • status
        stringoptional
        No description.
        nullable
      • fetchedAt
        string (date-time)optional
        No description.
        nullable
      • dataPdf
        stringoptional
        No description.
        nullable
      • dataXml
        stringoptional
        No description.
        nullable
      • details
        objectoptional
        No description.
        15 fields
        • name
          stringoptional
          No description.
          nullable
        • dob
          stringoptional
          No description.
          nullable
        • gender
          stringoptional
          No description.
          nullable
        • co
          stringoptional
          No description.
          nullable
        • address
          stringoptional
          No description.
          nullable
        • village
          stringoptional
          No description.
          nullable
        • subDistrict
          stringoptional
          No description.
          nullable
        • district
          stringoptional
          No description.
          nullable
        • state
          stringoptional
          No description.
          nullable
        • country
          stringoptional
          No description.
          nullable
        • pinCode
          stringoptional
          No description.
          nullable
        • aadhaarNumber
          stringoptional
          No description.
          nullable
        • kycDateTime
          stringoptional
          No description.
          nullable
        • photo
          stringoptional
          No description.
          nullable
        • addressDetails
          objectoptional
          No description.
          3 fields
          • addressLine1
            stringoptional
            No description.
            nullable
          • addressLine2
            stringoptional
            No description.
            nullable
          • addressLine3
            stringoptional
            No description.
            nullable
  • messages
    array<string>optional
    No description.
    nullable
  • request_id
    stringoptional
    No description.
    nullable
  • isBillable
    booleanoptional
    Whether this request was charged: true if it was, false if not. Errors always show false. Flows that finish later (ITR Fetch, SHCIL eStamp, DigiLocker, eSign) show false here, because the charge is made when the result is ready. eSign charges each signer when they complete signing. DigiLocker deducts the credit when the link is created and refunds it automatically if the link expires before the user completes it.
Example
{ "success": false, "statusCode": 200, "message": "XXXXX", "data": { "transactionId": "string", "docs": [ { "issued": { "name": "string", "type": "string", "size": "string", "date": "string", "parent": "string", "mime": [ "string" ], "uri": "string", "doctype": "string", "description": "string", "issuerId": "string", "issuer": "string" }, "docType": "string", "status": "string", "fetchedAt": "2026-01-01T00:00:00Z", "dataPdf": "string", "dataXml": "string", "details": { "name": "string", "dob": "string", "gender": "string", "co": "string", "address": "string", "village": "string", "subDistrict": "string", "district": "string", "state": "string", "country": "string", "pinCode": "string", "aadhaarNumber": "string", "kycDateTime": "string", "photo": "string", "addressDetails": { "addressLine1": "string", "addressLine2": "string", "addressLine3": "string" } } } ] }, "messages": [ "string" ], "request_id": "string", "isBillable": false }
400Bad Request
  • data
    objectoptional
    No description.
  • messages
    array<string>optional
    No description.
    nullable
  • request_id
    stringoptional
    No description.
    nullable
  • success
    booleanoptional
    No description.
    default false
  • message
    stringoptional
    No description.
    nullabledefault XXXXX
  • isBillable
    booleanoptional
    No description.
  • statusCode
    integer (int32)optional
    No description.
    default 400
Example
{ "data": {}, "messages": [ "string" ], "request_id": "string", "success": false, "message": "XXXXX", "isBillable": false, "statusCode": 400 }
401Unauthorized
  • data
    objectoptional
    No description.
  • messages
    array<string>optional
    No description.
    nullable
  • request_id
    stringoptional
    No description.
    nullable
  • success
    booleanoptional
    No description.
    default false
  • message
    stringoptional
    No description.
    nullabledefault XXXXX
  • isBillable
    booleanoptional
    No description.
  • statusCode
    integer (int32)optional
    No description.
    default 401
Example
{ "data": {}, "messages": [ "string" ], "request_id": "string", "success": false, "message": "XXXXX", "isBillable": false, "statusCode": 401 }
500Internal Server Error
  • data
    objectoptional
    No description.
  • messages
    array<string>optional
    No description.
    nullable
  • request_id
    stringoptional
    No description.
    nullable
  • success
    booleanoptional
    No description.
    default false
  • message
    stringoptional
    No description.
    nullabledefault XXXXX
  • isBillable
    booleanoptional
    No description.
  • statusCode
    integer (int32)optional
    No description.
    default 500
Example
{ "data": {}, "messages": [ "string" ], "request_id": "string", "success": false, "message": "XXXXX", "isBillable": false, "statusCode": 500 }
Code samplescurl · Node.js · Python
Stage: uat-ext.signcare.io
curl -X GET 'https://uat-ext.signcare.io/api/v1/digilocker/details/{transactionId}' \ -H 'X-API-KEY: YOUR_API_KEY' \ -H 'X-API-APP-ID: YOUR_APP_ID'