Skip to content
Docs

Tell Paie someone is leaving

POST/v1/employees/{employeeId}/leaving

Marks 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

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

lastDaydaterequired

Their last day at work.

reasonstringrequired

One of resigned, dismissed, redundant, retired, contract_ended, died.

separationstring

temporary for someone expected back, such as a season.

One of permanent, temporary.

representativeNamestring

Who their P45 goes to. Needed when the reason is died.

notestring

Answer

idstring

Starts "emp_".

companyIdstring
numberinteger or null

The employer's own number.

firstNamestring
middleInitialstring or null
lastNamestring
statusstring

One of active, on_leave, suspended, terminated. Read any other value as "other".

statusSincedate or null

When the status took effect.

jobTitlestring
departmentobject or null
Show 2 fields
idstring

Starts "dep_".

namestring
hiredOndate

YYYY-MM-DD.

leftOndate or null

Their last day, once they've left.

payrollIdsarray of string

The payrolls they're on.

payobject
Show 4 fields
salariedboolean
currencystring

What they're paid in.

perPeriodmoney or null

An amount of money.

perHourmoney or null

An amount of money.

emailstring or null
phonestring or null

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/leaving \
-H "Authorization: Bearer $PAIE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"lastDay": "2026-11-27",
"reason": "resigned"
}'
Answer
{
"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"
}