Change a member's role
Authenticate with an operator token or a signed-in Foliot Console session.
The only operation that changes a member’s role: a person joins with the role the invitation named, and the Clerk webhook never adds anyone or changes a role. An owner of the workspace, or an operator token (which is also how an operator makes a member the owner of a workspace that has none). The new role applies to the member’s very next request. 404 if the person is not a member of this workspace: this never adds anyone. Setting the role the member already has changes nothing and answers 200. 409 if it would demote the workspace’s only owner, whoever asks: make someone else an owner first. An owner may demote themselves once another owner exists. The caller’s own role is read again at the moment of the change, so an owner who was demoted or removed a moment earlier is refused (403 or 404) and changes nothing.
Path parameters
string (uuid)The workspace.
string (uuid)Foliot's id for the member (userId in the member list), not their Clerk id.
Request body
"owner" | "operator" | "viewer"The role the member is to have.