---
title: "Permanently delete an owned workspace and queue physical object cleanup."
method: DELETE
path: "/v1/workspaces/{workspaceId}"
---

# Permanently delete an owned workspace and queue physical object cleanup.

`DELETE /v1/workspaces/{workspaceId}`

## Request

- Base URL: `https://api.bangermail.com`
- URL: `https://api.bangermail.com/v1/workspaces/{workspaceId}`
- Auth: HTTP bearer

Requires the authenticated actor to be an owner. Static workspace API keys cannot delete a workspace; a human session or user-authorized OAuth grant with workspace:admin is required. Paid subscriptions must be cancelled first. PostgreSQL state is deleted atomically and all B2 object versions under the workspace prefix are purged asynchronously.

## Response `202`

The canonical workspace was deleted and physical object cleanup was queued.

- object
  - `data` WorkspaceDeletionReceipt, required
    - `id` string, uuid, required
    - `name` string, required
    - `deleted` true, required
    - `storage_cleanup` 'queued', required
    - `next_workspace_id` string, uuid

## Other responses

- `403`: The actor is not an owner or the credential cannot delete workspaces.
- `404`: The workspace does not exist or is not available to this actor.
- `409`: The paid subscription is active or deletion conflicted with another change.

---

[API](https://skmtc.dev/bangermail/apis/banger-api.md) · [All operations](https://skmtc.dev/bangermail/apis/banger-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bangermail/apis/banger-api/revisions/0705eb6ef2bc?raw)
