Users

Update user role

Changed on

Update the role of a user. You cannot update your own role.

patch/users/{id}/role

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

idstring uuid required
Example:123e4567-e89b-12d3-a456-426614174000

User ID to update role for

Request body

role'admin' | 'manager' | 'user' required

New role for the user

Example request

{
  "role": "admin"
}

Response

User role successfully updated

idstring uuid required

User unique identifier

namestring required

User name

emailstring required

User email address

role'admin' | 'manager' | 'user' required

User role

orgIdstring uuid required

Organization ID the user belongs to

departmentstring nullable

Department the user belongs to

isLockedboolean

Whether the account is locked after failed login attempts

createdAtstring date-time required

Date when the user was created

Example response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "John Doe",
  "email": "john.doe@example.com",
  "role": "user",
  "orgId": "123e4567-e89b-12d3-a456-426614174001",
  "department": "hauptamt",
  "createdAt": "2024-01-15T10:30:00Z"
}

Changes