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

# Delete Document from Knowledge Base

> Deletes a specific document from an existing Knowledge Base using its document ID.



## OpenAPI

````yaml DELETE /ext/kb/doc/{id}
openapi: 3.0.3
info:
  title: TruGen Developer Platform API
  version: 1.0.0
  description: OpenAPI specification for MCP endpoint
servers:
  - url: https://api.trugen.ai/v1
security: []
paths:
  /ext/kb/doc/{id}:
    delete:
      summary: Delete a Document from Knowledge Base
      description: >-
        Deletes a specific document from an existing Knowledge Base using its
        document ID.
      operationId: deleteKnowledgeBaseDocument
      parameters:
        - name: id
          in: path
          required: true
          description: UUID of the document to be deleted
          schema:
            type: string
            format: uuid
            example: 0ebaba9d-2221-46bc-a3b4-b013252e49be
      responses:
        '200':
          description: Document deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: UUID of the deleted document from the Knowledge Base.
                    example: 0ebaba9d-2221-46bc-a3b4-b013252e49be
                  message:
                    type: string
                    example: Document deleted successfully
              example:
                id: 0ebaba9d-2221-46bc-a3b4-b013252e49be
                message: Document deleted successfully
        '401':
          description: Unauthorized – Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: 'Unauthorized: not a valid authorization api key'
        '404':
          description: Document not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                message: Document not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Failed to retrieve knowledge base
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````