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
- Identify the exact endpoint path and method. Nested paths may require a different resource scope than the parent path.
- Start with the endpoint's listed scope. If it is a :write scope, omit the matching :read scope because it is implied.
- 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.
- Confirm the key owner's role ceiling allows every scope you selected.
- 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.
| Condition | Also requires |
|---|---|
| expand=user or expand=approver on a leave | users:read |
| expand=leaveType on a leave | leave-types:read |
| expand=location on a user | locations:read |
| expand=department on a user | departments:read |
| expand=holidays on a user | holidays:read |
| Reading reason or statusReason on a leave or TOIL request | leaves:read-reason |
| Reading the name of a hidden leave type | leave-types:read-hidden |
| Sending X-On-Behalf-Of | users: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.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/departments | List departments | departments:read |
| POST /v2/departments | Create a department | departments:write |
| GET /v2/departments/{id} | Get a department | departments:read |
| PATCH /v2/departments/{id} | Update a department | departments:write |
| DELETE /v2/departments/{id} | Delete a department | departments:write |
Write scope implies the matching read scope.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/locations | List locations | locations:read |
| POST /v2/locations | Create a location | locations:write |
| GET /v2/locations/{id} | Get a location | locations:read |
| PATCH /v2/locations/{id} | Update a location | locations:write |
| DELETE /v2/locations/{id} | Delete a location | locations:write |
| GET /v2/locations/{id}/work-week | Get a location's work week | locations:read |
| PUT /v2/locations/{id}/work-week | Replace a location's work week | locations:write |
| GET /v2/locations/{id}/holidays | List a location's holidays | holidays:read |
| POST /v2/locations/{id}/holidays | Create a holiday | holidays:write |
| GET /v2/locations/{id}/holidays/{holidayId} | Get a holiday | holidays:read |
| PATCH /v2/locations/{id}/holidays/{holidayId} | Update a holiday | holidays:write |
| DELETE /v2/locations/{id}/holidays/{holidayId} | Delete a holiday | holidays:write |
| GET /v2/locations/{id}/leave-policies | List a location's leave policies | leave-policies:read |
| GET /v2/locations/{id}/leave-policies/{leaveTypeId} | Get a location's leave policy for a leave type | leave-policies:read |
| PUT /v2/locations/{id}/leave-policies/{leaveTypeId} | Enable or replace a location's leave policy for a leave type | leave-policies:write |
| PATCH /v2/locations/{id}/leave-policies/{leaveTypeId} | Change a location's leave policy for a leave type | leave-policies:write |
| DELETE /v2/locations/{id}/leave-policies/{leaveTypeId} | Disable a location's leave policy for a leave type | leave-policies:write |
Nested holiday and leave-policy paths use their own resource scopes, not locations:read or locations:write.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/labels | List labels | labels:read |
| POST /v2/labels | Create a label | labels:write |
| GET /v2/labels/{id} | Get a label | labels:read |
| PATCH /v2/labels/{id} | Update a label | labels:write |
| DELETE /v2/labels/{id} | Delete a label | labels:write |
Write scope implies the matching read scope.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/leave-types | List leave types | leave-types:read |
| POST /v2/leave-types | Create a leave type | leave-types:write |
| GET /v2/leave-types/{id} | Get a leave type | leave-types:read |
| PATCH /v2/leave-types/{id} | Update a leave type | leave-types:write |
| DELETE /v2/leave-types/{id} | Delete a leave type | leave-types:write |
Write scope implies the matching read scope.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/leaves | List leaves between two dates | leaves:read |
| POST /v2/leaves | Create a leave | leaves:write |
| GET /v2/leaves/{id} | Get a leave | leaves:read |
| PATCH /v2/leaves/{id} | Update a leave | leaves:write |
| DELETE /v2/leaves/{id} | Delete a leave | leaves:write |
| POST /v2/leaves/{id}/approve | Approve a leave | leaves:approve |
| POST /v2/leaves/{id}/deny | Deny a leave | leaves:approve |
| POST /v2/leaves/{id}/cancel | Cancel a leave | leaves:write |
Approve and deny use leaves:approve, not leaves:write.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/toil | List TOIL requests between two dates | toil:read |
| POST /v2/toil | Create a TOIL request | toil:write |
| GET /v2/toil/{id} | Get a TOIL request | toil:read |
| PATCH /v2/toil/{id} | Update a TOIL request | toil:write |
| DELETE /v2/toil/{id} | Delete a TOIL request | toil:write |
| POST /v2/toil/{id}/approve | Approve a TOIL request | leaves:approve |
| POST /v2/toil/{id}/deny | Deny a TOIL request | leaves:approve |
| POST /v2/toil/{id}/cancel | Cancel a TOIL request | toil:write |
TOIL approve and deny use leaves:approve, not toil:write.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/users | List users | users:read |
| GET /v2/users/{id} | Get a user | users:read |
| PATCH /v2/users/{id} | Update a user's profile | users:write |
| GET /v2/users/{id}/balances | Get a user's leave balances | balances:read |
| GET /v2/users/{id}/projection | Project a user's leave balance | balances:read |
| GET /v2/users/{id}/labels | List a user's labels | labels:read |
| POST /v2/users/{id}/labels | Assign a label to a user | labels:write |
| DELETE /v2/users/{id}/labels/{labelId} | Remove a label from a user | labels:write |
| PUT /v2/users/{id}/location | Move a user to another location | users:write |
| PUT /v2/users/{id}/department | Move a user to another department | users:write |
| POST /v2/users/{id}/activate | Activate a user | users:write |
| POST /v2/users/{id}/deactivate | Deactivate a user | users:write |
| PUT /v2/users/{id}/location-admin | Make a user a Location Admin | users:write |
| DELETE /v2/users/{id}/location-admin | Remove a user's Location Admin role | users:write |
| PUT /v2/users/{id}/work-week | Set a user's custom work week | users:write |
| DELETE /v2/users/{id}/work-week | Reset a user's work week | users:write |
| GET /v2/users/{id}/quotas | Get a user's leave quotas | users:read |
| PUT /v2/users/{id}/quotas/{leaveTypeId} | Set a user's quota for a leave type | users:write |
Nested balances, labels and quotas use their own resource scopes.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/automations/{type} | List automations of a type | automations:read |
| POST /v2/automations/{type} | Create an automation | automations:write |
| GET /v2/automations/{type}/{id} | Get an automation | automations:read |
| PATCH /v2/automations/{type}/{id} | Update an automation | automations:write |
| DELETE /v2/automations/{type}/{id} | Delete an automation | automations:write |
Write scope implies the matching read scope.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/notifications | List notifications | notifications:read |
| POST /v2/notifications | Create a notification | notifications:write |
| GET /v2/notifications/{id} | Get a notification | notifications:read |
| PATCH /v2/notifications/{id} | Update a notification | notifications:write |
| DELETE /v2/notifications/{id} | Delete a notification | notifications:write |
Write scope implies the matching read scope.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/scheduled-reports | List scheduled reports | notifications:read |
| POST /v2/scheduled-reports | Create a scheduled report | notifications:write |
| GET /v2/scheduled-reports/{id} | Get a scheduled report | notifications:read |
| PATCH /v2/scheduled-reports/{id} | Update a scheduled report | notifications:write |
| DELETE /v2/scheduled-reports/{id} | Delete a scheduled report | notifications:write |
Scheduled reports use notifications scopes, not a separate scheduled-reports scope.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/operations/{id} | Get an operation | Any valid key |
No resource scope is required; any valid key can call it.
| Endpoint | What it does | Scopes |
|---|---|---|
| GET /v2/webhooks | List webhooks | webhooks:read |
| POST /v2/webhooks | Create a webhook | webhooks:write |
| GET /v2/webhooks/{id} | Get a webhook | webhooks:read |
| PATCH /v2/webhooks/{id} | Update a webhook | webhooks:write |
| DELETE /v2/webhooks/{id} | Delete a webhook | webhooks:write |
| POST /v2/webhooks/{id}/test | Send a test event | webhooks:write |
| POST /v2/webhooks/{id}/rotate-secret | Rotate the signing secret | webhooks:write |
| POST /v2/webhooks/{id}/pause | Pause a webhook | webhooks:write |
| POST /v2/webhooks/{id}/resume | Resume a webhook | webhooks: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.