Vacation Tracker Docs
REST API v2

REST API v2

Read and write access to Vacation Tracker for integrations, partner tools, internal tooling and AI agents.

REST API v2 gives integrations, partner tools, internal tooling and AI agents read and write access to your Vacation Tracker workspace. Compared to v1, it adds:

  • Scoped keys owned by a user. Each key has only the permissions it needs, and it can never do more than the person who created it.
  • Synchronous writes. A write waits until the change is applied and returns the updated resource. If the change takes longer, you get 202 Accepted and an operation to follow.
  • Webhooks. Get notified when leaves, users and other resources change.
  • AI-friendly errors. Every error has a stable code, a description and a resolution you can act on, or pass straight to an AI agent.

Base URL

https://api.vacationtracker.io/v2

Quick start

Create a key in the dashboard (see Authentication), then send it as a bearer token:

curl https://api.vacationtracker.io/v2/departments \
  -H "Authorization: Bearer vt_live_..."

Response format

A successful call returns the resource, or a list of resources, under data:

{
  "data": [...],
  "nextToken": "..."
}

nextToken is present only on list responses that have more pages.

StatusWhen
200 OKRead, update or action succeeded.
201 CreatedThe resource was created.
202 AcceptedThe write is still running. Follow it in Operations.
204 No ContentThe resource was deleted. Leaves and TOIL requests return 200 OK with the deleted request instead.

Pagination

The leave, TOIL, user and webhook lists accept limit and nextToken query parameters. Other lists return every item in one response. If a response includes nextToken, pass it unchanged in the next request to get the next page. When it is missing, you have reached the last page.

# First page
curl "https://api.vacationtracker.io/v2/users?limit=100" \
  -H "Authorization: Bearer vt_live_..."

# Next page, with the nextToken from the previous response (URL-encoded)
curl --get "https://api.vacationtracker.io/v2/users" \
  --data-urlencode "limit=100" \
  --data-urlencode "nextToken=$NEXT_TOKEN" \
  -H "Authorization: Bearer vt_live_..."

Errors

Every error uses the same envelope, with the HTTP status from the error catalog:

{
  "error": {
    "code": "INSUFFICIENT_SCOPE",
    "name": "InsufficientScope",
    "description": "The API key does not have the scopes this request needs.",
    "resolution": "Add the scopes listed in details.requiredScopes to the key in the Vacation Tracker dashboard.",
    "requestId": "...",
    "details": { "requiredScopes": ["leaves:write"] }
  }
}

Branch on code. details is optional and depends on the error. See Errors for every code.

Availability

REST API v2 is available on all paid plans with the Open API add-on. It is not available on the Freemium plan.

v1 keeps working

The v1 API (/v1, x-api-key header) keeps working for existing keys, but it is sealed: it gets no new endpoints, and new keys are v2 keys. v1 keys do not work on v2.

Next steps

On this page