> ## 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 folder

> Delete a folder by folder number.

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

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

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

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

## Overview

Removes the folder identified by **`folderNo`**. The request needs no body.

<Warning>
  The request fails if the folder still contains files. Empty the folder first, then delete it.
</Warning>

## Path parameters

| Parameter  | Description             |
| ---------- | ----------------------- |
| `folderNo` | Folder number to delete |

## Next steps

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

  <Card title="Delete file" icon="trash" iconType="solid" href="/docs/api-reference/delete-file">
    Remove the files inside a folder before deleting it.
  </Card>
</CardGroup>


## OpenAPI

````yaml api-reference/openapi.json DELETE /api/v1/folders/{folderNo}
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/folders/{folderNo}:
    delete:
      tags:
        - Folders
      summary: Delete folder
      operationId: deleteFolder
      parameters:
        - schema:
            type: string
          in: path
          name: folderNo
          required: true
      responses:
        '204':
          description: Folder deleted
        '400':
          description: Invalid folder number
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
                description: Invalid folder number
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
                description: Unauthorized
        '404':
          description: Folder not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
                description: Folder 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>

````