---
title: "Cleanup Orphans"
method: POST
path: "/api/workspace/storage/orphans/cleanup"
tags: ["workspace-storage", "workspace-storage"]
---

# Cleanup Orphans

`POST /api/workspace/storage/orphans/cleanup`

## 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/workspace/storage/orphans/cleanup`
- Auth: none declared

Delete every orphan file (blob + DB row) for this workspace.

Owner-only — destructive and irreversible. Streams per-phase progress
over the ``workspace:storage:cleanup_progress`` WebSocket event so the
UI can render a progress bar.

## Response `200`

Successful Response

- CleanupResult
  - `deleted_files` integer, required
  - `deleted_blobs` integer, required
  - `total_bytes` integer, required

---

[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)
