Skip to main content

Overview

useDeleteWorkspace returns a callable that deletes a workspace. Deletion cascades the entire subtree in one transaction, bottom-up: invitations → members → workspaces. Each deleted workspace fires workspace.deleted — and no workspace.member.removed events for the memberships it tears down. Treat workspace.deleted as removing that workspace’s whole roster; see Webhooks & lifecycle. Authorization: owner-only. The signed-in user must be this workspace’s own owner or an ancestor owner. There is no delete-workspace capability.
Your own data tagged with a workspace id (docs, issues, etc.) is not deleted by Sublay. React to the workspace.deleted webhook to clean up your own workspace-tagged data.

Usage Example

Parameters

string
required
The workspace UUID.

Returns

{ message: string }.

Error codes