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

# Delete an document

> Deleting document triggers cleanup, which may be performed asynchronously, and therefore the document may still appear in queries for a short time.



## OpenAPI

````yaml /api-reference/openapi.yaml delete /tenants/{tenant_id}/knowledge_base/documents/{document_id}
openapi: 3.0.0
info:
  description: |
    The RAD Security API specification
  title: RAD Security API Spec
  version: 0.0.21
servers:
  - url: https://api.prd.rad.security
security: []
tags:
  - name: integrations
    x-displayName: Integrations
  - name: documents
    x-displayName: Documents
  - name: collections
    x-displayName: Collections
  - name: public
    x-displayName: public
  - name: Knowledge Base
    x-displayName: Knowledge Base
paths:
  /tenants/{tenant_id}/knowledge_base/documents/{document_id}:
    delete:
      tags:
        - Knowledge Base
      summary: Delete an document
      description: >-
        Deleting document triggers cleanup, which may be performed
        asynchronously, and therefore the document may still appear in queries
        for a short time.
      operationId: DeleteDocument
      parameters:
        - $ref: '#/components/parameters/tenantIDParam'
        - $ref: '#/components/parameters/documentIDParam'
      responses:
        '202':
          description: Document deletion initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  parameters:
    tenantIDParam:
      name: tenant_id
      in: path
      description: RAD tenant ID
      required: true
      schema:
        type: string
    documentIDParam:
      name: document_id
      in: path
      description: Document ID
      required: true
      schema:
        type: string
  schemas:
    Document:
      description: Metadata about a document in the knowledge base
      type: object
      required:
        - id
        - tenant_id
        - file_name
        - status
        - collections
        - created_at
        - uploaded_at
        - updated_at
      properties:
        id:
          description: The RAD ID of the document
          type: string
        tenant_id:
          description: The tenant to which the document belongs
          type: string
        account_id:
          description: The account to which the document is linked, if any
          type: string
        file_name:
          description: The name of the document
          type: string
        status:
          description: The current status of the document
          type: string
        collections:
          description: The collections to which the document has been attached
          type: array
          items:
            type: string
        created_at:
          description: When the document was (externally) created
          type: string
          format: date-time
        uploaded_at:
          description: When the document was uploaded to the knowledge base
          type: string
          format: date-time
        updated_at:
          description: When the document's metadata was last updated
          type: string
          format: date-time
    APIError:
      properties:
        code:
          type: string
        request_id:
          type: string
        status:
          type: integer
        validation_details:
          items:
            $ref: '#/components/schemas/ValidationDetail'
          type: array
      type: object
      required:
        - status
    ValidationDetail:
      properties:
        code:
          type: string
        field:
          type: string
        message:
          type: string
        param:
          type: string
      type: object
      required:
        - code
        - field
        - message

````