Update member role
PUT
https://api.flownally.com/v1/users/{userId}/roleChanges a member's role. Admins can switch members between admin and agent; only
Owners can make someone an Owner or change an Owner's role. A workspace must keep at least
one Owner, so demoting the last one is rejected.
Authorization
Allowed roles
- owner
- admin
Assign a user role; required action depends on request body role.
Parameters
- Name
userId- Type
- path · string
- required
User ID.
Body parameters
Send a application/json body. The body is required.
- Name
role- Type
- enum
- required
The role to assign to the member.One of: owner, admin, agent
Responses
- 200Member updatedapplication/json
- 400Invalid request. Codes:
auth_user_invalid_role:roleisn'towner,adminoragent.auth_user_self_role_change_forbidden: you can't change your own role.
- 403Your role can't make this change. Codes:
auth_authz_user_assign_role_denied: your role can't assign the requested role, for example an Admin assigningowner.auth_user_role_assignment_forbidden: you can't change an Owner's role.
- 404The user isn't a member of this workspace. Code:
auth_user_not_found
- 409The workspace must keep at least one Owner. Code:
auth_user_last_owner_required: this change would leave no Owner.
- defaultErrorapplication/json
Related schemas
Generated from the API spec.