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

# List a conversation route's threads

> The threads of ``route_name``, newest activity first, one page at a time.

A thread listing spans every caller and address on the route, so it is admin-only. Each
item carries ``thread_id``, ``client_address``, ``message_count``
and ``last_delivery_status`` summarized from the thread's newest readable record, plus
``last_activity_at`` — the route index's own score, which is what this listing SORTS by,
so the moment shown and the position it is shown in always agree. That score is stamped
when a record is created and again when its turn completes; a later delivery transition
on the same record moves the record's ``updated_at`` but not the thread's activity.

``status`` (one of the delivery-status vocabulary) keeps only threads whose summary status
matches; ``address`` keeps only threads whose id client-address suffix contains that
substring. Neither has a direct index — the per-status indexes are GLOBAL over
``message_id``s, not per-route thread ids — so a filter is a BOUNDED app-side post-scan
and a page that spent its scan budget answers ``truncated: true`` LOUDLY, never a silent
cut. An unknown ``status`` is a loud 400.

Authorization is decided BEFORE the route is looked up, so a non-admin is refused the
same way whether the name routes or not — a 404-here/403-there pair would answer which
route names exist to a caller with no business knowing. An unknown route is a loud 404
to an admin; a ``page`` or ``page_size`` below 1, or a ``page`` above the served
maximum, is a 400. Returns
``{"items", "total", "page", "page_size", "next_page", "truncated"}``, where ``total``
counts the route's indexed threads for an unfiltered listing, or the matches the bounded
scan found for a filtered one.



## OpenAPI

````yaml /openapi.json get /api/conversations/{route_name}/threads
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 14.0.2
servers: []
security: []
paths:
  /api/conversations/{route_name}/threads:
    get:
      tags:
        - conversations
      summary: List a conversation route's threads
      description: >-
        The threads of ``route_name``, newest activity first, one page at a
        time.


        A thread listing spans every caller and address on the route, so it is
        admin-only. Each

        item carries ``thread_id``, ``client_address``, ``message_count``

        and ``last_delivery_status`` summarized from the thread's newest
        readable record, plus

        ``last_activity_at`` — the route index's own score, which is what this
        listing SORTS by,

        so the moment shown and the position it is shown in always agree. That
        score is stamped

        when a record is created and again when its turn completes; a later
        delivery transition

        on the same record moves the record's ``updated_at`` but not the
        thread's activity.


        ``status`` (one of the delivery-status vocabulary) keeps only threads
        whose summary status

        matches; ``address`` keeps only threads whose id client-address suffix
        contains that

        substring. Neither has a direct index — the per-status indexes are
        GLOBAL over

        ``message_id``s, not per-route thread ids — so a filter is a BOUNDED
        app-side post-scan

        and a page that spent its scan budget answers ``truncated: true``
        LOUDLY, never a silent

        cut. An unknown ``status`` is a loud 400.


        Authorization is decided BEFORE the route is looked up, so a non-admin
        is refused the

        same way whether the name routes or not — a 404-here/403-there pair
        would answer which

        route names exist to a caller with no business knowing. An unknown route
        is a loud 404

        to an admin; a ``page`` or ``page_size`` below 1, or a ``page`` above
        the served

        maximum, is a 400. Returns

        ``{"items", "total", "page", "page_size", "next_page", "truncated"}``,
        where ``total``

        counts the route's indexed threads for an unfiltered listing, or the
        matches the bounded

        scan found for a filtered one.
      operationId: get_api_conversations_route_name_threads
      parameters:
        - in: path
          name: route_name
          required: true
          schema:
            type: string
        - description: 1-based page number, newest activity first.
          in: query
          name: page
          required: false
          schema:
            default: 1
            maximum: 1000000
            minimum: 1
            title: Page
            type: integer
        - description: Items per page. A larger value is capped to 200, never refused.
          in: query
          name: pageSize
          required: false
          schema:
            default: 50
            minimum: 1
            title: Pagesize
            type: integer
        - description: >-
            Keep only threads whose newest record's delivery_status is this one
            (validated against the delivery-status vocabulary; an unknown value
            is a 400).
          in: query
          name: status
          required: false
          schema:
            title: Status
            type: string
        - description: >-
            Keep only threads whose id client-address suffix contains this
            substring.
          in: query
          name: address
          required: false
          schema:
            title: Address
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/ThreadSummaryEnvelope'
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ThreadSummaryEnvelope:
      description: >-
        A page of thread summaries. ``next_page`` is ``null`` on the last page;

        ``truncated`` is ``true`` when a filtered scan spent its budget before
        the page

        filled.
      properties:
        items:
          items:
            $ref: '#/components/schemas/ThreadSummaryRow'
          title: Items
          type: array
        next_page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Page
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        total:
          title: Total
          type: integer
        truncated:
          title: Truncated
          type: boolean
      required:
        - items
        - total
        - page
        - page_size
        - next_page
        - truncated
      title: ThreadSummaryEnvelope
      type: object
    Error:
      properties:
        code:
          description: >-
            Stable machine-readable reason a client keys a dedicated error state
            on, present on refusals that opt in (e.g. a 501 not-configured
            refusal). Optional: absent when the error carries only a
            human-readable message.
          type: string
        error:
          type: string
      required:
        - error
      type: object
    ThreadSummaryRow:
      description: >-
        One thread's activity summary, drawn from its newest readable record.

        ``last_activity_at`` is the route index's own sort score;
        ``last_delivery_status`` is

        that record's delivery-status wire string.
      properties:
        client_address:
          title: Client Address
          type: string
        last_activity_at:
          title: Last Activity At
          type: number
        last_delivery_status:
          title: Last Delivery Status
          type: string
        message_count:
          title: Message Count
          type: integer
        thread_id:
          title: Thread Id
          type: string
      required:
        - thread_id
        - client_address
        - last_activity_at
        - message_count
        - last_delivery_status
      title: ThreadSummaryRow
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````