Skip to main content
POST
Bulk Delete Workforce Trainings by Filters
← Own Workforce API Delete every training matching a filter set, without collecting ids. Filters go in the query string — the same ones List Workforce Trainings Paginated accepts — and the body carries the filter_hash that list returned.

The filter_hash guard

filter_hash fingerprints the filters that produced a page, including consolidate_group and organization_id[]. Send it back; the server recomputes the fingerprint from the filters on this request. Match, and the delete proceeds over exactly the set you listed. Differ, and it answers 409 Conflict without deleting anything. That is what stops a client from listing one subsidiary and then, after widening the perimeter, deleting the whole group. 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). That is the same set the unfiltered list counts in total, so read it 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

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 on or before this instant, inclusive
Free-text search, up to 255 characters
boolean
default:"false"
Widen the perimeter to the accepted 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 paginated list response that showed you these rows

Response

Same shape as Bulk Delete Workforce Trainings: 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.

List trainings paginated

Where filter_hash comes from

Bulk delete by ids

When you already hold the ids