/api/v1/change-user-roleChange a member's role
Replaces the role a member holds in one workspace, which changes the permissions and the spending policy that apply to them there.
MANAGE_WORKSPACEA member holds one role per workspace, and that role decides what they may do and how much they may move. This call replaces it. The member keeps their membership, their signing keys, and their history; only the role changes, and only in the workspace you name. Their role in any other workspace is untouched, because roles are workspace-scoped: see Roles and permissions.
uuid is the member's user id, which
GET /api/v1/get-users-from-workspace returns
as UUID. role_id is a role that already exists in the same workspace, listed
by
GET /api/v1/get-roles-and-perms-detailed
as RoleUID.
The member gains every permission the new role holds and loses every
permission it does not, along with the new role's spending limit and cycle.
Read the target role with
GET /api/v1/get-roles-and-perms-detailed
first. The Owner role bypasses all permission checks and cannot be assigned
manually.
workspace_uidnumberrequireduuidnumberrequiredrole_idnumberrequired#What happens next
The member's new role appears in the workspace member list on the next read of
GET /api/v1/get-users-from-workspace, with
the new spending limit and cycle beside it. The member's own view refreshes
through GET /api/v1/get-user-info, and they can read the
limit that now applies to them with
GET /api/v1/get-my-limits.