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

# Get sessions

> Get list of sessions with pagination and filtering. See [Sessions](https://docs.galtea.ai/concepts/product/version/session).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json get /sessions
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /sessions:
    get:
      tags:
        - sessions
      summary: Get sessions
      description: >-
        Get list of sessions with pagination and filtering. See
        [Sessions](https://docs.galtea.ai/concepts/product/version/session).
      operationId: getSessions
      parameters:
        - name: ids
          in: query
          style: form
          explode: true
          description: Filter by session IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: customIds
          in: query
          style: form
          explode: true
          description: Filter by session custom IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: productIds
          in: query
          style: form
          explode: true
          description: Filter by product IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: testIds
          in: query
          style: form
          explode: true
          description: >-
            Filter by test IDs (include only). Use an empty string ("") to
            select sessions without a test
          required: false
          schema:
            type: array
            items:
              type: string
        - name: excludeTestIds
          in: query
          style: form
          explode: true
          description: >-
            Omit sessions linked to the specified test IDs. Use an empty string
            ("") to omit sessions without a test
          required: false
          schema:
            type: array
            items:
              type: string
        - name: versionIds
          in: query
          style: form
          explode: true
          description: Filter by version IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: testCaseIds
          in: query
          style: form
          explode: true
          description: Filter by test case IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: isProduction
          in: query
          description: >-
            Filter by the session's `isProduction` flag. Prefer this over the
            legacy `testIds`/`excludeTestIds` empty-string trick.
          required: false
          schema:
            type: boolean
        - name: statuses
          in: query
          style: form
          explode: true
          description: Filter by session statuses. Multiple values combine as OR.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - PENDING
                - COMPLETED
                - FAILED
        - name: sort
          in: query
          style: form
          explode: true
          description: Sort instructions (field and direction pairs)
          required: false
          schema:
            type: array
            items:
              type: string
        - name: limit
          in: query
          description: Maximum number of results
          required: false
          schema:
            type: integer
        - name: offset
          in: query
          description: Number of results to skip
          required: false
          schema:
            type: integer
        - name: fromCreatedAt
          in: query
          description: Filter sessions created at or after this timestamp (ISO 8601 format)
          required: false
          schema:
            type: string
            format: date-time
        - name: toCreatedAt
          in: query
          description: >-
            Filter sessions created at or before this timestamp (ISO 8601
            format)
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Sessions retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Session'
        '400':
          description: >-
            Missing required filter. Provide at least one of the scoping filters
            (e.g. productIds, versionIds, ids)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Session:
      type: object
      properties:
        id:
          type: string
          example: session_123
        customId:
          type: string
          nullable: true
          example: custom_session_123
        versionId:
          type: string
          example: ver_123
        userId:
          type: string
          nullable: true
          example: user_123
        testCaseId:
          type: string
          nullable: true
          example: tc_123
        context:
          type: object
          nullable: true
          description: >-
            Structured context data. For plain text context, format is { value:
            "..." }
          example:
            value: Session context information
        stoppingReason:
          type: string
          nullable: true
          example: GOAL_ACHIEVED
        recordingUri:
          type: string
          nullable: true
          description: >-
            Canonical storage URI of the full-call recording for a
            telephony-evaluation session. Null for non-telephony sessions or
            before the recording is processed. Resolve to a playable URL via GET
            /storage?uri=.
          example: s3://galtea-bucket/audio/org_123/session_abc-recording.mp3
        error:
          type: string
          nullable: true
          example: >-
            External API responded with HTTP 422: Unprocessable Entity —
            {"detail":"model not found"}
        status:
          type: string
          enum:
            - PENDING
            - COMPLETED
            - FAILED
          example: PENDING
        isProduction:
          type: boolean
          description: >-
            True when the session represents real production traffic (no
            associated test case).
          example: false
        metadata:
          type: object
          nullable: true
          example:
            key: value
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````