Authentication
This endpoint requires authentication with a Bearer token. Only users with Super Admin or HR Manager roles can delete departments.
The unique identifier of the department to delete
Query Parameters
If true, permanently deletes the department. If false or omitted, performs a soft delete.
Response
Indicates if the request was successful
curl -X DELETE https://api.companyflow.com/departments/{id} \
-H "Authorization: Bearer YOUR_TOKEN"
{
"success": true,
"message": "department deleted"
}
Soft delete marks the department as deleted but preserves the data in the database. Hard delete permanently removes the department record.