---
title: "Delete File"
method: DELETE
path: "/api/files/{file_id}"
tags: ["files", "files"]
---

# Delete File

`DELETE /api/files/{file_id}`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/files/{file_id}`
- Auth: none declared

Hard-delete a file: wipe storage blobs for all versions, then cascade
DELETEs across file_versions / file_pages / file_processing_jobs /
file_sends / rag_chunks / files. Workspace-scoped — cross-workspace
requests 404.

Mirrors the per-file cleanup the channel-disconnect handler does at
`channels/accounts.py:660-885` so the two paths stay consistent.
Used by the new /files workspace UI to let operators clean up
orphaned screenshots, browser-mcp uploads, voice-clone reference
clips, and other unbound files that the channel-disconnect cleanup
skips (it only touches files bound to threads of the disconnected
channel).

## Path parameters

- `file_id` integer, required

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
