---
title: "Delete an uploaded file"
method: DELETE
path: "/v1/files/{file_id}"
tags: ["Files"]
---

# Delete an uploaded file

`DELETE /v1/files/{file_id}`

Permanently delete an uploaded file from the session. Only files that were uploaded via `POST /v1/files` can be deleted; sandbox-generated output files cannot be deleted through this endpoint.

## Path parameters

- `file_id` string, required

## Query parameters

- `scope_id` string, required — Session / container identifier.

## Response `200`

Successful Response

- DeletedFile — Confirmation that a file was deleted.
  - `id` string, required — Relative path of the file that was deleted.
  - `type` 'file_deleted' — Object type discriminator, always 'file_deleted'.

## Other responses

- `401` — Unauthorized
- `404` — File not found or is a sandbox output (outputs cannot be deleted).
- `422` — Validation Error
- `503` — Files API not configured (volume_root not set).

---

[API](https://skmtc.net/zylon-ai/apis/private-gpt-api.md) · [All operations](https://skmtc.net/zylon-ai/apis/private-gpt-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zylon-ai/private-gpt-api/versions/594fa71dfb90/schema)
