Skip to main content

Overview

useUpdateWorkspaceMember returns a callable that edits a direct member of a workspace. Authorization: capability-gated + rank-bounded, in two tiers by field sensitivity:
  • Powerful fields (capabilities, permissions, and rank — as either rank or relativeRank) require edit-member-access, plus the rank rule and the no-escalation guard.
  • Cosmetic fields (title, metadata) require only edit-member-profile.
It edits another member: your own user id as targetUserId is refused with 400 workspace/own-member-id. Edit your own title, with no capability, with useUpdateMyWorkspaceMembership. The workspace’s owner is never a target, for anyone, ancestor owners included: the owner’s title and metadata are theirs alone to set, with useUpdateMyWorkspaceMembership. Naming the owner as targetUserId gets 404 workspace/not-found. Grant vs strip asymmetry: you may only add a capability/permission you hold on the target node (resolved set, including via reach); stripping is governed by rank alone. Rank moves in either coordinate — rank (absolute) or relativeRank (an offset from you), never both. Omitting both means rank unchanged: unlike the invite hook there is no value default here, so editing someone’s capabilities never quietly moves them on the ladder. See choosing a rank.

Usage Example

Parameters

string
required
The workspace UUID.
string
required
The target member’s user id — a path param, not an acting user.
WorkspaceCapability[]
New capability set (powerful — edit-member-access).
string[]
New opaque permission set (powerful — edit-member-access).
number
New absolute rank, 0 – 2147483647 (powerful — edit-member-access + rank rules). Mutually exclusive with relativeRank; omitting both leaves rank unchanged.
number
New rank as an offset from you: 1 = one rung below me. Must be 1 – 2147483647. Anchored on your own rank if you hold a member row on this workspace, apex otherwise. Resolved to an absolute number at write time and frozen — a snapshot, not a link to your rank. The resolved value is bounded too, so an offset that overflows once anchored is a 400. No default: omitting both rank fields leaves rank unchanged.
string | null
New cosmetic title (edit-member-profile). Edit your own title with useUpdateMyWorkspaceMembership.
Record<string, any>
New cosmetic metadata (edit-member-profile).

Returns

Returns the updated WorkspaceMember object.

Error codes