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

# List threads

> Returns threads that the current customer has access to in a given chat.



## OpenAPI

````yaml /api/customer-chat/v3.6/openapi.json post /action/list_threads
openapi: 3.1.0
info:
  title: Customer Chat API
  version: '3.6'
servers:
  - url: https://api.livechatinc.com/v3.6/customer
security:
  - CustomerBearerToken: []
tags:
  - name: Chats
  - name: Configuration
  - name: Events
  - name: Localization
  - name: Properties
  - name: Customers
  - name: Status
  - name: Other
paths:
  /action/list_threads:
    post:
      tags:
        - Chats
      summary: List threads
      description: Returns threads that the current customer has access to in a given chat.
      operationId: list-threads
      parameters:
        - $ref: '#/components/parameters/organization_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListThreadsRequest'
            example:
              chat_id: PWJ8Y4THAV
      responses:
        '200':
          description: Threads.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListThreadsResponse'
              example:
                threads:
                  - id: K600PKZON8
                    created_at: '2026-06-17T07:57:41.512000Z'
                    active: true
                    user_ids:
                      - b7eff798-f8df-4364-8059-649c35c9ed0c
                      - bbb67d600796e9f277e360e842418833
                    events:
                      - id: Q20N9CKRX2_1
                        created_at: '2026-06-17T07:57:41.512000Z'
                        recipients: all
                        type: message
                        text: Hello
                        author_id: bbb67d600796e9f277e360e842418833
                    properties: {}
                    access:
                      group_ids:
                        - 0
                    previous_thread_id: K600PKZOM8
                    next_thread_id: K600PKZOO8
                found_threads: 42
                next_page_id: MTUxNzM5ODEzMTQ5Ng==
                previous_page_id: MTUxNzM5ODEzMTQ5Nw==
components:
  parameters:
    organization_id:
      name: organization_id
      in: query
      required: true
      schema:
        type: string
      description: Unique identifier of the organization.
  schemas:
    ListThreadsRequest:
      type: object
      required:
        - chat_id
      properties:
        chat_id:
          type: string
          description: The chat ID.
        sort_order:
          type: string
          enum:
            - asc
            - desc
          default: desc
          description: |-
            - `asc` — oldest threads first
            - `desc` — newest threads first
        limit:
          type: integer
          default: 3
          maximum: 100
          description: >-
            Maximum number of records per page. Cannot be used together with
            `min_events_count`.
        page_id:
          type: string
          description: Pagination token. Cannot be used together with `min_events_count`.
        min_events_count:
          type: integer
          minimum: 1
          maximum: 100
          description: >-
            Minimum number of events to return across threads. Returns as many
            latest threads as needed to meet this condition. Cannot be used
            together with `limit` or `page_id`.
    ListThreadsResponse:
      type: object
      properties:
        threads:
          type: array
          items:
            $ref: '#/components/schemas/Thread'
          description: >-
            Array of [thread
            objects](/api/customer-chat/v3.6/data-structures#threads).
        found_threads:
          type: integer
          description: Total number of found threads.
        next_page_id:
          type: string
          description: The pagination token for the next page.
        previous_page_id:
          type: string
          description: The pagination token for the previous page.
    Thread:
      type: object
      description: '[Thread object](/api/customer-chat/v3.6/data-structures#threads).'
      properties:
        id:
          type: string
          description: The thread ID.
        created_at:
          type: string
          description: The date and time in UTC.
        active:
          type: boolean
          description: 'If `true`: the thread is active.'
        user_ids:
          type: array
          items:
            type: string
          description: The IDs of users present in the thread.
        events:
          type: array
          items:
            type: object
            additionalProperties: true
          description: The thread events.
        properties:
          $ref: '#/components/schemas/Properties'
        access:
          $ref: '#/components/schemas/Access'
        previous_thread_id:
          type: string
          description: The ID of the preceding thread.
        next_thread_id:
          type: string
          description: The ID of the following thread.
        queue:
          type: object
          description: Queue position. Present only if the chat is in the queue.
          properties:
            position:
              type: integer
            wait_time:
              type: integer
            queued_at:
              type: string
    Properties:
      type: object
      additionalProperties: true
      description: Properties object.
    Access:
      type: object
      properties:
        group_ids:
          type: array
          items:
            type: integer
          description: The group IDs. `0` means all agents can see it.
  securitySchemes:
    CustomerBearerToken:
      type: http
      scheme: bearer
      description: >-
        Customer access token obtained from the [customer authorization
        flow](/authentication/customer-tokens).
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````