Skip to main content

Overview

useLeaveWorkspace returns a callable that removes the signed-in user’s own direct membership on this workspace node only. Descendant memberships are untouched, and leaving a parent while still owning a child is fine — ownership is independent of membership. Fires workspace.member.removed. Authorization: self-service. No capability is required; the actor is always the signed-in user, so this hook cannot remove anyone else (use useRemoveWorkspaceMember for that).
An owner has no member row and cannot leave this way — an owner exits by transferring ownership or deleting the workspace. If you have no direct member row here (you only reach in from an ancestor), leaving is a no-op / 404.

Usage Example

Parameters

string
required
The workspace UUID.

Returns

Resolves to void (the endpoint returns 204 No Content).

Error codes