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

# List Conversations

> List conversations in the current workspace with cursor-based pagination.

Cursor-based pagination is more efficient for large datasets and handles
data changes better than offset-based pagination.

Args:
    cursor: Cursor from previous response for next page (None for first page)
    limit: Number of items per page (default: 50, max: 100)
    sort_by: Field to sort by (default: 'updated_at')
    sort_order: Sort order - 'asc' or 'desc' (default: 'desc')
    status: Optional status filter
    search: Optional search term for title
    user_id: Optional user_id filter
    collection_id: Optional collection_id filter

Returns:
    ConversationListResponse with conversations, next_cursor, and has_more flag

Examples:
    First page:
        GET /conversations?limit=50
    
    Next page (using cursor from previous response):
        GET /conversations?cursor=conv_xyz123&limit=50
    
    Sort by created_at ascending:
        GET /conversations?sort_by=created_at&sort_order=asc
    
    Filter by status with sorting:
        GET /conversations?status=active&sort_by=updated_at&sort_order=desc



## OpenAPI

````yaml api-reference/openapi.json get /api/v1/conversations
openapi: 3.1.0
info:
  title: FastAPI app
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/conversations:
    get:
      tags:
        - Conversations
      summary: List Conversations
      description: >-
        List conversations in the current workspace with cursor-based
        pagination.


        Cursor-based pagination is more efficient for large datasets and handles

        data changes better than offset-based pagination.


        Args:
            cursor: Cursor from previous response for next page (None for first page)
            limit: Number of items per page (default: 50, max: 100)
            sort_by: Field to sort by (default: 'updated_at')
            sort_order: Sort order - 'asc' or 'desc' (default: 'desc')
            status: Optional status filter
            search: Optional search term for title
            user_id: Optional user_id filter
            collection_id: Optional collection_id filter

        Returns:
            ConversationListResponse with conversations, next_cursor, and has_more flag

        Examples:
            First page:
                GET /conversations?limit=50
            
            Next page (using cursor from previous response):
                GET /conversations?cursor=conv_xyz123&limit=50
            
            Sort by created_at ascending:
                GET /conversations?sort_by=created_at&sort_order=asc
            
            Filter by status with sorting:
                GET /conversations?status=active&sort_by=updated_at&sort_order=desc
      operationId: list_conversations_api_v1_conversations_get
      parameters:
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Cursor for pagination (use next_cursor from previous response)
            title: Cursor
          description: Cursor for pagination (use next_cursor from previous response)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Number of conversations to return
            default: 50
            title: Limit
          description: Number of conversations to return
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Field to sort by (e.g., 'id', 'updated_at', 'created_at', 'title')
            default: updated_at
            title: Sort By
          description: Field to sort by (e.g., 'id', 'updated_at', 'created_at', 'title')
        - name: sort_order
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SortOrder'
              - type: 'null'
            description: Sort order (asc or desc)
            default: desc
            title: Sort Order
          description: Sort order (asc or desc)
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by conversation status
            title: Status
          description: Filter by conversation status
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search conversations by title
            title: Search
          description: Search conversations by title
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by user ID
            title: User Id
          description: Filter by user ID
        - name: collection_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by collection ID
            title: Collection Id
          description: Filter by collection ID
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The workspace ID
            title: X-Workspace-Id
          description: The workspace ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - DualAuthScheme: []
components:
  schemas:
    SortOrder:
      type: string
      enum:
        - asc
        - desc
      title: SortOrder
    ConversationListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ConversationRead'
          type: array
          title: Data
          description: List of conversations
        total_count:
          type: integer
          title: Total Count
          description: Number of conversations in this response
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Cursor for the next page
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more conversations available
      type: object
      required:
        - data
        - total_count
        - has_more
      title: ConversationListResponse
      description: Response schema for listing conversations with cursor-based pagination.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConversationRead:
      properties:
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        id:
          type: string
          title: Id
        title:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Title
          description: Conversation title
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
          description: Conversation summary
        status:
          type: string
          title: Status
          description: Conversation status
          default: active
        is_public:
          type: boolean
          title: Is Public
          description: Whether conversation is public
          default: false
        collections:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Collections
          description: Collection IDs associated with this conversation
        meta_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta Data
          description: Additional metadata
        settings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Settings
          description: Conversation settings
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
          description: When the conversation ended
        owner_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Id
          description: Owner ID associated with this conversation
        workspace_id:
          type: string
          title: Workspace Id
          description: Reference to workspace
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
          description: User who created the conversation
      type: object
      required:
        - workspace_id
      title: ConversationRead
      description: Schema for reading conversation data.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    DualAuthScheme:
      type: http
      scheme: bearer

````