Workspaces

Delete a workspace I own

Changed on

Owner-only, session-only (BK-512, ADR-0015). Soft-deletes the workspace: access ends immediately for the owner and every other member, the workspace's Personal Access Tokens and pending invites are revoked in the same transaction, and a deletion audit record is written. Nothing is physically removed until the 30-day grace period elapses, during which the workspace can be restored via POST /api/v1/workspaces/{id}/restore. A confirmation email naming the workspace, the actor and the restore deadline is sent to the owner and every active member. If the deleted workspace was the caller's active one, the response carries the newly re-resolved active workspace (oldest remaining membership first) and the bk_active_ws cookie is rotated in the same response.

delete/api/v1/workspaces/{id}

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/v1/workspaces/{id}
  • Auth: API key in cookie sb-fmbpikzpkafptqximhxn-auth-token

Path parameters

idstring uuid required

Response

Workspace deleted (soft-delete; grace period started).

workspaceIdstring uuid required
workspaceNamestring required
purgeDeadlinestring required
otherMemberCountinteger required
wasActiveWorkspaceboolean required

Whether the deleted workspace was the caller's active one. newActiveWorkspaceId/newActiveWorkspaceName are only meaningful when this is true — they stay null when the deleted workspace was not active, which is not the same as "no workspace left" (AC-10).

newActiveWorkspaceIdstring uuid nullable required
newActiveWorkspaceNamestring nullable required

Changes