Skip to content

Update User

PUT /api/user/{id}

Required privilege: Users / Edit Content-Type: application/json CSRF header required: X-XSRF-TOKEN


Path Parameters

Parameter Type Required Description
id integer Yes Internal user identifier

Request Body

Include only the fields you want to update. All fields are optional.

{
  "User Fullname": "Jane Smith",
  "User Phone": "+1 555 999 8888",
  "Role Id": 5,
  "User Status": "Inactive"
}
Field Type Description
User Fullname string Display name
User Email string Email address
User Phone string Phone number
Role Id integer New role assignment
User Status string Active or Inactive
password string New password (minimum 8 characters)

Note: Superuser and Service accounts cannot be modified except by another Superuser.


Response

HTTP/1.1 200 OK

{
  "message": "User updated successfully."
}

Changing a user's password or role invalidates all their existing sessions.


Errors

Status Code Description
400 User.NotFound No user with this ID
400 User.CannotModifySuperuser Attempt to modify protected account
403 User.NotPrivileged Insufficient privilege