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

# Take over thread



## OpenAPI

````yaml /openapi.json post /api/v1/threads/{threadId}/takeover
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: reviewRules
  - name: usage
  - name: users
paths:
  /api/v1/threads/{threadId}/takeover:
    post:
      tags:
        - threads
      summary: Take over thread
      operationId: threads.takeover
      parameters:
        - name: threadId
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Thread
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadEncoded'
        '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'
        '409':
          description: capy/Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/capy_ConflictEncoded'
        '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:
    ThreadEncoded:
      type: object
      properties:
        id:
          type: string
        projectId:
          anyOf:
            - type: string
            - type: 'null'
        authorId:
          anyOf:
            - type: string
            - type: 'null'
        previousAuthorId:
          anyOf:
            - type: string
            - type: 'null'
        title:
          anyOf:
            - type: string
            - type: 'null'
        titleCustom:
          type: boolean
        status:
          type: string
          enum:
            - working
            - waiting
            - idle
            - failed
            - archived
        archived:
          type: boolean
        lastModelId:
          anyOf:
            - type: string
            - type: 'null'
        usage:
          $ref: '#/components/schemas/UsageTotalsEncoded'
        createdAt:
          type: string
        updatedAt:
          type: string
        lastActivityAt:
          anyOf:
            - type: string
            - type: 'null'
        hasUnreads:
          type: boolean
        mentionCount:
          type: integer
        owed:
          type: boolean
        needsYou:
          type: boolean
        crewNeedsYou:
          type: integer
        participated:
          type: boolean
        crewMentionCount:
          type: integer
        captain:
          $ref: '#/components/schemas/ThreadCaptain'
        crewCount:
          type: integer
        member:
          type: boolean
      required:
        - id
        - projectId
        - authorId
        - previousAuthorId
        - title
        - titleCustom
        - status
        - archived
        - lastModelId
        - usage
        - createdAt
        - updatedAt
        - lastActivityAt
        - hasUnreads
        - mentionCount
        - owed
        - member
      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_ConflictEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - capy/Conflict
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
    capy_RateLimitedEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - capy/RateLimited
        retryAfterSeconds:
          type: integer
      required:
        - _tag
        - retryAfterSeconds
      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
    ThreadCaptain:
      type: object
      properties:
        jamId:
          type: string
        name:
          type: string
        avatar:
          $ref: '#/components/schemas/CaptainAvatar'
      required:
        - jamId
        - name
        - avatar
      additionalProperties: false
    CaptainAvatar:
      type: object
      properties:
        kind:
          type: string
          enum:
            - preset
            - emoji
        value:
          type: string
        background:
          type: string
      required:
        - kind
        - value
        - background
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Capy API key
      description: An API key created in Capy under Settings → API.

````