Skip to main content
POST
Bulk Delete Workforce Employees by Filters
← Own Workforce API Delete every employee matching a filter set, without collecting their ids first. The filters go in the query string — the same ones List Workforce Employees accepts — and the body carries the filter_hash that list returned.
Irreversible, and it cascades to contracts, remunerations, trainings and absence records. Always run the equivalent list call first and read total before deleting.

The filter_hash guard

filter_hash fingerprints the filters that produced a page — including consolidate_group, organization_id[] and the project scope. Send it back and the server recomputes the fingerprint from the filters on this request:
  • they match → the delete proceeds over exactly the set you listed;
  • they differ → 409 Conflict, and nothing is deleted.
That is what stops a client from listing one subsidiary, then widening the perimeter and deleting the whole group by accident. It guards against that drift, not against a caller who deliberately sends different filters — the tenant boundary is the organization scoping, not the hash. Take the hash verbatim from the list response. No filter is required. With none, the delete covers every row of the perimeter the list showed: the header organization, or under consolidate_group the accepted family narrowed by organization_id[] (and the project scope, when it is on). The delete removes exactly the rows the list returns: an employee with no contract is not listed, so it is never deleted here either. Read total from the list before you delete.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Query Parameters

The same filters as the list endpoint. All of them are optional.
string
Search by the employee identifier your HR system uses
array[string]
Filter by source upload file. The nil UUID matches rows with no file.
datetime
Only rows created at or after this instant
datetime
Only rows created at or before this instant
boolean
default:"false"
Widen the perimeter to the accepted business family. Part of the hash.
array[string]
Narrow a group-view delete to these organizations. Part of the hash.

Body

string
required
The filter_hash from the list response that showed you these rows

Response

Same shape as Bulk Delete Workforce Employees: success_count, success_ids, failed_count, failed_ids and message.

Example

Successful Response

Common Errors

401 Unauthorized

Cause: the key is invalid, or it does not belong to the organization in x-organization-id — the two are looked up as a pair. A request carrying no credentials at all answers AUTH_REQUIRED instead.

403 Forbidden

Cause: the key’s owner is not an enabled member of the organization, or their role cannot write.

409 Conflict

Cause: filter_hash does not match the filters on this request. Nothing was deleted. Re-list with the filters you intend, then retry with the fresh hash.

List employees

Where filter_hash comes from

Bulk delete by ids

When you already hold the ids