Tell Paie someone is leaving
/v1/employees/{employeeId}/leavingMarks someone as leaving on their last day, as Mark as left does without final pay. Their runs after it drop them, and HR finishes their final pay, severance, vacation owed and P45 in Paie.
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
Their last day at work.
One of resigned, dismissed, redundant, retired, contract_ended, died.
temporary for someone expected back, such as a season.
One of permanent, temporary.
Who their P45 goes to. Needed when the reason is died.
Answer
Starts "emp_".
The employer's own number.
One of active, on_leave, suspended, terminated. Read any other value as "other".
When the status took effect.
Show 2 fields
Starts "dep_".
YYYY-MM-DD.
Their last day, once they've left.
The payrolls they're on.
Show 4 fields
What they're paid in.
An amount of money.
An amount of money.
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/leaving \ -H "Authorization: Bearer $PAIE_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "lastDay": "2026-11-27", "reason": "resigned"}'const res = await fetch("https://api.paieday.com/v1/employees/emp_8f2k1xH3vNpa/leaving", { method: "POST", headers: { Authorization: `Bearer ${process.env.PAIE_API_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json", }, body: JSON.stringify({ "lastDay": "2026-11-27", "reason": "resigned" }),});const body = await res.json();import os, uuid, requests
res = requests.post( "https://api.paieday.com/v1/employees/emp_8f2k1xH3vNpa/leaving", headers={ "Authorization": f"Bearer {os.environ['PAIE_API_KEY']}", "Idempotency-Key": str(uuid.uuid4()), }, json={ "lastDay": "2026-11-27", "reason": "resigned" },)body = res.json(){ "id": "emp_8f2k1xH3vNpa", "companyId": "cmp_Xq2b9Lr0aKsT", "number": 14, "firstName": "Andre", "middleInitial": null, "lastName": "Campbell", "status": "active", "statusSince": "2026-10-25", "jobTitle": "Baker", "department": { "id": "dep_Ra4mW2c9QeLs", "name": "Blue Mahoe Trading Ltd" }, "hiredOn": "2026-11-02", "leftOn": "2026-10-25", "payrollIds": [ "pyr_51ka7cQ0ZtLm" ], "pay": { "salaried": true, "currency": "JMD", "perPeriod": { "amount": "184250.00", "currency": "JMD" }, "perHour": null }, "email": "andre@example.com", "phone": "876-555-0100"}{ "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" }}