# Delete a workspace

> Who can delete a workspace, what goes and what stays, what can stand in the way, and why an API key can never do it. Export what you need first.

Source: https://critlab.app/docs/deleting-a-workspace

An owner can delete a workspace from its settings. It is immediate and permanent: everything in the workspace is deleted for good, and critlab cannot bring it back. This page says who can do it, what goes, what stays, what can stand in the way, and why only a person in a browser can do it. It applies to critlab cloud and to self-hosted installs alike.

> **Export first**
>
> Deleting a workspace cannot be undone. Take a copy of what you want to keep before you start; see [Export first](#export-first).

## Who can delete a workspace

Only an **owner** of the workspace, and only from a browser session. Admins, members and guests do not see the option: if you are an admin and the workspace has to go, ask an owner, or ask an owner to make you one first (see [Roles and guest access](/docs/enterprise/roles)).

An API key can never delete a workspace, whatever role its person has and whatever scopes it carries. An agent that is asked to do it gets the reason and the page to open instead; see [Why it is browser-only](#why-it-is-browser-only).

## Delete it

1. Open the workspace in the workspace menu, then go to **Settings → General**.
2. In the **Delete workspace** section, choose **Delete workspace…**.
3. Read the dialog. It counts what would go: prototypes, versions, members, guests, pending invitations, custom domains, single sign-on connections, directory sync tokens and integrations. If anything stands in the way, it says so first and the button stays off.
4. Type the workspace's exact name, with the same capital letters, and choose **Delete workspace permanently**.

You land in your next workspace and see one confirmation. Everyone else in the workspace gets one email saying it was deleted and by whom; you get a confirmation of your own.

If the workspace is the only one you belong to, the dialog does not offer to delete it and the API refuses, because your account would be left with nowhere to open. A workspace where you are a member or a guest counts as another one. To leave critlab altogether, delete your account in **Settings → Account → Profile**, or make someone else an owner or remove the other people first in **Settings → Members**.

## What is deleted

- **Prototypes.** Every prototype with all of its versions, comments, replies, voice notes, screenshots and comment images, thumbnails and share links. A share link stops working at once.
- **Folders and what they hold.** Folders, folder images, the links and documents in a folder's context, and every guest's folder grant.
- **Settings.** The workspace's name and defaults, custom domains (they are released at the certificate provider), single sign-on and directory sync settings with their tokens, integrations and webhooks, a bring-your-own bucket's connection and the objects critlab stored in it, and billing records.
- **People's access.** Memberships, guest access and pending invitations. Everyone loses access immediately and their live connections to the workspace close.
- **The audit log** of the workspace.

## What stays

- **People's accounts and their other workspaces.** Members and guests keep their accounts. Only their access to this workspace ends.
- **A record that it happened.** critlab keeps a short record that a workspace was deleted: its id, the date, an id for the owner who deleted it and counts of what it held. It holds no names, no email addresses and no content.

## What can stand in the way

The dialog lists these before it lets you type anything, and the API refuses with the same sentence.

- **The workspace is suspended by critlab.** It cannot be deleted while the case is open, so that the evidence survives. Write to support@critlab.app about it.
- **A paid subscription is still running.** Cancel it first in **Settings → Plans & billing**, then delete the workspace.
- **The name does not match.** The confirmation is the workspace's exact name. The API also accepts the workspace's slug.
- **It is already being deleted.** Only one deletion of a workspace runs at a time; the first one finishes it.
- **It is your only workspace.** See [Delete it](#delete-it).

If a suspension or a subscription starts while the deletion is running, the deletion stops there. What was already deleted stays deleted and the rest stays, so you can try again once the blocker is gone.

## Deleting your account instead

Deleting your account deletes the workspaces that you alone belong to, with the same rules: it is refused while one of them is suspended by critlab or still has a paid subscription, and a workspace you own that has other people in it must be handed on or deleted first. See **Settings → Account → Profile**.

## Export first

critlab has no single export of a whole workspace yet. Take what you need before you delete:

- **Source files of a prototype.** In the viewer, open **View code** and download a version as a zip, or run `crit download <prototype-slug>`.
- **Your own comments, voice notes, screenshots and files.** **Settings → Account → Profile → Export your data**, or `crit account export`.
- **The audit log**, if your plan includes audit export. See [Audit log](/docs/enterprise/audit-log).

## Why it is browser-only

Deleting a workspace erases every member's work at once and cannot be reversed. A leaked or over-eager API key, even one with the `workspace:write` scope, must never be able to do that, and the act is the customer ending their use of critlab, which a person does. So the API refuses every request that carries an `Authorization` header with `session_required`, before it reads anything, and the CLI and the MCP server have no command or tool that deletes a workspace.

For an agent that is asked to delete one, the CLI explains and points at the page:

```bash
crit workspace delete acme
```

It prints the address of the **Settings → General** page, tells the person what the dialog will do, deletes nothing and exits with status 1, so a script never reads it as success.
