Skip to content

How Do I Use the OpenAPI?

The Open API integration lets your own tools read and change leave data, and receive notifications when something changes. This guide covers the full setup path: creating a key, choosing what it can do, making a first request, registering webhooks, managing keys over time, and understanding quotas. It also explains how the API differs from Zapier, the MCP server and Vee.

On this page

What the Open API does

The Open API connects your leave-management workspace to external systems you control. You create an API key, decide which operations it may perform, and then use it to read or modify data or to subscribe to change events. The key acts on your behalf: it can only do what you are permitted to do in the workspace. That constraint is the single most important design rule, because it means a key cannot be used to escalate access beyond your own role.

Create an API key step by step

Sign in to your account, open Integrations from the left menu under Workspace Settings, and click the API card to reach the Open API page. In the API keys section, choose Create API key. Give the key a Key name that only people in your company can see. Optionally add an Integration name; this appears next to every change the key makes, for example "Approved by Jane (through Payroll sync)". Leave it blank to show only the person's name. Under Permissions, pick a template and adjust it. Under Expiration, choose 30 days, 90 days, 1 year (recommended) or never. Review the Summary, click Create API key, then copy the key and store it safely. The full key is displayed only once, at creation.

Choosing permissions: templates and separate checkboxes

Start from a template and refine it. Read only allows reading data with no changes, which suits reports and dashboards. Leave management allows requesting, adding and approving leave, plus reading users and leave types. Workspace setup covers locations, departments, leave types, policies, holidays and users. Custom lets you select each permission individually. Every permission can be set to No access, Read, or Read & write. Three capabilities are separate checkboxes rather than part of the permission level: approving and denying requests, seeing hidden leave type names, and acting on behalf of other users. Enable them only when your tool genuinely needs them.

Managing keys: usage, activity, rotation and revocation

The API keys table lists every key in the workspace with its owner, permissions, last use, expiry date and status. Opening a key shows this month's usage and lets you edit its name and permissions. Recent activity lists every request that changed data. Rotate key produces a new key with the same name and permissions; you choose whether the old key keeps working for 24 hours (recommended), for 7 days, or stops immediately. Revoke stops a key permanently. An email reminder is sent 14 days before a key expires.

Making your first request

The base URL is {{API_BASE_URL}}/v2. Send the key as a bearer token in the Authorization header. A successful call returns data under data; lists with more pages also include a nextToken that you pass back to retrieve the next page. When a call fails, the error payload carries three parts: a code, a description and a resolution. Two failures are worth telling apart up front. A 401 means the key itself is missing or unrecognized. A 403 carrying INSUFFICIENT_SCOPE means the key is valid but its permissions do not cover what the request asks for. The full technical reference, covering every endpoint, parameter, error code and webhook event, is in the developer documentation, which can also be opened with the Open Documentation button on the Open API page.

Adding a webhook

On the Open API page, open Webhooks and click Manage webhooks, then Add webhook. Enter the Endpoint URL that should receive events; it must use HTTPS. Under Events, choose Leave decisions, All time off activity, Keep a full copy in sync, or Custom to select events yourself. Click Add webhook to finish. You receive events only for data you are allowed to see.

Quotas and rate limits

Limits apply per API key: up to 30,000 requests per month, and 10 requests per second with a burst of up to 50 requests. If your integration needs more, contact the developer team with your company name, the integration and the expected traffic. Keys created before API v2 appear under Legacy keys (API v1). They continue to work but can only read data and do not work with API v2. To change data through the API, create a new key and follow the migration guide.

Choosing between the API, Zapier, the MCP server and Vee

The right tool depends on the job. Use the API when someone on your team can write and run code to connect the workspace to other systems, with webhooks to react to changes. Zapier automates without code but has fewer features than the API. The MCP server lets your own AI assistant, such as Claude or ChatGPT, answer questions and take actions one request at a time. Vee is built in and needs no setup: employees ask about and request their own leave in plain language. All four are included on every paid plan, and many teams use more than one. The integration guides show which option fits each task.

Worked example: sending approved leave to payroll

A payroll sync is a good illustration of the API plus webhooks pattern. First, load the approved leave you already have once. Then subscribe a webhook to leave decisions so your system is told when leave is approved, edited, cancelled or deleted. Each time an event arrives, read the leave again so your copy stays correct. Zapier can handle simple flows, but it does not load past leave or retry missed events, so it is not a substitute for this pattern when historical accuracy matters. The dedicated guide on sending approved leave to an HRIS or payroll system walks through the details.

Troubleshooting and recovery checklist

If a request fails, check the error code first. A 401 means the key is missing or unknown; confirm you are sending it as a bearer token. A 403 with INSUFFICIENT_SCOPE means the key exists but lacks the permission the request needs; review the permission level and the separate checkboxes. A lost key cannot be restored, because the full value is displayed only at creation. The recovery path is to open the key and use Rotate key to issue a replacement, then update the tool that uses it. If you suspect the old key has leaked, choose the option that stops it immediately instead of leaving a grace window open.

Frequently asked questions

Should I use the API, Zapier, the MCP server, or Vee?

It depends on the job. Use the API when someone on your team can write and run code to connect the workspace to other systems, with webhooks to react to changes. Zapier automates without code but has fewer features than the API. The MCP server lets your own AI assistant, such as Claude or ChatGPT, answer questions and take actions one request at a time. Vee is built in and needs no setup: employees ask about and request their own leave in plain language. All four are included on every paid plan, and many teams use more than one. The integration guides show which one fits each task.

Does the API cost extra?

No. The Open API integration is included in the Core and Complete plans at no additional cost.

What if I lose a key?

A key's full value appears at creation only, so there is no way to retrieve it later. Open the key and use Rotate key to issue a replacement, then update the tool that uses it. If the old key may have leaked, pick the option that stops it right away.

How do I send approved leave to payroll or an HRIS?

Use the API with webhooks. Load the approved leave you already have once, then let webhooks tell you when leave is approved, edited, cancelled or deleted, and read the leave again each time so your copy stays correct. Zapier works for simple flows, but it does not load past leave or retry missed events. See the guide on sending approved leave to an HRIS or payroll system.