Skip to content

REST API v2 scopes by endpoint

Use this reference to choose the smallest set of scopes a REST API v2 key needs. Each endpoint has a base scope; some requests also need a scope for expanded data or a sensitive field. If a key lacks a required scope, the request returns 403 INSUFFICIENT_SCOPE and details.requiredScopes names what is missing.

How to read the scope tables

Each endpoint table lists the HTTP method and path, a short description, and the scope that authorizes the call. Read the path literally: a resource-level read scope does not automatically cover a nested resource such as holidays or leave policies. The scope column is the authority for the endpoint itself.

A :write scope implies its matching :read scope. A key holding leaves:write therefore does not also need leaves:read. This implication applies to the write/read pair, not to unrelated scopes or to request-dependent scopes.

Endpoint scopes are only the first layer. A request that asks for expanded related data, a leave reason, a hidden leave type name, or acts on behalf of another user must also satisfy the condition table below.

Scopes that depend on the request

These scopes are not endpoint scopes. They apply on top of the endpoint's own scope only when the request asks for the corresponding data or uses the corresponding header. The condition table is reproduced in full below.

Endpoint scope tables

The tables below cover departments, locations, labels, leave types, leaves, TOIL, users, automations, notifications, scheduled reports, operations and webhooks. Every original row, path and scope is preserved in the accompanying factual table modules.

Checklist before creating a key

  1. Identify the exact endpoint path and method. Nested paths may require a different resource scope than the parent path.
  2. Start with the endpoint's listed scope. If it is a :write scope, omit the matching :read scope because it is implied.
  3. Add request-dependent scopes only for the features you will actually use: expand=user or expand=approver, expand=leaveType, expand=location, expand=department, expand=holidays, reason or statusReason reads, hidden leave type names, or X-On-Behalf-Of.
  4. Confirm the key owner's role ceiling allows every scope you selected.
  5. Test with a request that exercises the conditional feature, not only the base endpoint, and inspect details.requiredScopes if a 403 appears.

Worked example: reading a leave with expanded data and a reason

Suppose an integration reads a single leave with GET /v2/leaves/{id}, asks for expand=user, and also reads the leave reason. The endpoint itself requires leaves:read. The expand=user condition adds users:read. Reading reason adds leaves:read-reason. The key therefore needs leaves:read, users:read and leaves:read-reason. If the same key also creates leaves, leaves:write covers leaves:read through the write-implies-read rule, but it does not cover users:read or leaves:read-reason.

If the request instead sends X-On-Behalf-Of, users:act-on-behalf is also required. A 403 response should be read together with details.requiredScopes to see which layer is missing.

Three different reasons a scope check can fail

A missing endpoint scope means the key cannot call that path at all. A missing request-dependent scope means the base call may be allowed but the expanded field or sensitive value is not. A role ceiling problem means the key owner cannot grant the scope in the first place, even if the scope exists. These are separate checks; details.requiredScopes reports the scopes the request needs, while the role ceiling governs what the key owner may assign.

Scope and error field map

Scope strings follow the resource:action pattern, such as departments:read, leaves:write, leaves:approve, balances:read, notifications:read and webhooks:write. Request-dependent scopes include users:read, leave-types:read, locations:read, departments:read, holidays:read, leaves:read-reason, leave-types:read-hidden and users:act-on-behalf. The error code is 403 INSUFFICIENT_SCOPE, and the missing scopes are listed in details.requiredScopes. The X-On-Behalf-Of header is the trigger for users:act-on-behalf.

Request-dependent scope conditions
ConditionAlso requires
expand=user or expand=approver on a leaveusers:read
expand=leaveType on a leaveleave-types:read
expand=location on a userlocations:read
expand=department on a userdepartments:read
expand=holidays on a userholidays:read
Reading reason or statusReason on a leave or TOIL requestleaves:read-reason
Reading the name of a hidden leave typeleave-types:read-hidden
Sending X-On-Behalf-Ofusers:act-on-behalf

These scopes apply only when the request asks for the corresponding data or sends the header, in addition to the endpoint scope.

Departments endpoints and scopes
EndpointWhat it doesScopes
GET /v2/departmentsList departmentsdepartments:read
POST /v2/departmentsCreate a departmentdepartments:write
GET /v2/departments/{id}Get a departmentdepartments:read
PATCH /v2/departments/{id}Update a departmentdepartments:write
DELETE /v2/departments/{id}Delete a departmentdepartments:write

