> ## 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.

# Threads



## OpenAPI

````yaml /openapi.json get /api/v1/folders/{folderId}/threads
openapi: 3.1.0
info:
  title: Capy API
  version: 1.0.0
  description: Programmatic access to Capy's agent platform.
servers:
  - url: https://api.capy.ai
security:
  - bearerAuth: []
tags:
  - name: automations
  - name: projects
  - name: threads
  - name: folders
  - name: tasks
  - name: messages
  - name: reviews
  - name: usage
  - name: users
paths:
  /api/v1/folders/{folderId}/threads:
    get:
      tags:
        - folders
      summary: Threads
      operationId: folders.threads
      parameters:
        - name: folderId
          in: path
          schema:
            type: string
          required: true
        - name: after
          in: query
          schema:
            type: string
            allOf:
              - pattern: ^-?\d{1,15}:.+
          required: false
        - name: limit
          in: query
          schema:
            type: string
            allOf:
              - pattern: ^[+-]?\d*\.?\d+(?:[Ee][+-]?\d+)?$
          required: false
      responses:
        '200':
          description: FolderThreadPage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderThreadPage'
        '401':
          description: capy/Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_Unauthorized'
        '403':
          description: capy/Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_Forbidden'
        '404':
          description: capy/ThreadOrganizationNotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_ThreadOrganizationNotFound'
      security:
        - bearerAuth: []
components:
  schemas:
    FolderThreadPage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Thread'
        cursor:
          anyOf:
            - type: string
              allOf:
                - pattern: ^-?\d{1,15}:.+
            - type: 'null'
      required:
        - items
        - cursor
      additionalProperties: false
    capy_Unauthorized:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - capy/Unauthorized
      required:
        - _tag
      additionalProperties: false
    capy_Forbidden:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - capy/Forbidden
      required:
        - _tag
      additionalProperties: false
    capy_ThreadOrganizationNotFound:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - capy/ThreadOrganizationNotFound
      required:
        - _tag
      additionalProperties: false
    Thread:
      type: object
      properties:
        id:
          type: string
        projectId:
          anyOf:
            - type: string
            - type: 'null'
        authorId:
          anyOf:
            - type: string
            - type: 'null'
        title:
          anyOf:
            - type: string
            - type: 'null'
        titleCustom:
          type: boolean
        status:
          type: string
          enum:
            - active
            - waiting
            - pending_user
            - error
            - ready_for_review
            - idle
            - archived
        archived:
          type: boolean
        lastModelId:
          anyOf:
            - type: string
            - type: 'null'
        usage:
          $ref: '#/components/schemas/UsageTotals'
        createdAt:
          type: string
        updatedAt:
          type: string
        lastActivityAt:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - projectId
        - authorId
        - title
        - titleCustom
        - status
        - archived
        - lastModelId
        - usage
        - createdAt
        - updatedAt
        - lastActivityAt
      additionalProperties: false
    UsageTotals:
      type: object
      properties:
        llmCredits:
          anyOf:
            - anyOf:
                - type: number
                - type: string
                  enum:
                    - NaN
                - type: string
                  enum:
                    - Infinity
                - type: string
                  enum:
                    - '-Infinity'
            - type: string
              enum:
                - Infinity
                - '-Infinity'
                - NaN
        imageCredits:
          anyOf:
            - anyOf:
                - type: number
                - type: string
                  enum:
                    - NaN
                - type: string
                  enum:
                    - Infinity
                - type: string
                  enum:
                    - '-Infinity'
            - type: string
              enum:
                - Infinity
                - '-Infinity'
                - NaN
        vmCredits:
          anyOf:
            - anyOf:
                - type: number
                - type: string
                  enum:
                    - NaN
                - type: string
                  enum:
                    - Infinity
                - type: string
                  enum:
                    - '-Infinity'
            - type: string
              enum:
                - Infinity
                - '-Infinity'
                - NaN
        totalCredits:
          anyOf:
            - anyOf:
                - type: number
                - type: string
                  enum:
                    - NaN
                - type: string
                  enum:
                    - Infinity
                - type: string
                  enum:
                    - '-Infinity'
            - type: string
              enum:
                - Infinity
                - '-Infinity'
                - NaN
      required:
        - llmCredits
        - imageCredits
        - vmCredits
        - totalCredits
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Capy API key
      description: An API key created in Capy under Settings → API.

````