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

# List threads

> List captain threads for a project.



## OpenAPI

````yaml GET /v1/threads
openapi: 3.1.0
info:
  title: Capy API
  version: 1.0.0
servers:
  - url: https://capy.ai/api
security:
  - bearerAuth: []
tags:
  - name: threads
  - name: sessions
  - name: tasks
  - name: projects
  - name: tags
  - name: models
  - name: usage
  - name: setup
  - name: snapshots
  - name: browser-snapshots
  - name: environment-variables
  - name: automations
paths:
  /v1/threads:
    get:
      tags:
        - threads
      summary: List threads
      description: List captain threads for a project.
      operationId: listThreads
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            default: 20
            type: integer
            minimum: 1
            maximum: 100
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: projectId
          in: query
          required: true
          schema:
            type: string
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - active
              - idle
              - archived
        - name: prNumber
          in: query
          required: false
          schema:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
        - name: branch
          in: query
          required: false
          schema:
            type: string
        - name: slackThreadTs
          in: query
          required: false
          schema:
            type: string
        - name: authorId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            description: >-
              Filter to threads created by this Capy user ID. Mutually exclusive
              with authorEmail.
        - name: authorEmail
          in: query
          required: false
          schema:
            type: string
            format: email
            pattern: >-
              ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            description: >-
              Filter to threads created by the organization member with this
              email address. Returns an empty page if the email does not match
              an organization member. Mutually exclusive with authorId.
        - name: participantId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            description: >-
              Filter to threads this Capy user ID authored or participated in.
              Mutually exclusive with participantEmail.
        - name: participantEmail
          in: query
          required: false
          schema:
            type: string
            format: email
            pattern: >-
              ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            description: >-
              Filter to threads the organization member with this email address
              authored or participated in. Returns an empty page if the email
              does not match an organization member. Mutually exclusive with
              participantId.
        - name: origin
          in: query
          required: false
          schema:
            type: string
            enum:
              - web
              - slack
              - api
              - linear
              - automation
            description: Filter by thread origin source.
        - name: prState
          in: query
          required: false
          schema:
            type: string
            enum:
              - open
              - merged
              - closed
              - none
            description: >-
              Filter by the thread's rolled-up pull request state. Combines with
              prNumber and branch.
        - name: tag
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            description: Filter to threads with this tag name (lowercase).
        - name: slackChannelId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            description: >-
              Filter to threads linked to this Slack channel ID (e.g.
              C0123456789). Combines with slackThreadTs.
        - name: q
          in: query
          required: false
          schema:
            type: string
            description: Free-text search across thread titles and content.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListThreadsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth: []
components:
  schemas:
    ListThreadsResponse:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ThreadListItem'
        nextCursor:
          anyOf:
            - type: string
            - type: 'null'
        hasMore:
          type: boolean
      required:
        - items
        - nextCursor
        - hasMore
      additionalProperties: false
    ThreadListItem:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        id:
          type: string
        projectId:
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
        status:
          type: string
          enum:
            - active
            - idle
            - archived
          description: >-
            Coarse Captain run-loop status retained for compatibility. Prefer
            runState/waitingOn/blockedOn for completion and waiting UX.
        runState:
          type: string
          enum:
            - running
            - queued
            - waiting
            - blocked
            - ready
            - archived
          description: Full computed execution state for the agent thread.
        waitingOn:
          type: array
          items:
            type: string
            enum:
              - task
              - review
              - ci
              - timer
              - worker
          description: Async system dependencies expected to continue without user action.
        blockedOn:
          type: array
          items:
            type: string
            enum:
              - auth
              - permission
          description: User/integration gates required before progress can continue.
        pendingWakeups:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Pending append-and-resume notifications waiting to be processed.
        tasks:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              threadIndex:
                anyOf:
                  - type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  - type: 'null'
              identifier:
                type: string
              title:
                type: string
              status:
                type: string
                enum:
                  - backlog
                  - queued
                  - in_progress
                  - needs_review
                  - completed
                  - error
                  - archived
            required:
              - id
              - threadIndex
              - identifier
              - title
              - status
            additionalProperties: false
        participants:
          type: array
          items:
            type: object
            properties:
              userId:
                type: string
              userType:
                type: string
                enum:
                  - human
                  - service_user
              firstParticipatedAt:
                type: string
              lastParticipatedAt:
                type: string
            required:
              - userId
              - userType
              - firstParticipatedAt
              - lastParticipatedAt
            additionalProperties: false
        pullRequests:
          type: array
          items:
            type: object
            properties:
              number:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              url:
                type: string
              repoFullName:
                type: string
              state:
                type: string
              headRef:
                type: string
              baseRef:
                type: string
              draft:
                type: boolean
            required:
              - number
              - url
              - repoFullName
              - state
              - headRef
              - baseRef
              - draft
            additionalProperties: false
        slackThreads:
          type: array
          items:
            type: object
            properties:
              teamId:
                type: string
              channelId:
                type: string
              threadTs:
                type: string
              url:
                type: string
            required:
              - teamId
              - channelId
              - threadTs
              - url
            additionalProperties: false
        tags:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              color:
                type: string
                enum:
                  - default
                  - primary
                  - success
                  - warning
                  - destructive
                  - blue
                  - purple
                  - pink
                  - orange
                  - lime
            required:
              - name
              - color
            additionalProperties: false
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - projectId
        - title
        - status
        - runState
        - waitingOn
        - blockedOn
        - pendingWakeups
        - tasks
        - participants
        - pullRequests
        - slackThreads
        - tags
        - createdAt
        - updatedAt
      additionalProperties: false
    ErrorResponse:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
          required:
            - code
            - message
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token (capy_xxxx). Generate at capy.ai/settings/tokens

````