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

# Create Session

<Card title="Run in Postman" icon="https://mintcdn.com/sandboxfinancialtechnologiesprivatelimited/gviqebbpT5NUt_6i/static/svg/Postman.svg?fit=max&auto=format&n=gviqebbpT5NUt_6i&q=85&s=da47f2b7e10d87befec951aed9468de3" horizontal arrow="true" href="https://www.postman.com/in-co-sandbox/sandbox-api/request/rupyji9/create-session" width="2030" height="2031" data-path="static/svg/Postman.svg" />


## OpenAPI

````yaml api-reference/kyc/openapi.json POST /kyc/digilocker-sdk/sessions/create
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:
  /kyc/digilocker-sdk/sessions/create:
    post:
      tags:
        - kyc
        - digilocker-sdk
      summary: Create Session
      operationId: createSession
      parameters:
        - name: Authorization
          in: header
          description: >-
            JWT access token. For token-generation steps, refer to the
            [Quickstart
            Guide](https://developer.sandbox.co.in/guides/get-started/quickstart).
          required: true
          example: '{{access_token}}'
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API key used to identify and authenticate the client.
          required: true
          example: '{{api_key}}'
          schema:
            type: string
        - name: x-api-version
          in: header
          description: Specifies the API version for the request.
          required: false
          example: 1.0.0
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Media type of the request body.
          required: false
          example: application/json
          schema:
            type: string
            enum:
              - application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                '@entity':
                  type: string
                  enum:
                    - in.co.sandbox.kyc.digilocker.sdk.session.request
                flow:
                  type: string
                  enum:
                    - signin
                    - signup
                  description: >-
                    DigiLocker authentication flow to initiate for the user. Use
                    `signin` for existing DigiLocker users or `signup` to create
                    a new account.
                doc_types:
                  type: array
                  minItems: 1
                  items:
                    type: string
                    enum:
                      - aadhaar
                      - driving_license
                      - pan
                  description: >-
                    List of DigiLocker document types for which user consent is
                    being requested.
              required:
                - '@entity'
                - flow
                - doc_types
              additionalProperties: false
            examples:
              200 - OK:
                value:
                  '@entity': in.co.sandbox.kyc.digilocker.sdk.session.request
                  flow: signin
                  doc_types:
                    - aadhaar
                    - pan
                summary: 200 - OK
              400 - Invalid request body:
                value:
                  '@entity': in.co.sandbox.kyc.digilocker.sdk.session.request
                  flow: signin
                  doc_types:
                    - aadhaar
                    - driving_license
                    - pan
                summary: 400 - Invalid request body
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: integer
                  transaction_id:
                    type: string
                  data:
                    type: object
                    properties:
                      '@entity':
                        type: string
                        enum:
                          - in.co.sandbox.kyc.digilocker.sdk.session
                      id:
                        type: string
                        description: Session ID
                        format: uuid
                      status:
                        type: string
                        enum:
                          - created
                        description: Status of the Session
                      created_at:
                        type: integer
                  code:
                    type: integer
                required:
                  - timestamp
                  - transaction_id
                  - data
                  - code
              examples:
                200 - OK:
                  summary: 200 - OK
                  value:
                    timestamp: 1750331120324
                    transaction_id: 5ccad959-0bf4-4472-a3dd-d57e2b61b5a9
                    data:
                      '@entity': in.co.sandbox.kyc.digilocker.sdk.session
                      id: 0454f149-26d0-41ef-9f14-c54f4b5f7b70
                      status: created
                      created_at: 1750331120324
                    code: 200
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  timestamp:
                    type: integer
                  message:
                    type: string
                  transaction_id:
                    type: string
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                400 - Invalid request body:
                  summary: 400 - Invalid request body
                  value:
                    code: 400
                    timestamp: 1760426007752
                    message: Invalid request body
                    transaction_id: f654ccdb-919f-486d-851d-0fc5d0050c17
          headers: {}
      deprecated: false
      security: []

````