Skip to main content
DELETE
/
leave-types
/
{id}
curl -X DELETE https://api.companyflow.com/leave-types/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "success": true,
  "message": "leave type deleted"
}
Permanently delete a leave type. This operation removes the leave type configuration from the system.
This is a destructive operation. Ensure that no active leave balances or pending requests depend on this leave type before deletion.

Authentication

Requires authentication with Bearer token. Available to:
  • Super Admin
  • HR Manager

Path Parameters

id
string
required
The unique identifier of the leave type (UUID format)Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Response

success
boolean
Indicates if the request was successful
message
string
Confirmation message
curl -X DELETE https://api.companyflow.com/leave-types/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "success": true,
  "message": "leave type deleted"
}

Important Considerations

Before deleting a leave type, consider the following:
  • Active balances: Employees may have leave balances associated with this type
  • Pending requests: There may be pending leave requests using this type
  • Historical data: Approved leave history will be affected
  • Reporting: Reports may be incomplete if historical leave types are removed

Alternative: Deactivate Instead

Instead of deleting, consider setting the leave type status to inactive using the Update Leave Type endpoint. This preserves historical data while preventing new leave requests.
{
  "status": "inactive"
}

Build docs developers (and LLMs) love