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

# Delete Upload

> Remove a file upload from a chat

Permanently delete an uploaded file and remove it from storage. This action cannot be undone.

<ParamField header="Authorization" type="string" required>
  Bearer token obtained from the authenticate endpoint.
</ParamField>

<ParamField path="upload_id" type="string" required>
  Unique identifier of the upload to delete. This is the `id` returned by [Upload Files](/api-reference/chats/upload-files) or [List Uploads](/api-reference/chats/list-uploads).
</ParamField>

## Response

<ResponseField name="message" type="string" required>
  Confirmation message.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X DELETE https://api.trellis.sh/v1/chats/uploads/550e8400-e29b-41d4-a716-446655440000 \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests

  response = requests.delete(
      "https://api.trellis.sh/v1/chats/uploads/550e8400-e29b-41d4-a716-446655440000",
      headers={"Authorization": "Bearer YOUR_TOKEN"}
  )
  result = response.json()
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch(
    "https://api.trellis.sh/v1/chats/uploads/550e8400-e29b-41d4-a716-446655440000",
    {
      method: "DELETE",
      headers: { Authorization: "Bearer YOUR_TOKEN" },
    }
  );
  const result = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "message": "Upload deleted successfully"
  }
  ```

  ```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "detail": "Upload not found"
  }
  ```
</ResponseExample>
