Skip to main content
POST
Bulk Delete Workforce Absences
← Own Workforce API
Deprecated. Use POST /v2/own-workforce/absences/delete: up to 5,000 absences and accidents per request, idempotent, deleted asynchronously, with webhooks. This endpoint keeps working; its responses carry Deprecation and Link: </v2/own-workforce/absences/delete>; rel="successor-version" headers. Its responses also carry Sunset: Fri, 30 Apr 2027 00:00:00 GMT: the endpoint is retired on April 30, 2027 (see the changelog).
Delete up to 100,000 absence and accident records in one call. The response reports what succeeded and what did not, so a partial failure is visible rather than silent. Irreversible: there is no endpoint that recreates these records, only a re-import. Remember that a row covering an accident and its sick leave removes both events.

Request

Headers

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

Body

array[string]
required
Record UUIDs to delete — the id of each row, not accident_id or absenteeism_id. Between 1 and 100,000 entries.
boolean
default:"false"
Group view. false authorizes deletion inside the header organization only; true across the whole accepted family.Ids outside the resolved perimeter are never deleted — they come back in failed_ids.

Response

integer
How many records were deleted
array[string]
Ids of the deleted records
integer
How many ids were not deleted — unknown, already gone, or outside your perimeter
array[string]
Ids that were not deleted
string
Human-readable summary
The call returns 200 OK even when some ids fail. Read failed_count, not the status code.

Example

Successful Response

Common Errors

401 Unauthorized

Cause: the key is invalid or revoked (INVALID_API_KEY), expired (API_KEY_EXPIRED), belongs neither to the organization in x-organization-id nor to one of its parents (API_KEY_ORG_MISMATCH), or has no owner (API_KEY_NO_OWNER). A request carrying no credentials at all answers AUTHENTICATION_REQUIRED. See Errors.

403 Forbidden

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

422 Unprocessable Entity

Cause: empty absenteeism_accident_ids, more than 100,000 entries, or a value that is not a UUID.

Bulk delete by filters

Delete a filtered set without collecting ids

Delete one record

Single-record deletion