Update User Role
Auth
Update User Role
/auth/role
PATCH
Update User Role
This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
/auth/role Description: Update a user’s role within the workspace. This endpoint allows changing user roles for access control purposes. Authorization:- Required role:
adminor higher
- Super admin roles (
super_admin,main_super_admin) cannot be assigned via this endpoint - Valid roles:
guest,user,admin,owner - Role hierarchy (lowest to highest):
guest<user<admin<owner<super_admin<main_super_admin - Per-user permission overrides are not supported; use role-based access control
PATCH
Request Payload:
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string (UUID) | Yes | The unique identifier of the user in this workspace |
| role | string | Yes | The new role to assign (guest, user, admin, or owner) |
| isActive | boolean | No | Whether the user account is active |
| reason | string | No | Reason for the role change (for audit logging) |
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
application/json
The unique identifier of the user in this workspace
The role to assign (restricted roles blocked)
Available options:
guest, user, admin, owner Whether the user account is active
Reason for the role change (for audit logging)