Update a user by ID (admin)
Admin endpoint: updates a target user fields (name, email, phone, designation, access role, department). Returns 409 if the new email is already in use.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Display name shown across the UI for the target user.
New login email; endpoint returns 409 if another user already has this email.
Target user personal mobile number (E.164 preferred).
Assigned Sinch outbound number; used as the from-number on user-attributed SMS.
Free-form job title (e.g., "Senior Account Executive"); display only.
Role granted to the user: SUPERADMIN, ADMIN, DEPARTMENT_HEAD, SALES_REP. Only SUPERADMIN callers may change this field.
ObjectId of the Department the user belongs to; changes are mirrored to the department managerIds list for DEPARTMENT_HEAD users.
Response
User updated
Returned by admin PUT /api/user/{id}.
true Compact user payload returned by POST /api/user/list (bare array — no envelope).
{
"_id": "5f7b1c2e8a1d4e0012c3b4a6",
"fullName": "Sam Patel",
"email": "sam.patel@acme.example",
"phoneNumber": "+14165550100",
"accessRole": "AGENT",
"organizationId": "64a1b2c3d4e5f60012345678",
"loginDisabled": false
}