Skip to main content
POST
Bulk Delete by Filters

Bulk Delete by Filters

Delete all employees that match the given filter criteria. Uses the same filters as the list endpoint. Requires a filter_hash for optimistic concurrency — the hash must match what the server computes for the same filters, ensuring the user deletes exactly what they saw.

Request

Headers

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

Body Parameters

string
required
Hash from the list endpoint response (filter_hash field). Prevents stale deletes.

Query Parameters (Filters)

Free-text search across employee fields
string[]
Filter by transport type (car, bus, metro, train, bicycle, etc.)
string[]
Filter by employee situation
string[]
Filter by calculation status: pending, active, error
string[]
Filter by survey response medium
string[]
Filter by bulk-upload file UUIDs
string
Filter records created on or after this datetime (ISO 8601)
string
Filter records created on or before this datetime (ISO 8601)
string
Filter by CO2e calculation status

Response

integer
Total number of employees processed
integer
Number of employees successfully deleted
integer
Number of employees that failed to delete
array[object]
Details of failed deletions

Example

Successful Response

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

409 Conflict

Cause: The filter_hash doesn’t match the current filter state — data changed since the list was loaded

422 Unprocessable Entity

Cause: No filter parameters provided (safety check to prevent accidental mass deletion)

Bulk Delete

Delete employees by specific IDs

List Employees

Retrieve all employees with filtering and pagination