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

# Delete Files

> Delete a file from the system



## OpenAPI

````yaml DELETE /files/delete/{id}
openapi: 3.1.0
info:
  title: duohub Retriever API
  description: >-
    Retrieve assisted or non-assisted memory from a duohub knowledge graph. For
    best performance, use the official `duohub` Python package.
  version: 1.0.0
servers:
  - url: https://api.duohub.ai
security:
  - APIKeyHeader: []
paths:
  /files/delete/{id}:
    delete:
      tags:
        - Files
      summary: Delete File
      description: Delete a file from the system
      operationId: deleteFile
      parameters:
        - name: id
          in: path
          required: true
          description: ID of the file to delete
          schema:
            type: string
      responses:
        '200':
          description: File deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                    description: Success message
                required:
                  - status
                  - message
                example:
                  status: success
                  message: File deleted successfully
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                  status:
                    type: string
                    enum:
                      - bad_request
                required:
                  - error
                  - status
                examples:
                  no_headers:
                    value:
                      error: No headers provided
                      status: bad_request
                  invalid_json:
                    value:
                      error: Invalid JSON in request body
                      status: bad_request
                  missing_id:
                    value:
                      error: File ID is required
                      status: bad_request
        '401':
          description: Unauthorized - API key is missing
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                  status:
                    type: string
                    enum:
                      - unauthorized
                required:
                  - error
                  - status
                example:
                  error: API key is required
                  status: unauthorized
        '403':
          description: Forbidden - Invalid API key or unauthorized access
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                  status:
                    type: string
                    enum:
                      - forbidden
                required:
                  - error
                  - status
                examples:
                  invalid_key:
                    value:
                      error: Invalid API key
                      status: forbidden
                  unauthorized:
                    value:
                      error: You don't have permission to delete this file
                      status: forbidden
        '404':
          description: File not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                  status:
                    type: string
                    enum:
                      - not_found
                required:
                  - error
                  - status
                example:
                  error: File not found
                  status: not_found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                  status:
                    type: string
                    enum:
                      - error
                required:
                  - error
                  - status
                example:
                  error: Internal server error
                  status: error
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Your duohub API key. Type: str'

````