Record leave
/v1/employees/{employeeId}/leaveAdds 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
Its id, like emp_8f2k1xH3vNpa.
Headers
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
One of vacation, sick, maternity, unpaid, other_paid.
YYYY-MM-DD.
The last day. Null for sick, maternity or unpaid leave still going on.
Working days taken, in whole or half days: 2.5. Needed with endsOn.
Answer
Starts "lve_".
One of vacation, sick, maternity, unpaid, other_paid, suspension. Read any other value as "other".
YYYY-MM-DD.
The last day. Null while it goes on.
Days taken, as entered: "2.5". Null when not entered.
Refusals
400 | bad_request | The request isn't right: the message says which part. |
401 | unauthorized | No key, a key Paie doesn't know, or one that was revoked. |
403 | forbidden | The key can't do this (its areas), or the workspace isn't in the API beta. |
403 | plan_required | The workspace's plan has no API, or, for a change, none that changes things (Scale). |
404 | not_found | Not there, or not a company this key reaches. The two read the same. |
409 | idempotency_mismatch | This Idempotency-Key was sent before with a different request. Use a new key for a new request. |
409 | in_progress | A call with this Idempotency-Key is still running. Try again in a moment. |
429 | rate_limited | Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says. |
500 | server_error | Something went wrong at Paie. Send support the requestId. |
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}'const res = await fetch("https://api.paieday.com/v1/employees/emp_8f2k1xH3vNpa/leave", { method: "POST", headers: { Authorization: `Bearer ${process.env.PAIE_API_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json", }, body: JSON.stringify({ "type": "vacation", "startsOn": "2026-11-16", "endsOn": "2026-11-18", "days": 3, "note": null }),});const body = await res.json();import os, uuid, requests
res = requests.post( "https://api.paieday.com/v1/employees/emp_8f2k1xH3vNpa/leave", headers={ "Authorization": f"Bearer {os.environ['PAIE_API_KEY']}", "Idempotency-Key": str(uuid.uuid4()), }, json={ "type": "vacation", "startsOn": "2026-11-16", "endsOn": "2026-11-18", "days": 3, "note": None },)body = res.json(){ "id": "lve_1HhXDwZAx", "employeeId": "emp_8f2k1xH3vNpa", "type": "vacation", "startsOn": "2026-11-16", "endsOn": "2026-11-18", "days": "3.0", "paid": true}{ "error": { "code": "bad_request", "message": "The request isn't right: the message says which part.", "requestId": "req_3fVq9xY0bLm2pQ7a" }}{ "error": { "code": "unauthorized", "message": "No key, a key Paie doesn't know, or one that was revoked.", "requestId": "req_3fVq9xY0bLm2pQ7a" }}{ "error": { "code": "forbidden", "message": "The key can't do this (its areas), or the workspace isn't in the API beta.", "requestId": "req_3fVq9xY0bLm2pQ7a" }}{ "error": { "code": "not_found", "message": "Not there, or not a company this key reaches. The two read the same.", "requestId": "req_3fVq9xY0bLm2pQ7a" }}{ "error": { "code": "idempotency_mismatch", "message": "This Idempotency-Key was sent before with a different request. Use a new key for a new request.", "requestId": "req_3fVq9xY0bLm2pQ7a" }}{ "error": { "code": "rate_limited", "message": "Over the key's calls a minute, or the workspace's calls a day: wait the seconds Retry-After says.", "requestId": "req_3fVq9xY0bLm2pQ7a" }}{ "error": { "code": "server_error", "message": "Something went wrong at Paie. Send support the requestId.", "requestId": "req_3fVq9xY0bLm2pQ7a" }}