deleteWorkspace (admins: the owner, or the owning team’s owner and admins) and nothing else: the workspace does not need to be empty. MCP: workspace_delete. CLI: rip workspace delete <workspace>.
Auth: Authorization: Bearer tr_... (an account API key). {id} is the workspace id or slug (any case; a slug two of your workspaces share is 409 AMBIGUOUS_REFERENCE listing each candidate’s id).
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; 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 admin brings the workspace back, exactly as it was, with Restore:trash_restore. CLI: rip trash restore <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. Purge from Trash (trash_purge, rip trash purge <id>, or Delete forever in the dashboard) removes it for good sooner.