Skip to content
Docs

Record leave

POST/v1/employees/{employeeId}/leave

Adds leave someone took, checked as Add leave checks it. Leave on days a paid run already covered is put right with a correction in the next run.

Path

employeeIdstringrequired

Its id, like emp_8f2k1xH3vNpa.

Headers

Idempotency-Keystringrequired

A key you make for this change, like a UUID, up to 255 characters. Send the same key when you retry it: Paie answers what it answered the first time, for 24 hours, and does nothing again.

Body

typestringrequired

One of vacation, sick, maternity, unpaid, other_paid.

startsOndaterequired

YYYY-MM-DD.

endsOndate or null

The last day. Null for sick, maternity or unpaid leave still going on.

daysnumber or null

Working days taken, in whole or half days: 2.5. Needed with endsOn.

notestring or null

Answer

idstring

Starts "lve_".

employeeIdstring
typestring

One of vacation, sick, maternity, unpaid, other_paid, suspension. Read any other value as "other".

startsOndate

YYYY-MM-DD.

endsOndate or null

The last day. Null while it goes on.

daysstring or null

Days taken, as entered: "2.5". Null when not entered.

paidboolean

Refusals

400bad_requestThe request isn't right: the message says which part.
401unauthorizedNo key, a key Paie doesn't know, or one that was revoked.
403forbiddenThe key can't do this (its areas), or the workspace isn't in the API beta.
403plan_requiredThe workspace's plan has no API, or, for a change, none that changes things (Scale).
404not_foundNot there, or not a company this key reaches. The two read the same.
409idempotency_mismatchThis Idempotency-Key was sent before with a different request. Use a new key for a new request.
409in_progressA call with this Idempotency-Key is still running. Try again in a moment.
429rate_limitedOver the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.
500server_errorSomething went wrong at Paie. Send support the requestId.
Terminal window
curl -X POST https://api.paieday.com/v1/employees/emp_8f2k1xH3vNpa/leave \
-H "Authorization: Bearer $PAIE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"type": "vacation",
"startsOn": "2026-11-16",
"endsOn": "2026-11-18",
"days": 3,
"note": null
}'
Answer
{
"id": "lve_1HhXDwZAx",
"employeeId": "emp_8f2k1xH3vNpa",
"type": "vacation",
"startsOn": "2026-11-16",
"endsOn": "2026-11-18",
"days": "3.0",
"paid": true
}