Create Absence

POST /people/absences

Group: People Management › Absences · Operation ID: createAbsence

Creates an absence. The response contains only the new absence's id. Read the record with GET people/absences/:id.

Open in the interactive reference

Parameters

Name In Type Required Description
Api-Version header "v1" yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.

Request body

Required, application/json: createAbsenceInput.

Field Type Required Description
employeeId string yes The unique identifier for the employee the absence belongs to. See id on GET people/:id.
absenceTypeId string yes The unique identifier for the absence type. See id on GET people/absence-types/:id.
startDate string (date-time) yes The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
endDate string (date-time) yes The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Must not precede startDate.
days string (decimal) yes The number of absence days. May be fractional for partial days.
status string, one of "requested", "approved", "rejected", "canceled" no The status to create the absence in. Defaults to 'requested', the only status that enters the approval workflow. Approve a requested absence with POST people/absences/approve. Supplying 'approved' or 'rejected' records the decision directly with no approver behind it, and 'canceled' passes through 'approved' first, firing that transition's side effects. Use the default unless you are importing absences already decided elsewhere.
leaveDescription string no A free-text reason for the absence.
leaveCertificate string no The certificate file content, for example a medical certificate for sick leave.
certificateName string no The file name of the certificate.
googleEvent boolean no Whether to mirror this absence to the linked Google Calendar.
timezoneDiff string no The time zone offset used for calendar synchronization.
timezone string no The time zone the absence dates are expressed in. Format IANA time-zone name, for example 'Europe/Berlin'.

Example:

{
  "employeeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "absenceTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "startDate": "2026-01-15T09:30:00.000Z",
  "endDate": "2026-01-15T09:30:00.000Z",
  "days": "19.99",
  "status": "requested",
  "leaveDescription": "<leaveDescription>",
  "leaveCertificate": "<leaveCertificate>",
  "certificateName": "<certificateName>",
  "googleEvent": true,
  "timezoneDiff": "<timezoneDiff>",
  "timezone": "<timezone>"
}

Response

200 Success

Under data (createAbsenceOutput):

Field Type Required Description
id string yes The unique identifier for the created absence.

Response headers

Errors

Code Status
EMPLOYEE_NOT_FOUND 400
ABSENCE_TYPE_NOT_FOUND 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses