---
title: "Erase the entire workspace (Task A4)."
method: DELETE
path: "/v1/workspace"
tags: ["workspace"]
---

# Erase the entire workspace (Task A4).

`DELETE /v1/workspace`

## Request

- Base URL: `https://api.andish.ru` (the document declares no server; this is the origin it was published from)
- URL: `https://api.andish.ru/v1/workspace`
- Auth: none declared

Irreversibly erases the whole workspace: every live person's email and password hash are wiped, every API key is revoked, and every document is soft-deleted alongside the tenant itself. Admin-only, JWT session only (API keys get 401 jwt_required — mirrors DELETE /v1/auth/profile, STRIDE A1). Requires two confirmations: the exact workspace name (confirm_name) AND the caller's own current password (current_password) — a step-up control the security review made a hard requirement (docs/security/stride-team-mode-a4-2026-09-01.md). Deletion is immediate and irreversible: there is no cooling-off period (CEO 2026-09-01). To leave the workspace WITHOUT erasing it for everyone else, use DELETE /v1/auth/profile instead.

## Request body

- WorkspaceDeleteRequest: Request body for DELETE /v1/workspace (Task A4, contract §2.4 + §2.7). Two independent confirmations, both required: confirm_name — exact match against tenants.name (mouse-slip guard; every member of the workspace already knows this). current_password — the CALLER's own current password, verified against their own stored hash (SecEng step-up control, docs/security/stride-team-mode-a4-2026-09-01.md "Согласование с контрактом" точка 1) — a defence against an already-open/stolen admin session, not against a promise of undo (there is none, CEO 2026-09-01).
  - `confirm_name` string, required: Must match the workspace's current name exactly.
  - `current_password` string, required: The caller's OWN current password — re-entered as a step-up confirmation for this irreversible action. Never anyone else's.

## Response `200`

Workspace erased — PII wiped for every live person.

- WorkspaceDeleteResponse: Response for DELETE /v1/workspace (HTTP 200). CEO 2026-09-01 frame: deletion is immediate and irreversible — there is no 30-day cooling-off / undo window. data_removal_eta describes ONLY the (currently unscheduled) physical purge of already-wiped rows.
  - `deleted_at` string, date-time, required: UTC timestamp when the workspace was soft-deleted.
  - `data_removal_eta` string, required: Human-readable note on data removal. Personal data for every affected person is wiped immediately and cannot be undone; this field describes only the (not yet scheduled) physical purge of the remaining soft-deleted rows.
  - `users_affected` integer, required: Number of live people in the workspace whose PII was wiped.

## Other responses

- `401`: API-key auth attempted (jwt_required), or the caller's user/tenant pair does not resolve (user_tenant_mismatch).
- `403`: Insufficient scope — requires 'admin'.
- `410`: Workspace already erased (workspace_deleted).
- `422`: invalid_password — current_password does not match, checked before confirm_name. workspace_name_mismatch — confirm_name does not match the workspace's name exactly.
- `429`: Rate limit exceeded (Tier 1 — 10 req/min per IP).

---

[API](https://skmtc.dev/andish/apis/mnemo-api.md) · [All operations](https://skmtc.dev/andish/apis/mnemo-api/llms.txt) · [OpenAPI document](https://skmtc.dev/andish/apis/mnemo-api/revisions/d5449f23414c?raw)
