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

# list sessions

> Returns a list of all sessions for the organization



## OpenAPI

````yaml https://api.anam.ai/swagger.json get /v1/sessions
openapi: 3.1.0
info:
  title: Anam AI API
  version: '1.0'
servers:
  - url: https://api.anam.ai
    description: Anam API
security:
  - BearerAuth: []
tags:
  - name: Sessions
  - name: Personas
  - name: Avatars
  - name: Voices
  - name: LLMs
  - name: Knowledge
  - name: Tools
  - name: Share Links
paths:
  /v1/sessions:
    get:
      tags:
        - Sessions
      summary: list sessions
      description: Returns a list of all sessions for the organization
      operationId: listSessions
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number for pagination
        - in: query
          name: perPage
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          description: Number of items per page (max 100)
        - in: query
          name: search
          schema:
            type: string
          description: Search term to filter sessions by ID or client label
        - in: query
          name: apiKeyId
          schema:
            type: string
            format: uuid
          description: Filter sessions by API key ID
        - in: query
          name: personaId
          schema:
            type: string
            format: uuid
          description: Filter sessions by persona ID
      responses:
        '200':
          description: Successfully retrieved sessions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Session'
                  meta:
                    $ref: '#/components/schemas/Pagination'
              examples:
                default:
                  $ref: '#/components/examples/SessionListResponse'
        '400':
          description: Bad request - Invalid query parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '500':
          description: Server error
components:
  schemas:
    Session:
      type: object
      description: >-
        A single connection between a client and a persona. Contains metadata
        but not the transcript or recording — those are fetched separately.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the session.
        personaId:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            ID of the persona the client connected to, or `null` if the session
            was issued with an ephemeral persona config.
        clientLabel:
          type:
            - string
            - 'null'
          description: Label supplied by the caller when minting the session token.
        startTime:
          type: string
          format: date-time
          description: Timestamp when the session started.
        endTime:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the session ended, or `null` if still active.
        sessionLengthMs:
          type:
            - integer
            - 'null'
          description: Duration of the session in milliseconds, or `null` if still active.
        exitStatus:
          type:
            - string
            - 'null'
          description: >-
            How the session ended (e.g. `NORMAL_EXIT`, `ERROR`), or `null` if
            still active.
        engineHost:
          type:
            - string
            - 'null'
          description: Hostname of the engine pod that served the session.
        engineProtocol:
          type:
            - string
            - 'null'
          description: Protocol used to stream the session (e.g. `https`).
        engineVersion:
          type:
            - string
            - 'null'
          description: Version of the engine pod that served the session.
        clientMetadata:
          type: object
          description: Arbitrary metadata collected from the client during the session.
        personaConfig:
          type: object
          additionalProperties: true
          description: >-
            Snapshot of the persona configuration taken at the moment the
            session started.
        apiKeyId:
          type:
            - string
            - 'null'
          format: uuid
          description: ID of the API key that minted the session token.
        organizationId:
          type: string
          description: >-
            ID of the organization that owns the session. IDs may be either
            UUIDs or nanoid-style strings depending on when the organization was
            created.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the session record was created.
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the session record was last updated.
    Pagination:
      type: object
      description: >-
        Pagination metadata returned alongside the `data` array of every list
        endpoint.
      properties:
        total:
          type: integer
          description: Total number of items across all pages.
        lastPage:
          type: integer
          description: Number of the last page.
        currentPage:
          type: integer
          description: Number of the current page.
        perPage:
          type: integer
          description: Number of items per page.
        prev:
          type:
            - integer
            - 'null'
          description: Number of the previous page, or null if on the first page.
        next:
          type:
            - integer
            - 'null'
          description: Number of the next page, or null if on the last page.
  examples:
    SessionListResponse:
      summary: A paginated list of sessions
      value:
        data:
          - id: 00000000-0000-0000-0000-000000000000
            personaId: null
            clientLabel: anam-lab-chat
            startTime: '2026-04-20T09:00:00.000Z'
            endTime: '2026-04-20T09:12:34.000Z'
            sessionLengthMs: 754000
            exitStatus: CLOSED_BY_ENGINE
            engineHost: connect-eu.anam.ai/v1/webrtc/engines/anam-engine-7dddcb9ccd-db8v9
            engineProtocol: https
            engineVersion: v5.1.0
            clientMetadata:
              userAgent: Mozilla/5.0
            personaConfig:
              type: ephemeral
              name: Cara
              metadata:
                client: js-sdk
              llmConfig:
                id: a7cf662c-2ace-4de1-a21e-ef0fbf144bb7
                modelName: gpt-4o
                format: openai
                urls:
                  - url: https://api.openai.com/v1
                    region: default
                maxTokens: 4096
                temperature: 0.7
                metadata: {}
                secret_iv: '[REDACTED]'
                encrypted_secret: '[REDACTED]'
                createdByOrganizationId: null
              systemPrompt: You are a helpful assistant.
              personality: ''
              languageCode: en
              skipGreeting: false
              zeroDataRetention: false
              ttsProvider: ELEVENLABS
              ttsProviderVoiceId: lcMyyd2HUfFzxdCaC4Ta
              ttsProviderModelId: eleven_flash_v2_5
              ttsProviderOptions: {}
              avatarEngineKey: cara_home
              avatarVersion: cara-3
              disableBrains: false
              fillerPhrases: []
              useFillerPhrases: false
              enableAudioPassthrough: false
              voiceDetectionOptions: {}
              voiceGenerationOptions: {}
              maxSessionLengthSeconds: 1000000
              fps: 25
            apiKeyId: 00000000-0000-0000-0000-000000000000
            organizationId: 00000000-0000-0000-0000-000000000000
            createdAt: '2026-04-20T09:00:00.000Z'
            updatedAt: '2026-04-20T09:12:34.000Z'
        meta:
          total: 1
          lastPage: 1
          currentPage: 1
          perPage: 10
          prev: null
          next: null
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````