Skip to main content

Update User API

Overview

Updates an employee user profile, department, or band.

  • Endpoint: /api/users/update
  • Method: POST
  • Access: Corporate Admin / User

Request Body Schema

FieldTypeRequiredDescription
idString (UUID)YesTarget user ID
firstNameStringNoUpdated first name
lastNameStringNoUpdated last name
departmentIdString (UUID)NoUpdated department ID
bandIdString (UUID)NoUpdated Employee Band ID

Request Body Example

{
"id": "u9876543-21ba-fedc-3210-9876543210fe",
"departmentId": "d1234567-89ab-cdef-0123-456789abcdef",
"bandId": "b1234567-89ab-cdef-0123-456789abcdef"
}

Success Response (200 OK)

{
"success": true,
"message": "User updated successfully",
"data": {
"id": "u9876543-21ba-fedc-3210-9876543210fe",
"firstName": "Vikram",
"lastName": "Singh",
"employeeBand": "Band 1",
"band": {
"id": "b1234567-89ab-cdef-0123-456789abcdef",
"name": "Band 1"
}
}
}

Database Impact

  • Table: users
  • Operations: UPDATE record by ID.