Write scope implies the matching read scope.

Locations endpoints and scopes
EndpointWhat it doesScopes
GET /v2/locationsList locationslocations:read
POST /v2/locationsCreate a locationlocations:write
GET /v2/locations/{id}Get a locationlocations:read
PATCH /v2/locations/{id}Update a locationlocations:write
DELETE /v2/locations/{id}Delete a locationlocations:write
GET /v2/locations/{id}/work-weekGet a location's work weeklocations:read
PUT /v2/locations/{id}/work-weekReplace a location's work weeklocations:write
GET /v2/locations/{id}/holidaysList a location's holidaysholidays:read
POST /v2/locations/{id}/holidaysCreate a holidayholidays:write
GET /v2/locations/{id}/holidays/{holidayId}Get a holidayholidays:read
PATCH /v2/locations/{id}/holidays/{holidayId}Update a holidayholidays:write
DELETE /v2/locations/{id}/holidays/{holidayId}Delete a holidayholidays:write
GET /v2/locations/{id}/leave-policiesList a location's leave policiesleave-policies:read
GET /v2/locations/{id}/leave-policies/{leaveTypeId}Get a location's leave policy for a leave typeleave-policies:read
PUT /v2/locations/{id}/leave-policies/{leaveTypeId}Enable or replace a location's leave policy for a leave typeleave-policies:write
PATCH /v2/locations/{id}/leave-policies/{leaveTypeId}Change a location's leave policy for a leave typeleave-policies:write
DELETE /v2/locations/{id}/leave-policies/{leaveTypeId}Disable a location's leave policy for a leave typeleave-policies:write

Nested holiday and leave-policy paths use their own resource scopes, not locations:read or locations:write.

Labels endpoints and scopes
EndpointWhat it doesScopes
GET /v2/labelsList labelslabels:read
POST /v2/labelsCreate a labellabels:write
GET /v2/labels/{id}Get a labellabels:read
PATCH /v2/labels/{id}Update a labellabels:write
DELETE /v2/labels/{id}Delete a labellabels:write

Write scope implies the matching read scope.

Leave types endpoints and scopes
EndpointWhat it doesScopes
GET /v2/leave-typesList leave typesleave-types:read
POST /v2/leave-typesCreate a leave typeleave-types:write
GET /v2/leave-types/{id}Get a leave typeleave-types:read
PATCH /v2/leave-types/{id}Update a leave typeleave-types:write
DELETE /v2/leave-types/{id}Delete a leave typeleave-types:write

Write scope implies the matching read scope.

Leaves endpoints and scopes
EndpointWhat it doesScopes
GET /v2/leavesList leaves between two datesleaves:read
POST /v2/leavesCreate a leaveleaves:write
GET /v2/leaves/{id}Get a leaveleaves:read
PATCH /v2/leaves/{id}Update a leaveleaves:write
DELETE /v2/leaves/{id}Delete a leaveleaves:write
POST /v2/leaves/{id}/approveApprove a leaveleaves:approve
POST /v2/leaves/{id}/denyDeny a leaveleaves:approve
POST /v2/leaves/{id}/cancelCancel a leaveleaves:write

Approve and deny use leaves:approve, not leaves:write.

TOIL endpoints and scopes
EndpointWhat it doesScopes
GET /v2/toilList TOIL requests between two datestoil:read
POST /v2/toilCreate a TOIL requesttoil:write
GET /v2/toil/{id}Get a TOIL requesttoil:read
PATCH /v2/toil/{id}Update a TOIL requesttoil:write
DELETE /v2/toil/{id}Delete a TOIL requesttoil:write
POST /v2/toil/{id}/approveApprove a TOIL requestleaves:approve
POST /v2/toil/{id}/denyDeny a TOIL requestleaves:approve
POST /v2/toil/{id}/cancelCancel a TOIL requesttoil:write

TOIL approve and deny use leaves:approve, not toil:write.

