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

# Delete File

> Delete File



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/common/api.json delete /kb/v1/files/{id}
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /kb/v1/files/{id}:
    delete:
      tags:
        - Files
      summary: Delete File
      description: Delete File
      operationId: deleteFile
      parameters:
        - name: id
          description: Unique ID of the file
          required: true
          in: path
          schema:
            type: string
          example: 5f7b1b1b1b1b1b1b1b1b1b1b
      responses:
        '202':
          description: The file has been deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusAccepted'
        '409':
          description: The file is attached to at least one knowledge base
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: object
                    properties:
                      message:
                        type: string
                        example: >-
                          File is still attached to knowledge bases. Please
                          detach first to delete
                      attachedKnowledgeBases:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            title:
                              type: string
      security:
        - bearer: []
components:
  schemas:
    StatusAccepted:
      type: object
      properties:
        message:
          type: string
          example: accepted
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````