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

# Delete File

> Permanently delete a file.

Permanently delete a file from storage.

<Warning>
  Deletion is permanent and cannot be undone. The file will be removed from storage immediately.
</Warning>

## Path Parameters

<ParamField path="id" type="string" required>
  The file ID. Example: `f_abc123xyz`
</ParamField>

## Response

<ResponseField name="success" type="boolean" required>
  Always `true` on successful deletion.
</ResponseField>

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl -X DELETE https://api.stashfyle.com/v1/files/f_abc123xyz \
    -H "Authorization: Bearer sk_live_xxx"
  ```

  ```javascript JavaScript theme={null}
  await fetch('https://api.stashfyle.com/v1/files/f_abc123xyz', {
    method: 'DELETE',
    headers: { 'Authorization': 'Bearer sk_live_xxx' }
  });
  ```

  ```python Python theme={null}
  requests.delete(
      'https://api.stashfyle.com/v1/files/f_abc123xyz',
      headers={'Authorization': 'Bearer sk_live_xxx'}
  )
  ```
</CodeGroup>

```json Response theme={null}
{
  "success": true
}
```

## Errors

| Code           | Status | Description                       |
| -------------- | ------ | --------------------------------- |
| `unauthorized` | 401    | Invalid or missing API key        |
| `not_found`    | 404    | File not found or already deleted |
