Authentication
This endpoint requires authentication with a Bearer token. Only users with Super Admin or HR Manager roles can update departments.
The unique identifier of the department to update
Request Body
All fields are optional. Only include fields you want to update.
Department name (2-255 characters)
Department code (max 50 characters)
UUID of the parent department for hierarchical structure
Cost center identifier (max 100 characters)
Department status. Must be one of: active, inactive
Response
Indicates if the request was successful
The updated department object
Unique department identifier
Parent department ID if hierarchical
Department status (active/inactive)
ISO 8601 timestamp of creation
ISO 8601 timestamp of last update
curl -X PUT https://api.companyflow.com/departments/{id} \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Software Engineering",
"description": "Software development and engineering team",
"status": "active"
}'
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"company_id": "987fcdeb-51a2-43f7-9c5d-123456789abc",
"name": "Software Engineering",
"code": "ENG",
"description": "Software development and engineering team",
"parent_department_id": null,
"cost_center": "CC-100",
"status": "active",
"created_at": "2026-03-03T10:00:00Z",
"updated_at": "2026-03-03T14:30:00Z"
}
}