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

# List Sessions

> List all sessions for a user with pagination and filtering.

Retrieve conversation sessions with support for filtering by status and custom metadata.
Results are sorted by creation date (newest first).

**Path Parameters:**
- `custom_user_id` (str): Unique identifier for the user

**Query Parameters:**
- `offset` (int): Number of records to skip for pagination. Default: 0
- `limit` (int): Maximum records to return. Range: 1-100. Default: 10
- `metadata_filter` (str): JSON string filter for session metadata (supports nested JSON matching)
- `status_filter` (List[ProjectUserSessionStatus]): Filter by session status (pending, processing, processed, insufficient_balance)
- `include_summary` (bool): Whether to include session summaries in the response. Default: false
- `include_memories` (bool): Whether to include memories created in each session. Default: false

**Returns:**
- `sessions` (List[SessionInfo]): List of session objects (optionally with summaries and memories)
- `total` (int): Total number of sessions matching the filters
- `has_more` (bool): Whether more sessions are available beyond the current page



## OpenAPI

````yaml https://api.recallrai.com/api/openapi.json get /api/v1/users/{custom_user_id}/sessions
openapi: 3.1.0
info:
  title: api-backend
  description: This powers the Recallr AI API Backend
  version: 0.1.0
servers:
  - url: https://api.recallrai.com
    description: Production server
security: []
paths:
  /api/v1/users/{custom_user_id}/sessions:
    get:
      tags:
        - Sessions
      summary: List Sessions
      description: >-
        List all sessions for a user with pagination and filtering.


        Retrieve conversation sessions with support for filtering by status and
        custom metadata.

        Results are sorted by creation date (newest first).


        **Path Parameters:**

        - `custom_user_id` (str): Unique identifier for the user


        **Query Parameters:**

        - `offset` (int): Number of records to skip for pagination. Default: 0

        - `limit` (int): Maximum records to return. Range: 1-100. Default: 10

        - `metadata_filter` (str): JSON string filter for session metadata
        (supports nested JSON matching)

        - `status_filter` (List[ProjectUserSessionStatus]): Filter by session
        status (pending, processing, processed, insufficient_balance)

        - `include_summary` (bool): Whether to include session summaries in the
        response. Default: false

        - `include_memories` (bool): Whether to include memories created in each
        session. Default: false


        **Returns:**

        - `sessions` (List[SessionInfo]): List of session objects (optionally
        with summaries and memories)

        - `total` (int): Total number of sessions matching the filters

        - `has_more` (bool): Whether more sessions are available beyond the
        current page
      operationId: list_sessions_api_v1_users__custom_user_id__sessions_get
      parameters:
        - name: custom_user_id
          in: path
          required: true
          schema:
            type: string
            title: The custom user ID to get the sessions for
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            title: The offset of the sessions to get
            default: 0
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            title: The limit of the sessions to get
            default: 10
        - name: metadata_filter
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: JSON string filter for session metadata
        - name: status_filter
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/ProjectUserSessionStatus'
              - type: 'null'
            title: >-
              Filter sessions by status (e.g., pending, processing, processed,
              insufficient_balance)
        - name: include_summary
          in: query
          required: false
          schema:
            type: boolean
            title: Whether to include session summaries in the response
            default: false
        - name: include_memories
          in: query
          required: false
          schema:
            type: boolean
            title: Whether to include memories created in each session
            default: false
        - name: X-Recallr-Project-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            title: X-Recallr-Project-Id
        - name: X-Recallr-Api-Key
          in: header
          required: true
          schema:
            type: string
            title: X-Recallr-Api-Key
      responses:
        '200':
          description: Sessions listed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessionsResponse'
        '401':
          description: Authentication required
        '404':
          description: User not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
components:
  schemas:
    ProjectUserSessionStatus:
      type: string
      enum:
        - pending
        - processing
        - processed
        - failed
        - insufficient_balance
      title: ProjectUserSessionStatus
    ListSessionsResponse:
      properties:
        sessions:
          items:
            $ref: '#/components/schemas/SessionInfo'
          type: array
          title: Sessions
        total:
          type: integer
          title: Total
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - sessions
        - total
        - has_more
      title: ListSessionsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SessionInfo:
      properties:
        session_id:
          type: string
          format: uuid
          title: Session Id
        status:
          $ref: '#/components/schemas/ProjectUserSessionStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        session_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Summary
        memories:
          anyOf:
            - items:
                $ref: '#/components/schemas/SessionMemoryInfo'
              type: array
            - type: 'null'
          title: Memories
      type: object
      required:
        - session_id
        - status
        - created_at
      title: SessionInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SessionMemoryInfo:
      properties:
        memory_id:
          type: string
          format: uuid
          title: Memory Id
        content:
          type: string
          title: Content
      type: object
      required:
        - memory_id
        - content
      title: SessionMemoryInfo

````