Users endpoints and scopes
EndpointWhat it doesScopes
GET /v2/usersList usersusers:read
GET /v2/users/{id}Get a userusers:read
PATCH /v2/users/{id}Update a user's profileusers:write
GET /v2/users/{id}/balancesGet a user's leave balancesbalances:read
GET /v2/users/{id}/projectionProject a user's leave balancebalances:read
GET /v2/users/{id}/labelsList a user's labelslabels:read
POST /v2/users/{id}/labelsAssign a label to a userlabels:write
DELETE /v2/users/{id}/labels/{labelId}Remove a label from a userlabels:write
PUT /v2/users/{id}/locationMove a user to another locationusers:write
PUT /v2/users/{id}/departmentMove a user to another departmentusers:write
POST /v2/users/{id}/activateActivate a userusers:write
POST /v2/users/{id}/deactivateDeactivate a userusers:write
PUT /v2/users/{id}/location-adminMake a user a Location Adminusers:write
DELETE /v2/users/{id}/location-adminRemove a user's Location Admin roleusers:write
PUT /v2/users/{id}/work-weekSet a user's custom work weekusers:write
DELETE /v2/users/{id}/work-weekReset a user's work weekusers:write
GET /v2/users/{id}/quotasGet a user's leave quotasusers:read
PUT /v2/users/{id}/quotas/{leaveTypeId}Set a user's quota for a leave typeusers:write

Nested balances, labels and quotas use their own resource scopes.

Automations endpoints and scopes
EndpointWhat it doesScopes
GET /v2/automations/{type}List automations of a typeautomations:read
POST /v2/automations/{type}Create an automationautomations:write
GET /v2/automations/{type}/{id}Get an automationautomations:read
PATCH /v2/automations/{type}/{id}Update an automationautomations:write
DELETE /v2/automations/{type}/{id}Delete an automationautomations:write

Write scope implies the matching read scope.

Notifications endpoints and scopes
EndpointWhat it doesScopes
GET /v2/notificationsList notificationsnotifications:read
POST /v2/notificationsCreate a notificationnotifications:write
GET /v2/notifications/{id}Get a notificationnotifications:read
PATCH /v2/notifications/{id}Update a notificationnotifications:write
DELETE /v2/notifications/{id}Delete a notificationnotifications:write

Write scope implies the matching read scope.

Scheduled reports endpoints and scopes
EndpointWhat it doesScopes
GET /v2/scheduled-reportsList scheduled reportsnotifications:read
POST /v2/scheduled-reportsCreate a scheduled reportnotifications:write
GET /v2/scheduled-reports/{id}Get a scheduled reportnotifications:read
PATCH /v2/scheduled-reports/{id}Update a scheduled reportnotifications:write
DELETE /v2/scheduled-reports/{id}Delete a scheduled reportnotifications:write

Scheduled reports use notifications scopes, not a separate scheduled-reports scope.

Operations endpoints and scopes
EndpointWhat it doesScopes
GET /v2/operations/{id}Get an operationAny valid key

No resource scope is required; any valid key can call it.

Webhooks endpoints and scopes
EndpointWhat it doesScopes
GET /v2/webhooksList webhookswebhooks:read
POST /v2/webhooksCreate a webhookwebhooks:write
GET /v2/webhooks/{id}Get a webhookwebhooks:read
PATCH /v2/webhooks/{id}Update a webhookwebhooks:write
DELETE /v2/webhooks/{id}Delete a webhookwebhooks:write
POST /v2/webhooks/{id}/testSend a test eventwebhooks:write
POST /v2/webhooks/{id}/rotate-secretRotate the signing secretwebhooks:write
POST /v2/webhooks/{id}/pausePause a webhookwebhooks:write
POST /v2/webhooks/{id}/resumeResume a webhookwebhooks:write

Write scope implies the matching read scope.

Frequently asked questions

What does a 403 INSUFFICIENT_SCOPE response tell me?

The request was rejected because the key lacks a required scope. The response includes details.requiredScopes, which lists the missing scopes. Check whether the missing scope is the endpoint's base scope or a request-dependent scope triggered by expand, reason access, a hidden leave type name, or X-On-Behalf-Of.

Does a write scope cover the matching read scope?

Yes. A :write scope implies its :read counterpart, so a key with leaves:write does not need leaves:read as well. This does not extend to other resources or to request-dependent scopes.

Do approve and deny use the write scope?

No. Approving or denying a leave or TOIL request requires leaves:approve. Creating, updating, deleting or cancelling a leave uses leaves:write; cancelling a TOIL request uses toil:write.

Which scope is needed to act on behalf of a user?

Sending X-On-Behalf-Of requires users:act-on-behalf in addition to the endpoint's own scope.

Why does a scope exist but still fail for my key?

The key owner's role ceiling may prevent granting that scope. The role ceiling is separate from the scope list; a scope that exists in the API may not be assignable by a given key owner.