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



## OpenAPI

````yaml /openapi.json get /api/v1/threads/{threadId}/subagents
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: captains
  - name: folders
  - name: subagents
  - name: tasks
  - name: messages
  - name: streams
  - name: reviews
  - name: reviewRules
  - name: reviewFilters
  - name: usage
  - name: users
paths:
  /api/v1/threads/{threadId}/subagents:
    get:
      tags:
        - subagents
      summary: List subagents
      operationId: subagents.list
      parameters:
        - name: threadId
          in: path
          schema:
            type: string
          required: true
        - name: after
          in: query
          schema:
            type: string
          required: false
        - name: limit
          in: query
          schema:
            type: integer
          required: false
      responses:
        '200':
          description: SubagentPage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubagentPageEncoded'
        '401':
          description: capy/Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_UnauthorizedEncoded'
        '403':
          description: capy/Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_ForbiddenEncoded'
        '404':
          description: capy/ThreadNotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_ThreadNotFoundEncoded'
        '429':
          description: capy/RateLimited
          headers:
            retry-after:
              schema:
                type: integer
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_RateLimitedEncoded'
      security:
        - bearerAuth: []
components:
  schemas:
    SubagentPageEncoded:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/SubagentEncoded'
        cursor:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - items
        - cursor
      additionalProperties: false
    capy_UnauthorizedEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - capy/Unauthorized
      required:
        - _tag
      additionalProperties: false
    capy_ForbiddenEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - capy/Forbidden
      required:
        - _tag
      additionalProperties: false
    capy_ThreadNotFoundEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - capy/ThreadNotFound
        threadId:
          type: string
      required:
        - _tag
        - threadId
      additionalProperties: false
    capy_RateLimitedEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - capy/RateLimited
        retryAfterSeconds:
          type: integer
      required:
        - _tag
        - retryAfterSeconds
      additionalProperties: false
    SubagentEncoded:
      type: object
      properties:
        id:
          type: string
        threadId:
          type: string
        parentId:
          type: string
        subagentPath:
          type: string
        taskPath:
          type: string
        projectId:
          anyOf:
            - type: string
            - type: 'null'
        title:
          anyOf:
            - type: string
            - type: 'null'
        status:
          type: string
          enum:
            - working
            - waiting
            - idle
            - done
            - failed
        archived:
          type: boolean
        usage:
          $ref: '#/components/schemas/UsageTotalsEncoded'
        createdAt:
          type: string
        updatedAt:
          type: string
        lastActivityAt:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - threadId
        - parentId
        - subagentPath
        - taskPath
        - projectId
        - title
        - status
        - archived
        - usage
        - createdAt
        - updatedAt
        - lastActivityAt
      additionalProperties: false
    UsageTotalsEncoded:
      type: object
      properties:
        llmCredits:
          anyOf:
            - type: number
            - type: string
              enum:
                - Infinity
                - '-Infinity'
                - NaN
        imageCredits:
          anyOf:
            - type: number
            - type: string
              enum:
                - Infinity
                - '-Infinity'
                - NaN
        vmCredits:
          anyOf:
            - type: number
            - type: string
              enum:
                - Infinity
                - '-Infinity'
                - NaN
        totalCredits:
          anyOf:
            - type: number
            - 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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.