Creates a new time off request. Required scope: w_timeoff.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
This endpoint uses thew_timeoffscope, which can be enabled through the Integrations section found within the Settings menu.
Token behaviour
This endpoint supports both user tokens and account tokens.
User token — employee_id and member_id are optional. When omitted, the employee and member are derived from the authenticated user.
Account token — employee_id and member_id are required. member_id identifies the member context for the request (used to track who created the request).
Example request with account token
{
"employee_id": "4d3",
"member_id": "188948e7-28fb-460e-85fe-79de4cd7926f:1839d70f-7caa-4f02-9e3f-c46cced76f5b",
"category_id": "4d3",
"from_date": "2024-03-26T12:00:00.000",
"to_date": "2024-03-28T12:00:00.000",
"note": "Optional note"
}Example request with user token
{
"category_id": "4d3",
"from_date": "2024-03-26T12:00:00.000",
"to_date": "2024-03-28T12:00:00.000",
"note": "Optional note"
}Validation rules
from_date, to_date and every half_days[].date are ISO 8601 date-times without a timezone, with required milliseconds — format YYYY-MM-DDTHH:mm:ss.SSS.
| ✅ Accepted | ❌ Rejected |
|---|---|
2026-03-03T00:00:00.000 | 2026-03-03 (time component missing) |
2026-03-03T09:30:00.500 | 2026-03-03T00:00:00.000Z (trailing Z) |
2026-03-03T00:00:00+02:00 (offset) | |
2026-03-03T00:00:00 (milliseconds missing) |
Additional constraints:
to_datemust be on or afterfrom_date(same day is allowed).to_datemust be within less than 3 calendar years offrom_date. Internally the check isdifferenceInYears(to_date, from_date) ≤ 2, which floors — so e.g.from_date = 2024-01-01withto_date = 2026-12-31is accepted butto_date = 2027-01-01is rejected.from_datemust be on or after the employee's start date (truncated to the start of day). Requesting time off before the employee'sstart_datereturns400with messagefromDate can't be less than {startDate}.
Response
The response includes the created time off request. If the category requires approvals, pending_approvals will list the approvers whose action is still required.
| key | type | description |
|---|---|---|
| id | string | Unique identifier for the time off request |
| employee_id | string | SPI key of the employee the request belongs to |
| from_date | string | ISO date without timezone string |
| to_date | string | ISO date without timezone string |
| formatted_period | string | Human-readable representation of the request period |
| state | string | pending, approved, rejected, or canceled |
| requesting_total | integer | Total days to be deducted from the time off category pool |
| timeoff_tracking_unit | string | full_days, half_days, or hours |
| half_days | array | Days counted as half-day requests (see GET /timeoff/requests) |
| updated_by | string | Full name of the requester |
| category_name | string | Name of the time off category |
| pending_approvals | array | List of approvals still awaiting action. Empty array when no approvals are pending |
pending_approvals
| key | type | description |
|---|---|---|
| id | string | SPI key of the approval — used with PATCH /timeoff/approvals/:key |
| approver_id | string | Identifier of the member whose approval action is required |
