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

# Delete a file

> Permanently delete a file and all associated data.

**Requirements:**
- Delete permission on the document
- Workspace must allow manual document management (not sync-only)

Returns 204 (No Content) on success.



## OpenAPI

````yaml /api-reference/openapi-v3.yaml delete /api/v3/files/{id}
openapi: 3.0.3
info:
  title: Paradigm API
  version: xenial-xerus (v3)
  description: >-
    A versatile and adaptable tool designed to integrate Generative AI into your
    applications
servers:
  - url: https://paradigm.lighton.ai
security: []
tags:
  - name: Agents
    description: Operations about agents
  - name: Threads
    description: Operations about agents conversation threads
  - name: Tools
    description: Operations about native tools
  - name: Models
    description: Operations about AI models
  - name: MCP
    description: Operations about MCP servers
  - name: Sources
    description: Operations about sources used by agents conversation threads
  - name: Artifacts
    description: Operations about artifacts generated by agents conversation threads
  - name: Agent
    description: >-
      Operations about agents (deprecated). Please use the 'Agents' API
      component instead.
  - name: Files
    description: Operations about files
  - name: Files Processing
    description: Operations about files processing
  - name: Tags
    description: Operations about tags
  - name: Workspaces
    description: Operations about workspaces
  - name: Users
    description: Operations about users
  - name: User Groups
    description: Operations about user groups
  - name: Companies
    description: Operations about companies
  - name: SCIM
    description: Operations about SCIM
paths:
  /api/v3/files/{id}:
    delete:
      tags:
        - Files
      summary: Delete a file
      description: |-
        Permanently delete a file and all associated data.

        **Requirements:**
        - Delete permission on the document
        - Workspace must allow manual document management (not sync-only)

        Returns 204 (No Content) on success.
      operationId: api_v3_files_destroy
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: A unique integer value identifying this Document.
          required: true
      responses:
        '204':
          description: File deleted successfully (no content returned)
        '400':
          description: Cannot delete from synced workspace
        '401':
          description: Authentication credentials were not provided
        '403':
          description: User does not have permission to delete this file
        '404':
          description: File not found or not accessible
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonErrorResponse'
              examples:
                ServerError:
                  value:
                    error: An error occurred while processing the request.
                  summary: Server error
          description: Internal server error
      security:
        - bearerAuth: []
components:
  schemas:
    CommonErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````