deleteWorkspace (internal admins) and nothing else: the workspace does not need to be empty. MCP: workspace_delete. CLI: rip workspace delete <workspace-id>.
Auth: Authorization: Bearer tr_... (an account API key). {id} is the workspace UUID.
DELETE /v0/workspaces/{id}
why (required on an agent call; see Why on every write). Returns 200:
purgeAt is deletedAt + 30 days. Deleting a workspace that is already in the trash returns its original dates. The change feed records workspace.deleted.
While it is in the trash
- The workspace leaves List, and its artifacts leave every listing and search.
- Every route on the workspace or its content (get, load, changes, artifact reads and writes, tasks, table rows) answers
410 WORKSPACE_DELETEDto its members. The body carriestype: "workspace",id,title,deletedAtandpurgeAt; internal admins also getrestorableanddeletedBy. Anyone else gets their usual refusal. - Its slug stays held: creating another workspace with it answers
409 WORKSPACE_SLUG_TAKENwithdetails: { inTrash: true, purgeAt }. - A team that owns it cannot be deleted (
TEAM_OWNS_WORKSPACES).
Restore
An internal admin brings the workspace back, exactly as it was, with Restore:trash_restore. CLI: rip trash restore workspace <workspace-id>. The change feed records workspace.restored. From purgeAt the workspace can no longer be restored, and the daily purge removes it and everything in it for good. Agents cannot purge a workspace early; a person can choose Delete forever in the dashboard.