Skip to main content
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: admin or higher
Important Notes:
  • 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
Method: PATCH Request Payload:

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
user_id
string<uuid>
required

The unique identifier of the user in this workspace

role
enum<string>
required

The role to assign (restricted roles blocked)

Available options:
guest,
user,
admin,
owner
isActive
boolean

Whether the user account is active

reason
string

Reason for the role change (for audit logging)

Response

Role updated successfully

status
string
Example:

"success"

message
string
data
object