Delete employee
Soft deletes an employee and the associated user account. The employee is not permanently removed from the database, but marked as deleted with anonymized data.
What happens when deleting an employee:
- Employee record is marked as deleted
- Associated user account is also marked as deleted
- Personal data is anonymized for privacy:
- firstName and lastName are set to “Deleted User”
- Email is anonymized
- Other personal information is cleared
- Billing is automatically recalculated to reflect the removal
- The employee will no longer appear in employee lists or grids
Note: This is a soft delete operation. The employee data remains in the database but is anonymized and hidden. This operation cannot be undone. Returns 404 if the employee does not exist.
DELETE
/employees/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredResponses
200
successbooleanrequiredOperation success flag
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X DELETE "https://leadtime.app/api/public/employees/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/employees/string", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.delete(
"https://leadtime.app/api/public/employees/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions