> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# DigiLocker session status webhook

> Receive a webhook when a DigiLocker session succeeds or fails, with the documents the user consented to share, instead of polling the session status.

Webhooks fire when a DigiLocker session moves from `created` to `succeeded` or `failed`, so you don't need to poll the session status.

The webhook's `data` contains the session, with the same schema as `data` in the [session status response](https://developer.sandbox.co.in/api-reference/kyc/digilocker/endpoints/session_status.md). After `succeeded`, read `data.documents_consented` and [fetch each document](https://developer.sandbox.co.in/api-reference/kyc/digilocker/endpoints/fetch_document.md). A session `failed` when the user denies consent or the authorization can't be completed.

Configure the webhook before initiating sessions. See the [webhooks guide](https://developer.sandbox.co.in/guides/developer-resources/webhooks.md) to set your URL and validate `x-sandbox-signature`.


## OpenAPI

````yaml api-reference/kyc/openapi.json webhook DigiLockerSessionStatus
openapi: 3.1.0
info:
  title: in-co-sandbox-kyc
  description: ''
  version: 1.0.0
servers:
  - url: https://test-api.sandbox.co.in
    description: test
  - url: https://api.sandbox.co.in
    description: prod
security: []
tags:
  - name: kyc
  - name: digilocker-sdk
  - name: digilocker
  - name: aadhaar
  - name: bank
  - name: pan
  - name: mca
  - name: entitylocker
  - name: entitylocker-sdk
paths: {}

````

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