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

# Delete File

> Schedule deletion of a gallery file (asynchronous cleanup).

## Method

`DELETE` `/v1/gallery/files/:id`

## Path Parameters

<ParamField path="id" type="string">Gallery file ID.</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.voyantcloud.com/v1/gallery/files/gal_file_123" \
    -H "Authorization: Bearer $VOYANT_API_KEY"
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/gallery/files/gal_file_123", {
    method: "DELETE",
    headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` },
  })
  ```

  ```python Python theme={null}
  import os, requests

  resp = requests.delete(
    "https://api.voyantcloud.com/v1/gallery/files/gal_file_123",
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}"},
  )
  payload = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 202 Accepted theme={null}
  {
    "message": "File deletion scheduled",
    "status": "scheduled",
    "fileId": "gal_file_123"
  }
  ```
</ResponseExample>

<Warning>Deletion is asynchronous. The file moves to `status: deleting`, is queued for removal from storage, and a `gallery.file.deleted` webhook fires after the background job finishes.</Warning>
