Skip to main content
PUT
Update a user by ID (admin)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
fullName
string

Display name shown across the UI for the target user.

email
string<email>

New login email; endpoint returns 409 if another user already has this email.

phoneNumber
string

Target user personal mobile number (E.164 preferred).

sinchPhoneNumber
string

Assigned Sinch outbound number; used as the from-number on user-attributed SMS.

designation
string

Free-form job title (e.g., "Senior Account Executive"); display only.

accessRole
string

Role granted to the user: SUPERADMIN, ADMIN, DEPARTMENT_HEAD, SALES_REP. Only SUPERADMIN callers may change this field.

departmentId
string

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}.

success
enum<boolean>
required
Available options:
true
message
string
required
data
object
required

Compact user payload returned by POST /api/user/list (bare array — no envelope).

Example: