API Reference
API Reference

/timeoff/requests

Creates a new time off request. Required scope: w_timeoff.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

This endpoint uses the w_timeoff scope, 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 tokenemployee_id and member_id are optional. When omitted, the employee and member are derived from the authenticated user.

Account tokenemployee_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.0002026-03-03 (time component missing)
2026-03-03T09:30:00.5002026-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_date must be on or after from_date (same day is allowed).
  • to_date must be within less than 3 calendar years of from_date. Internally the check is differenceInYears(to_date, from_date) ≤ 2, which floors — so e.g. from_date = 2024-01-01 with to_date = 2026-12-31 is accepted but to_date = 2027-01-01 is rejected.
  • from_date must be on or after the employee's start date (truncated to the start of day). Requesting time off before the employee's start_date returns 400 with message fromDate 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.

keytypedescription
idstringUnique identifier for the time off request
employee_idstringSPI key of the employee the request belongs to
from_datestringISO date without timezone string
to_datestringISO date without timezone string
formatted_periodstringHuman-readable representation of the request period
statestringpending, approved, rejected, or canceled
requesting_totalintegerTotal days to be deducted from the time off category pool
timeoff_tracking_unitstringfull_days, half_days, or hours
half_daysarrayDays counted as half-day requests (see GET /timeoff/requests)
updated_bystringFull name of the requester
category_namestringName of the time off category
pending_approvalsarrayList of approvals still awaiting action. Empty array when no approvals are pending

pending_approvals

keytypedescription
idstringSPI key of the approval — used with PATCH /timeoff/approvals/:key
approver_idstringIdentifier of the member whose approval action is required
Body Params
string

SPI key of the employee. Required for account tokens, optional for user tokens.

string

Identifies the member context for the request. Required for account tokens, optional for user tokens.

string
required

The hex id retrieved by /timeoff/categories endpoint

string
required
^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+$

ISO 8601 date-time without timezone, with milliseconds — format YYYY-MM-DDTHH:mm:ss.SSS. A trailing Z or ±HH:mm offset is not accepted. Must be on or after the employee's start date (truncated to the start of day).

string
required
^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+$

ISO 8601 date-time without timezone, with milliseconds — format YYYY-MM-DDTHH:mm:ss.SSS. Must be on or after from_date (same day is allowed) and within less than 3 calendar years of it.

half_days
array of objects
half_days
string

Note string max 140

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json