---
title: "Permanently delete a user file"
method: DELETE
path: "/api/files/{file_id}"
tags: ["Files"]
---

# Permanently delete a user file

`DELETE /api/files/{file_id}`

# Errors
Returns an error if file not found, permission denied, or storage operations fail.

## Path parameters

- `file_id` string, uuid, required

## Response `204`

File permanently deleted from storage and database

## Other responses

- `401` — User authentication needed for file deletion
- `403` — Delete operation forbidden - file belongs to another user
- `404` — File to delete not found or already removed
- `500` — Storage system error during file deletion

## Changes

- **2025-09-24** `ad76e6bdf403` — 2 info
  - the endpoint scheme security `bearerAuth AND cookieAuth` was added to the API
  - the endpoint scheme security `cookieAuth` was removed from the API
- **2025-09-22** `93deff514935` — 1 info
  - endpoint added
- **2025-09-01** `a2488be8a6e4` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/patroninc/apis/patron-api/changes/api/files/:file_id/delete.md)

---

[API](https://skmtc.dev/patroninc/apis/patron-api.md) · [All operations](https://skmtc.dev/patroninc/apis/patron-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/patroninc/patron-api/revisions/1583b1f4c97d/schema)
