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

# Delete file

> Permanently remove a file by file number.

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://upload.autorender.io/api/v1/files/2338056701' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "file deleted successfully"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "File not found"
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized",
    "message": "Invalid or missing API key"
  }
  ```
</ResponseExample>

## Overview

Deletes the file identified by **`fileNo`**. The request needs no body.

<Warning>
  Deletion is permanent, across both storage and the database. You cannot undo it.
</Warning>

## Path parameters

| Parameter | Description           |
| --------- | --------------------- |
| `fileNo`  | File number to delete |

## Next steps

<CardGroup cols={2}>
  <Card title="List files" icon="list" iconType="solid" href="/docs/api-reference/list-files">
    Page through the files that remain in your workspace.
  </Card>

  <Card title="Delete folder" icon="folder-minus" iconType="solid" href="/docs/api-reference/delete-folder">
    Remove a folder from your workspace.
  </Card>
</CardGroup>


## OpenAPI

````yaml api-reference/openapi.json DELETE /api/v1/files/{fileNo}
openapi: 3.0.0
info:
  title: AutoRender Public API
  description: >-
    REST API for uploading, managing, and serving media assets. All endpoints
    require an API key via the x-api-key header or Authorization: Bearer <key>.
  version: 1.0.0
  contact:
    name: AutoRender Support
    email: support@autorender.io
servers:
  - url: https://app-api.autorender.io
    description: Production server
security:
  - apiKey: []
tags:
  - name: Uploads
    description: Upload endpoints (API key required)
  - name: Files
    description: File management endpoints (API key required)
  - name: Folders
    description: Folder management endpoints (API key required)
paths:
  /api/v1/files/{fileNo}:
    delete:
      tags:
        - Files
      summary: Delete file
      operationId: deleteFile
      parameters:
        - schema:
            type: string
          in: path
          name: fileNo
          required: true
      responses:
        '204':
          description: File deleted
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                  - error
                  - message
                additionalProperties: false
                description: Unauthorized
        '404':
          description: File not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
                description: File not found
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  retryAfterSeconds:
                    type: number
                required:
                  - error
                  - message
                additionalProperties: false
                description: Rate limit exceeded
        '503':
          description: Limit service unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
                description: Limit service unavailable
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        API key for public endpoints. Can also be provided via Authorization:
        Bearer <key>

````