> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kayle.id/llms.txt
> Use this file to discover all available pages before exploring further.

# List all sessions



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sessions
openapi: 3.1.0
info:
  title: Kayle ID
  version: 1.5.0
  description: Privacy-first identity verification.
  license:
    name: Apache License 2.0
    url: https://github.com/kayleai/kayle-id/blob/main/LICENSE
  contact:
    name: Kayle ID
    url: https://kayle.id
    email: help@kayle.id
  termsOfService: https://kayle.id/terms
servers:
  - url: http://127.0.0.1:8787
    description: ''
security:
  - bearerAuth: []
paths:
  /v1/sessions:
    get:
      tags:
        - Sessions
      summary: List all sessions
      parameters:
        - schema:
            type: string
            enum:
              - created
              - in_progress
              - succeeded
              - failed
              - expired
              - cancelled
            description: Filter sessions by status.
          required: false
          description: Filter sessions by status.
          name: status
          in: query
        - schema:
            type: string
            format: date-time
            description: Return sessions created at or after this ISO 8601 timestamp.
          required: false
          description: Return sessions created at or after this ISO 8601 timestamp.
          name: created_from
          in: query
        - schema:
            type: string
            format: date-time
            description: Return sessions created at or before this ISO 8601 timestamp.
          required: false
          description: Return sessions created at or before this ISO 8601 timestamp.
          name: created_to
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            description: >-
              Maximum number of sessions to return. Defaults to 10 if not
              specified.
          required: false
          description: >-
            Maximum number of sessions to return. Defaults to 10 if not
            specified.
          name: limit
          in: query
        - schema:
            type: string
            pattern: ^vs_[A-Za-z0-9]{64}$
            description: >-
              Cursor of the last item from the previous page. When provided, the
              next page of results will be returned.
          required: false
          description: >-
            Cursor of the last item from the previous page. When provided, the
            next page of results will be returned.
          name: starting_after
          in: query
      responses:
        '200':
          description: >-
            Successful operation. Returns a list of verification sessions for
            the organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The ID of the verification session
                        status:
                          type: string
                          enum:
                            - created
                            - in_progress
                            - succeeded
                            - failed
                            - expired
                            - cancelled
                          description: The status of the verification session
                        failure_code:
                          type:
                            - string
                            - 'null'
                          enum:
                            - document_authenticity_failed
                            - document_active_authentication_failed
                            - document_chip_authentication_failed
                            - document_anti_cloning_attestation_failed
                            - document_data_invalid
                            - liveness_failed
                            - selfie_face_mismatch
                          description: >-
                            Terminal failure code when status='failed'. Null in
                            any other state.
                        nfc_tries_used:
                          type: integer
                          minimum: 0
                          maximum: 3
                          description: >-
                            Number of NFC chip-read failures the session has
                            consumed. The session terminalizes on the 3rd
                            failure.
                        liveness_tries_used:
                          type: integer
                          minimum: 0
                          maximum: 3
                          description: >-
                            Number of liveness check failures the session has
                            consumed. The session terminalizes on the 3rd
                            failure.
                        contract_version:
                          type: integer
                          description: Version of the session share contract.
                        share_fields:
                          type: object
                          additionalProperties:
                            type: object
                            properties:
                              required:
                                type: boolean
                                description: Whether this field must always be shared.
                              reason:
                                type: string
                                description: Reason shown to the user for this field.
                              source:
                                type: string
                                enum:
                                  - default
                                  - rc
                                description: >-
                                  Whether the field came from defaults or RC
                                  request.
                            required:
                              - required
                              - reason
                              - source
                          description: >-
                            Effective normalized share fields used by this
                            session.
                        redirect_url:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The URL to redirect to after the verification
                            session is completed, if provided by the integrator.
                        webhook_endpoint_id:
                          anyOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            - type: 'null'
                          description: >-
                            The webhook endpoint or endpoint list selected for
                            this session, or null when events fan out to all
                            enabled subscribed endpoints.
                        verification_url:
                          type: string
                          format: uri
                          description: >-
                            The URL that the platform should send the user to in
                            order to complete the verification. Includes the
                            one-shot `cancel_token` as a query parameter so the
                            verify browser / native app can pass it back when
                            cancelling.
                        cancel_token:
                          type: string
                          description: >-
                            One-shot token required by `POST
                            /v1/verify/session/:id/cancel`. Returned only on
                            session creation.
                        expires_at:
                          type: string
                          description: The expiration time of the verification session
                        completed_at:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The time the verification session reached a terminal
                            state (i.e., succeeded, failed, expired or
                            cancelled), or null if not yet terminal.
                        created_at:
                          type: string
                          description: The time the verification session was created
                        updated_at:
                          type: string
                          description: The time the verification session was last updated
                      required:
                        - id
                        - status
                        - failure_code
                        - nfc_tries_used
                        - liveness_tries_used
                        - contract_version
                        - share_fields
                        - redirect_url
                        - webhook_endpoint_id
                        - verification_url
                        - expires_at
                        - completed_at
                        - created_at
                        - updated_at
                      examples:
                        - id: >-
                            vs_mza7vecksrtyfw193ekcvl5vnws3bt1lz96buu3iw7zidckf8dga2zx2echb3t16
                          status: created
                          failure_code: null
                          nfc_tries_used: 0
                          liveness_tries_used: 0
                          contract_version: 1
                          share_fields:
                            document_type_code:
                              required: false
                              reason: Needed to know the document type code
                              source: rc
                            date_of_birth:
                              required: true
                              reason: Needed to verify age eligibility
                              source: rc
                            kayle_document_id:
                              required: true
                              reason: Sharing "Kayle Document ID"
                              source: default
                          redirect_url: https://example.com/redirect
                          webhook_endpoint_id: null
                          verification_url: >-
                            https://verify.kayle.id/vs_mza7vecksrtyfw193ekcvl5vnws3bt1lz96buu3iw7zidckf8dga2zx2echb3t16
                          expires_at: '2025-01-01T00:00:00Z'
                          completed_at: null
                          created_at: '2025-01-01T00:00:00Z'
                          updated_at: '2025-01-01T00:00:00Z'
                  error:
                    type: 'null'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                required:
                  - data
                  - error
                  - pagination
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - INTERNAL_SERVER_ERROR
                      message:
                        type: string
                        enum:
                          - Internal server error.
                      hint:
                        type: string
                        enum:
                          - The server encountered an error.
                      docs:
                        type: string
                        enum:
                          - https://kayle.id/docs/api/errors
                    required:
                      - code
                      - message
                      - hint
                      - docs
                  pagination:
                    type: object
                    properties:
                      limit:
                        type: number
                      has_more:
                        type: boolean
                        enum:
                          - false
                      next_cursor:
                        type: 'null'
                    required:
                      - limit
                      - has_more
                      - next_cursor
                required:
                  - data
                  - error
                  - pagination
      security:
        - bearerAuth: []
components:
  schemas:
    Pagination:
      type: object
      properties:
        limit:
          type: number
          description: The maximum number of items returned.
          example: 10
        has_more:
          type: boolean
          description: Whether there are more items available after this page.
          example: false
        next_cursor:
          type:
            - string
            - 'null'
          description: >-
            Cursor to use as `starting_after` to fetch the next page of results,
            or null if there are no more items.
          example: null
      required:
        - limit
        - has_more
        - next_cursor
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````