Skip to content
LogoLogo

Change a member's role or state

Change a member's role or state

PATCH/api/v1/workspaces/{workspace_id}/members/{member_id}

Changes role, state, or both. An omitted field keeps its current value. state moves between active and suspended; suspending a member revokes their sessions in this Workspace immediately. Promotion to owner is permitted.

Demoting, suspending, or otherwise removing the last active owner is refused 409 last_owner. A caller may not change their own membership: self-demotion and self-suspension have no legitimate use and both produce a lockout the caller cannot then undo, so they answer 422 self_membership_mutation.

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001
member_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

If-MatchRequired
string

Entity tag containing the resource version last observed by the client.

Idempotency-KeyRequired
string·min 16·max 200

Opaque client-generated key for safely retrying this operation.

Request Body

application/json
role
string

viewer reads the Workspace and its work and writes nothing. admin holds the same capabilities as owner; the only owner-reserved operation is archiving the Workspace, and a Workspace must always retain at least one active owner.

Values
owneradminmemberviewer
state
string
Values
activesuspended

Responses