Skip to main content
DELETE
/
departments
/
{id}
curl -X DELETE https://api.companyflow.com/departments/{id} \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "success": true,
  "message": "department deleted"
}

Authentication

This endpoint requires authentication with a Bearer token. Only users with Super Admin or HR Manager roles can delete departments.
id
string
required
The unique identifier of the department to delete

Query Parameters

hard_delete
boolean
default:"false"
If true, permanently deletes the department. If false or omitted, performs a soft delete.

Response

success
boolean
Indicates if the request was successful
message
string
Confirmation message
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.

Build docs developers (and LLMs) love