Skip to content
Docs

Add hours

POST/v1/runs/{runId}/hours

Sets the hours people worked in a run that is still open, as if typed in Enter hours. Paie splits each week into basic and overtime itself. A calculated run is worked out again for the people sent.

Path

runIdstringrequired

Its id, like run_3m9q0dXbA.

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

hoursarray of objectrequired

Up to 500 people in one call.

Show 2 fields
employeeIdstringrequired

Starts "emp_".

workedarray of objectrequired

Every stretch they worked in the run: one day each, or a week at a time. An empty list clears their hours.

Show 3 fields
fromdaterequired

The first day of the stretch.

todaterequired

The last day. The same as from for one day.

hoursnumberrequired

Hours worked in the stretch, to two decimals: 7.5.

Answer

runIdstring
statusstring

The run is still open. A calculated run was worked out again.

One of entry, calculated. Read any other value as "other".

hoursarray of object
Show 3 fields
employeeIdstring
workedarray of object
Show 3 fields
fromdate

The first day of the stretch.

todate

The last day. The same as from for one day.

hoursnumber

Hours worked in the stretch, to two decimals: 7.5.

totalnumber

The hours in every stretch, added up.

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.
409run_not_openThe run is paid or closed, so it can't change. Send to the next open run.
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/runs/run_3m9q0dXbA/hours \
-H "Authorization: Bearer $PAIE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"hours": [
{
"employeeId": "emp_8f2k1xH3vNpa",
"worked": [
{
"from": "2026-11-02",
"to": "2026-11-06",
"hours": 40
}
]
}
]
}'
Answer
{
"runId": "run_3m9q0dXbA",
"status": "entry",
"hours": [
{
"employeeId": "emp_8f2k1xH3vNpa",
"worked": [
{
"from": "2026-11-02",
"to": "2026-11-06",
"hours": 40
}
],
"total": 40
}
]
}