---
title: "Delete a file"
method: DELETE
path: "/api/v1/folders/{id}/files/{message_id}"
tags: ["Folders"]
---

# Delete a file

`DELETE /api/v1/folders/{id}/files/{message_id}`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/folders/{id}/files/{message_id}`
- Auth: one of:
  - API key in header `api-key`
  - OAuth 2 (authorization code, authorization URL `https://saltapp.ai/oauth2/authorize`, token URL `https://saltapp.ai/api/oauth2/token`, scopes: `chat`)

The adder, the owner, or an admin. Leaves a tombstone.

## Path parameters

- `id` string, required
- `message_id` string, required

## Response `200`

Deleted.

- object
  - `message_id` string

## Other responses

- `401`: Missing or invalid credentials.
- `403`: Forbidden
- `404`: Not found.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
