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

# List Org Conversations

> List all conversations for an organization.

This endpoint returns a paginated list of all conversations within an organization,
including details about each conversation such as the creator, timestamps, and metrics.

**Access Control**: Requires VIEW_ORG_CONVERSATIONS permission (Admin or Owner role).

Args:
    org_id: Organization UUID
    search: Search text matching conversation name, creator name, email, or sandbox ID
    sort_by: Field to sort by (created_at, updated_at, llm_model, accumulated_cost, title)
    sort_order: Sort order (desc or asc)
    execution_status: Filter by execution status (idle, running, paused, finished, error, stuck)
    sandbox_status: Filter by sandbox status (STARTING, RUNNING, PAUSED, ERROR, MISSING)
    time_window: Time window filter (all, 7d, 30d, 90d)
    page: Page number (1-indexed)
    per_page: Items per page (1-100)
    include_sub_conversations: If True, include sub-conversations in results
    user_id: Authenticated user ID (injected by require_permission dependency)
    service: OrgConversationService instance

Returns:
    OrgConversationPage: Paginated list of conversations with total count

Raises:
    HTTPException: 401 if user is not authenticated
    HTTPException: 403 if user lacks VIEW_ORG_CONVERSATIONS permission
    HTTPException: 500 if retrieval fails



## OpenAPI

````yaml /openapi/openhands-cloud.json get /api/organizations/{org_id}/conversations
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/organizations/{org_id}/conversations:
    get:
      tags:
        - Orgs
      summary: List Org Conversations
      description: >-
        List all conversations for an organization.


        This endpoint returns a paginated list of all conversations within an
        organization,

        including details about each conversation such as the creator,
        timestamps, and metrics.


        **Access Control**: Requires VIEW_ORG_CONVERSATIONS permission (Admin or
        Owner role).


        Args:
            org_id: Organization UUID
            search: Search text matching conversation name, creator name, email, or sandbox ID
            sort_by: Field to sort by (created_at, updated_at, llm_model, accumulated_cost, title)
            sort_order: Sort order (desc or asc)
            execution_status: Filter by execution status (idle, running, paused, finished, error, stuck)
            sandbox_status: Filter by sandbox status (STARTING, RUNNING, PAUSED, ERROR, MISSING)
            time_window: Time window filter (all, 7d, 30d, 90d)
            page: Page number (1-indexed)
            per_page: Items per page (1-100)
            include_sub_conversations: If True, include sub-conversations in results
            user_id: Authenticated user ID (injected by require_permission dependency)
            service: OrgConversationService instance

        Returns:
            OrgConversationPage: Paginated list of conversations with total count

        Raises:
            HTTPException: 401 if user is not authenticated
            HTTPException: 403 if user lacks VIEW_ORG_CONVERSATIONS permission
            HTTPException: 500 if retrieval fails
      operationId: list_org_conversations_api_organizations__org_id__conversations_get
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Org Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: >-
              Search text matching conversation name, creator name, email, or
              sandbox ID
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            title: Field to sort by
            description: >-
              Options: created_at, updated_at, llm_model, accumulated_cost,
              title
            default: updated_at
          description: 'Options: created_at, updated_at, llm_model, accumulated_cost, title'
        - name: sort_order
          in: query
          required: false
          schema:
            type: string
            title: Sort order
            description: 'Options: desc (default), asc'
            default: desc
          description: 'Options: desc (default), asc'
        - name: execution_status
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Filter by execution status
            description: >-
              Comma-separated list: idle, running, paused, finished, error,
              stuck
          description: 'Comma-separated list: idle, running, paused, finished, error, stuck'
        - name: sandbox_status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Filter by sandbox status
            description: >-
              Filter by sandbox status: STARTING, RUNNING, PAUSED, ERROR,
              MISSING. Note: when filtering by sandbox_status, total_items
              reflects the unfiltered count since the filter is applied
              post-query. This may result in pagination showing fewer items per
              page than expected.
          description: >-
            Filter by sandbox status: STARTING, RUNNING, PAUSED, ERROR, MISSING.
            Note: when filtering by sandbox_status, total_items reflects the
            unfiltered count since the filter is applied post-query. This may
            result in pagination showing fewer items per page than expected.
        - name: time_window
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Time window filter
            description: 'Options: all, 7d, 30d, 90d'
          description: 'Options: all, 7d, 30d, 90d'
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            title: Page number
            default: 1
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            title: Items per page
            default: 20
        - name: include_sub_conversations
          in: query
          required: false
          schema:
            type: boolean
            title: >-
              If True, include sub-conversations. If False (default), exclude
              them.
            default: false
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgConversationPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    OrgConversationPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/OrgConversationResponse'
          type: array
          title: Items
        total_items:
          type: integer
          title: Total Items
          default: 0
        page:
          type: integer
          title: Page
          default: 1
        per_page:
          type: integer
          title: Per Page
          default: 100
        total_pages:
          type: integer
          title: Total Pages
          default: 0
        pagination_accurate:
          type: boolean
          title: Pagination Accurate
          default: true
      type: object
      required:
        - items
      title: OrgConversationPage
      description: Paginated response for organization conversations.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OrgConversationResponse:
      properties:
        id:
          type: string
          title: Id
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        llm_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Llm Model
        agent_kind:
          type: string
          title: Agent Kind
          default: openhands
        user_id:
          type: string
          title: User Id
        user_email:
          anyOf:
            - type: string
            - type: 'null'
          title: User Email
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        sandbox_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Sandbox Id
        sandbox_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Sandbox Status
        runtime_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Runtime Url
        execution_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Execution Status
        selected_repository:
          anyOf:
            - type: string
            - type: 'null'
          title: Selected Repository
        selected_branch:
          anyOf:
            - type: string
            - type: 'null'
          title: Selected Branch
        git_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Git Provider
        trigger:
          anyOf:
            - type: string
            - type: 'null'
          title: Trigger
        pr_number:
          items:
            type: integer
          type: array
          title: Pr Number
        pr_merged:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Pr Merged
        tags:
          additionalProperties:
            type: string
          type: object
          title: Tags
        accumulated_cost:
          type: number
          title: Accumulated Cost
          default: 0
        prompt_tokens:
          type: integer
          title: Prompt Tokens
          default: 0
        completion_tokens:
          type: integer
          title: Completion Tokens
          default: 0
        total_tokens:
          type: integer
          title: Total Tokens
          default: 0
        cache_read_tokens:
          type: integer
          title: Cache Read Tokens
          default: 0
        cache_write_tokens:
          type: integer
          title: Cache Write Tokens
          default: 0
      type: object
      required:
        - id
        - user_id
      title: OrgConversationResponse
      description: Response model for a single conversation in an organization.
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````