Admin-only endpoint to update department details.
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
| Content-Type | string | Yes | application/json |
| Parameter | Type | Required | Description |
|---|---|---|---|
| departmentId | string | Yes | Department ID to update |
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | No | New department name |
| description | string | No | New department description |
| parentId | string | No | New parent department ID |
null to make it a root-level departmentupdatedAt timestamp is automatically updatedBearer authentication header of the form Bearer <token>, where <token> is your auth token.
Department ID to update
"64ef3c29f9a1c27e1b2c3a4d"
Department name (leave empty string "" if unchanged)
"Engineering"
Department description (leave empty string "" if unchanged)
"Handles all software engineering operations"
Department code (leave empty string "" if unchanged)
"ENG-001"
Department location (leave empty string "" if unchanged)
"San Francisco HQ"
Parent department ID. - Must be a valid MongoDB ObjectId of an existing department. - Can be null if this department has no parent. - Leave empty if unchanged.
"64ef3c29f9a1c27e1b2c3aaa"