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

# Close thread

> Closes a thread masquerading as the specified agent



## OpenAPI

````yaml /api_v1.json delete /api/v1/puppet/{namespace}/{sessionId}/{agentName}/thread
openapi: 3.1.0
info:
  title: Coral Server API
  version: '1.0'
servers: []
security: []
tags: []
externalDocs:
  url: /
paths:
  /api/v1/puppet/{namespace}/{sessionId}/{agentName}/thread:
    delete:
      tags:
        - puppet
      summary: Close thread
      description: Closes a thread masquerading as the specified agent
      operationId: puppetCloseThread
      parameters:
        - name: namespace
          in: path
          description: The session's namespace
          required: true
          deprecated: false
          explode: false
          schema:
            type: string
            title: String
        - name: sessionId
          in: path
          description: The session's ID
          required: true
          deprecated: false
          explode: false
          schema:
            type: string
            title: String
        - name: agentName
          in: path
          description: The agent's name
          required: true
          deprecated: false
          explode: false
          schema:
            type: string
            title: String
      requestBody:
        description: Thread close input
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloseThreadInput'
        required: false
      responses:
        '200':
          description: Success
          headers: {}
        '400':
          description: Thread cannot be closed
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteException'
        '404':
          description: Agent or thread not found
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteException'
      deprecated: false
      security:
        - token: []
components:
  schemas:
    CloseThreadInput:
      type: object
      properties:
        threadId:
          type: string
          description: The unique identifier for the thread to close
          title: String
        summary:
          type: string
          description: >-
            A shortened summary of all important details in this thread.  This
            could also be considered the thread's "conclusion".
          title: String
      required:
        - summary
        - threadId
      title: CloseThreadInput
    RouteException:
      type: object
      properties:
        message:
          type: string
          title: String
      required:
        - message
      title: RouteException
  securitySchemes:
    token:
      type: http
      scheme: bearer
      bearerFormat: Configured token

````