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

# Bulk Delete Knowledge Base Documents

> Delete multiple documents or folders from the knowledge base. Each id succeeds or fails independently.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/convai/knowledge-base/bulk-delete
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/knowledge-base/bulk-delete:
    post:
      tags:
        - Agents Platform
      summary: Bulk Delete Knowledge Base Documents
      description: >-
        Delete multiple documents or folders from the knowledge base. Each id
        succeeds or fails independently.
      operationId: post_knowledge_base_bulk_delete_route
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_Bulk_delete_knowledge_base_documents_v1_convai_knowledge_base_bulk_delete_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  oneOf:
                    - $ref: >-
                        #/components/schemas/KnowledgeBaseBulkDeleteSuccessfulResponseModel
                    - $ref: '#/components/schemas/BatchFailureResponseModel'
                  discriminator:
                    propertyName: status
                    mapping:
                      success:
                        $ref: >-
                          #/components/schemas/KnowledgeBaseBulkDeleteSuccessfulResponseModel
                      failure:
                        $ref: '#/components/schemas/BatchFailureResponseModel'
                title: >-
                  Response Bulk Delete Knowledge Base Documents V1 Convai
                  Knowledge Base Bulk Delete Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_Bulk_delete_knowledge_base_documents_v1_convai_knowledge_base_bulk_delete_post:
      properties:
        document_ids:
          items:
            type: string
          type: array
          maxItems: 20
          minItems: 1
          uniqueItems: true
          title: Document Ids
          description: The ids of documents or folders from the knowledge base.
          examples:
            - - 21m00Tcm4TlvDq8ikWAM
              - 31m00Tcm4TlvDq8ikWBM
        force:
          type: boolean
          title: Force
          description: >-
            If set to true, documents or folders will be deleted regardless of
            whether they are used by any agents and will be removed from the
            dependent agents. For non-empty folders, this will also delete all
            child documents and folders.
          default: false
      type: object
      required:
        - document_ids
      title: >-
        Body_Bulk_delete_knowledge_base_documents_v1_convai_knowledge_base_bulk_delete_post
    KnowledgeBaseBulkDeleteSuccessfulResponseModel:
      properties:
        status:
          type: string
          const: success
          title: Status
          default: success
        data:
          $ref: '#/components/schemas/KnowledgeBaseDeletedResponseModel'
      type: object
      required:
        - status
        - data
      title: KnowledgeBaseBulkDeleteSuccessfulResponseModel
    BatchFailureResponseModel:
      properties:
        status:
          type: string
          const: failure
          title: Status
          default: failure
        error_code:
          type: integer
          title: Error Code
        error_status:
          type: string
          title: Error Status
        error_message:
          type: string
          title: Error Message
      type: object
      required:
        - status
        - error_code
        - error_status
        - error_message
      title: BatchFailureResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KnowledgeBaseDeletedResponseModel:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
        - id
      title: KnowledgeBaseDeletedResponseModel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````