Time Off Policies
The time off policy object
| Attribute | Type | Description |
|---|---|---|
id |
integer | Unique ID for the time off policy. |
name |
string | The name of the time off policy (e.g. “Vacation”, “Sick Leave”). |
color |
string | Color assigned to the policy in the UI. |
icon |
string | Icon slug assigned to the policy. |
accrual_type |
string | Accrual mode for the policy: fixed (front-loaded allowance), accrued (earned over time), or unlimited. |
accrual_schedule |
string | Frequency for policy accruals: monthly, biweekly, semimonthly, or hourly. Required and meaningful when accrual_type is accrued. |
accrual_first_payday |
date | Anchor date for biweekly accruals. |
accrual_leave_hours |
decimal | Leave hours earned per worked hour base (for hourly accruals). |
accrual_worked_hours |
decimal | Worked hours base (for hourly accruals). |
accrual_max_hours_per_year |
decimal | Maximum accrued hours cap per year (for hourly accruals). |
default_days_per_year |
decimal | Default days per year credited to teammates. |
max_carryover_days |
decimal | Maximum days allowed to carry over between years. |
requires_approval |
boolean | Whether requests booked under this policy require manager or admin review. |
visible_to_all |
boolean | Whether teammates may request this policy at all. A teammate can only request a policy that is visible to all and assigned to them. |
assigned_to_all |
boolean | Whether this policy is for every teammate, including people hired later. When false, the policy is for the people listed in assigned_user_ids. |
assigned_user_ids |
array | The IDs of the teammates this policy is assigned to. Returned to administrators only; omitted for a non-administrator. Empty when assigned_to_all is true; when false, an empty array means the policy is assigned to nobody. |
assignment_revision |
integer | A counter that every change to who this policy is for advances. Send it back as assignment_revision when you replace assigned_user_ids, and as confirm_removal_revision when you confirm a removal. |
is_active |
boolean | Whether the policy is active or deactivated. |
created_at |
datetime | Date and time the policy was created. Use the ISO 8601 Format. |
updated_at |
datetime | Date and time the policy was last updated. Use the ISO 8601 Format. |
Required permissions
The PTO API is currently being rolled out gradually. Requests from unavailable accounts return 403 Forbidden.
Administrators can list, create, update, deactivate, and permanently delete time off policies.
Non-administrators can list and view active policies that are visible to all teammates and assigned to them. Listing omits hidden, unassigned and deactivated policies. Attempting to view one returns 404 Not Found.
List all time off policies
Returns a list of time off policies.
The response contains an object with a pto_types property that contains an array of up to per_page time off policies. Each entry in the array is a separate time off policy object. If no more policies are available, the resulting array will be empty. Several additional pagination properties are included in the response to simplify paginating your policies.
GET /v2/pto/types
| Parameter | Type | Description |
|---|---|---|
is_active |
boolean | Pass true to return active policies and false to return deactivated policies. (Default: true) |
updated_since |
datetime | Only return policies updated since this timestamp. |
page |
integer | The page number to use in pagination. (Default: 1) |
per_page |
integer | The number of records to return per page. Can range between 1 and 2000. (Default: 2000) |
Example Request:
curl "https://api.harvestapp.com/v2/pto/types" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"pto_types": [
{
"id": 101,
"name": "Vacation",
"color": "blue",
"icon": "vacation",
"accrual_type": "fixed",
"accrual_schedule": "monthly",
"default_days_per_year": 25.0,
"max_carryover_days": 5.0,
"requires_approval": true,
"visible_to_all": true,
"assigned_to_all": false,
"assigned_user_ids": [1024, 1025],
"assignment_revision": 3,
"is_active": true,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}
],
"per_page": 2000,
"total_pages": 1,
"total_entries": 1,
"next_page": null,
"previous_page": null,
"page": 1,
"links": {
"first": "https://api.harvestapp.com/v2/pto/types?page=1&per_page=2000",
"next": null,
"previous": null,
"last": "https://api.harvestapp.com/v2/pto/types?page=1&per_page=2000"
}
}Retrieve a time off policy
Retrieves the details of an existing time off policy. Returns a time off policy object and a 200 OK response code.
GET /v2/pto/types/{PTO_TYPE_ID}
Example Request:
curl "https://api.harvestapp.com/v2/pto/types/101" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"id": 101,
"name": "Vacation",
"color": "blue",
"icon": "vacation",
"accrual_type": "fixed",
"accrual_schedule": "monthly",
"default_days_per_year": 25.0,
"max_carryover_days": 5.0,
"requires_approval": true,
"visible_to_all": true,
"assigned_to_all": false,
"assigned_user_ids": [1024, 1025],
"assignment_revision": 3,
"is_active": true,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}Create a time off policy
Creates a new time off policy. Returns a time off policy object and a 201 Created response code if the call succeeded. Only administrators can perform this action.
POST /v2/pto/types
| Parameter | Type | Description |
|---|---|---|
name |
string | Required. The policy name. |
color |
string | Optional color code. |
icon |
string | Optional icon name. |
accrual_type |
string | Accrual mode: fixed, accrued, or unlimited. (Default: fixed) |
accrual_schedule |
string | Accrual interval: monthly, biweekly, semimonthly, or hourly. Required when accrual_type is accrued. |
accrual_first_payday |
date | Anchor date required when accrual_schedule is biweekly. |
accrual_leave_hours |
decimal | Hours of leave earned per worked interval when accrual_schedule is hourly. |
accrual_worked_hours |
decimal | Base worked hours required to earn leave when accrual_schedule is hourly. |
accrual_max_hours_per_year |
decimal | Annual cap on accrued leave hours when accrual_schedule is hourly. |
default_days_per_year |
decimal | Default days per year. |
max_carryover_days |
decimal | Maximum carryover days allowed. |
requires_approval |
boolean | Whether requests require approval. |
visible_to_all |
boolean | Whether teammates may request this policy at all. |
assigned_to_all |
boolean | Whether the policy is for every teammate. (Default: true) |
assigned_user_ids |
array | The IDs of the teammates the policy is for. Sending a list without an explicit assigned_to_all sets it to false; an empty list creates a policy assigned to nobody. An explicit assigned_to_all: true takes precedence over the list. |
Example Request:
curl -X POST "https://api.harvestapp.com/v2/pto/types" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp ([email protected])" \
-d '{"name": "Floating Holiday", "default_days_per_year": 2.0, "requires_approval": false}'
Example Response:
{
"id": 102,
"name": "Floating Holiday",
"color": "orange",
"icon": "calendar",
"accrual_type": "fixed",
"accrual_schedule": "monthly",
"default_days_per_year": 2.0,
"max_carryover_days": 0.0,
"requires_approval": false,
"visible_to_all": true,
"assigned_to_all": true,
"assigned_user_ids": [],
"assignment_revision": 0,
"is_active": true,
"created_at": "2026-09-03T12:00:00Z",
"updated_at": "2026-09-03T12:00:00Z"
}Update a time off policy
Updates an existing time off policy. Returns a time off policy object and a 200 OK response code if the call succeeded. Only administrators can perform this action.
PATCH /v2/pto/types/{PTO_TYPE_ID}
| Parameter | Type | Description |
|---|---|---|
name |
string | The updated policy name. |
color |
string | The updated color. |
icon |
string | The updated icon. |
accrual_type |
string | The updated accrual mode (fixed, accrued, unlimited). |
accrual_schedule |
string | The updated accrual interval (monthly, biweekly, semimonthly, hourly). |
accrual_first_payday |
date | The updated first payday for biweekly accruals. |
accrual_leave_hours |
decimal | The updated leave hours earned per period for hourly accruals. |
accrual_worked_hours |
decimal | The updated base worked hours for hourly accruals. |
accrual_max_hours_per_year |
decimal | The updated maximum accruable hours for hourly accruals. |
default_days_per_year |
decimal | The updated default days per year. |
max_carryover_days |
decimal | The updated maximum carryover days. |
requires_approval |
boolean | Update approval requirement. |
visible_to_all |
boolean | Update whether teammates may request this policy at all. |
assigned_to_all |
boolean | Set to true to make the policy one for every teammate, including people hired later. Switching to true requires assignment_revision even if no list is sent. |
assigned_user_ids |
array | Replaces who the policy is for with exactly these teammate IDs. Requires assignment_revision. |
assignment_revision |
integer | Required when assigned_user_ids is sent or when switching to all teammates. The assignment_revision you read the policy at. The update is refused with 422 if the policy’s assignment changed since. |
confirm_removals |
integer | Pass 1 to confirm an update that takes the policy away from people. Without it the update is refused with 422. |
confirm_removal_user_ids |
array | The IDs of the people your confirmation counted as losing the policy. The update is refused if it would remove anyone outside this list. |
confirm_removal_revision |
integer | The assignment_revision your confirmation was shown for. Required when the confirmation comes from switching an assigned_to_all: true policy to specific people. |
confirm_removal_count |
integer | The number of people your confirmation named. Required when using confirm_removal_roster_digest instead of confirm_removal_user_ids; the update is refused if the count differs. |
confirm_removal_roster_digest |
string | An alternative to confirm_removal_user_ids for an all-teammate narrowing. SHA-256 of the active teammate IDs sorted numerically and joined by commas. Requires confirm_removal_count; count alone is not sufficient. |
deactivated |
boolean | Set to false to reactivate a deactivated policy. |
Example Request:
curl -X PATCH "https://api.harvestapp.com/v2/pto/types/101" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "Content-Type: application/json" \
-H "User-Agent: MyApp ([email protected])" \
-d '{"default_days_per_year": 28.0}'
Example Response:
{
"id": 101,
"name": "Vacation",
"color": "blue",
"icon": "vacation",
"accrual_type": "fixed",
"accrual_schedule": "monthly",
"default_days_per_year": 28.0,
"max_carryover_days": 5.0,
"requires_approval": true,
"visible_to_all": true,
"assigned_to_all": true,
"assigned_user_ids": [],
"assignment_revision": 0,
"is_active": true,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-09-03T12:05:00Z"
}Changing who a policy is for
Who a policy is for is a separate control from visible_to_all: visibility decides whether teammates may request the policy at all, assignment decides which teammates it reaches. An assignment is a snapshot — a later department, role or project change never adds or removes anyone.
An update that takes the policy away from people is refused with 422 Unprocessable Entity until it is confirmed:
- Replacing a specific-person list removes active teammates who are not in the new list. Send
assignment_revision,confirm_removals=1andconfirm_removal_user_idsnaming the people you counted. Existing archived assignees remain assigned. - Switching an
assigned_to_all: truepolicy to specific people removes everyone who is not in the new list. Sendassignment_revision,confirm_removals=1andconfirm_removal_revision, plusconfirm_removal_user_ids. Page the active users from/v2/usersto identify the people being removed. Alternatively, send the roster digest and removal count together. A count alone cannot detect one teammate replacing another. - Removing people keeps their existing requests, granted days, carry and history. They cannot make new requests under that policy or earn new company-default allowances in later leave years.
A refused update returns a 422 whose body carries the number of people the update would remove, so a client can show the same confirmation and retry:
{
"message": "3 assignments will be removed. These people will no longer be able to request this type.",
"removal_count": 3
}Because assignment changes advance assignment_revision, reread the policy and send the revision it reports when you retry; the stale revision is refused again.
Delete a time off policy
Deletes or deactivates an existing time off policy. By default, time off policies are deactivated rather than permanently deleted so historical requests and allocations remain preserved. Returns a 200 OK response code and the deactivated time off policy object with is_active set to false.
To permanently delete a policy along with all of its associated requests and historical data, pass keep_history=false and confirm_delete_history=1. A successful permanent deletion returns a 204 No Content response code. A policy cannot be permanently deleted if it is the only remaining policy in the company or if it has requests included in locked payroll. Only administrators can perform this action.
DELETE /v2/pto/types/{PTO_TYPE_ID}
| Parameter | Type | Description |
|---|---|---|
keep_history |
boolean | Pass false to permanently delete the policy and its requests instead of deactivating it. (Default: true) |
confirm_delete_history |
integer | Must be passed as 1 when keep_history is false to confirm deletion of all historical requests. |
Example Request:
curl -X DELETE "https://api.harvestapp.com/v2/pto/types/101" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Harvest-Account-Id: $ACCOUNT_ID" \
-H "User-Agent: MyApp ([email protected])"
Example Response:
{
"id": 101,
"name": "Vacation",
"color": "blue",
"icon": "vacation",
"accrual_type": "fixed",
"accrual_schedule": "monthly",
"default_days_per_year": 28.0,
"max_carryover_days": 5.0,
"requires_approval": true,
"visible_to_all": true,
"assigned_to_all": true,
"assigned_user_ids": [],
"assignment_revision": 0,
"is_active": false,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-09-03T12:10:00Z"
}