Overview
useRemoveWorkspaceMemberFromSubtree returns a callable that removes a user’s direct memberships on this workspace and every descendant you can reach, in one action. Each deletion fires workspace.member.removed.
Authorization: capability-gated + rank-bounded, evaluated per node. Requires remove-member, and the sweep is refused if you are outranked by the target at any node where you both hold a direct member row. An owner (or ancestor owner) reaches the whole subtree via the god-path; a non-owner only reaches descendants through an unbroken open inherit chain, so a sealed sub-workspace (inheritsFromParent = false) is left untouched for a non-owner.
Usage Example
Parameters
string
required
The workspace UUID — the subtree root.
string
required
The target user to offboard — a path param, not an acting user.
Returns
Reading skipped
Each entry names a descendant where the target is still a member after this call.
id/namearenullwhen you have no standing on that workspace. The call tells you a membership survived without disclosing the existence or name of a sealed sub-workspace you have no authority over — the same sealing fenceuseFetchWorkspaceMembersapplies toinclude=descendants. Escalate to an owner or ancestor owner of that branch.reasonis currently always"out-of-reach".- Only descendants where the target actually still holds a direct membership are listed — unreachable descendants they were never in are never disclosed.
Error codes
Related
useRemoveWorkspaceMember— this node only- Remove From Subtree API

