Skip to content

Developers

xTracker API and webhooks

Read your organisation's people, approved time, timesheets, attendance and leave from your own systems, and get a signed message when something changes. Version 1 is read-only.

Getting started

The API and webhooks are on the Business and Enterprise Plans. Only your organisation's Owner can create API keys and webhook endpoints, in Settings → Integrations → API & webhooks.

Every endpoint answers GET requests with JSON at https://api.xtracker.enroutex.co.uk/api/public/v1. A key reads only its own organisation's data, and only what its scopes allow.

Your first request
curl https://api.xtracker.enroutex.co.uk/api/public/v1/people?limit=50 \
  -H "Authorization: Bearer $XTRACKER_API_KEY"

The full description of every endpoint is also available as an OpenAPI documentfor your API tools. Changes that could break your code come as a new version, with 12 months' notice; new fields can be added to version 1 at any time.

Authentication and scopes

Send the key in the Authorization header: Authorization: Bearer xtk_…. The key is shown once, when it's created; xTracker keeps only a fingerprint of it, so a lost key can't be shown again. Make a new one and revoke the old one: a revoked key stops working at once. Keys can also have an expiry date.

Give each key only the scopes its system needs:

Scopes
ScopeWhat it reads
read:peopleRead people
read:teamsRead teams
read:projectsRead projects
read:timeRead approved time
read:timesheetsRead timesheets
read:attendanceRead attendance
read:leaveRead leave requests and balances

Creating, revoking and the first use of each key are recorded in your organisation's Audit Log.

Pagination and dates

Lists return up to limit rows (1 to 100, 50 if you don't say) and a next_cursor. Pass it back as cursor for the next page; it's null on the last page.

A page of people
{
  "data": [
    {
      "id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
      "first_name": "Ada",
      "last_name": "Lovelace",
      "email": "ada@example.com",
      "job_title": "Designer",
      "role": "member",
      "status": "active",
      "team_id": "9c5b94b1-35ad-49bb-b118-8e8fc24abf80",
      "joined_at": "2026-03-02T09:00:00.000Z"
    }
  ],
  "next_cursor": "WyJhZGEiLCJsb3ZlbGFjZSIsIjFiOWQ2YmNkIl0"
}

Dates are YYYY-MM-DD and days are your organisation's days, in its time zone (see GET /organisation). start_date and end_date are both included and can be at most 93 days apart. Times are ISO 8601 in UTC. Durations are whole minutes: 1770 is 29h 30m.

Rate limits

Limits per organisation
PlanRequests an hourWebhook endpoints
StandardNot includedNot included
Business1,0003
Enterprise10,000No limit

The hour runs from the start of each clock hour (UTC). Every answer has X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds). Over the limit you get 429 with Retry-After in seconds.

Errors

Errors have the HTTP status and a body with a stable code and a message you can show people:

An error
{
  "error": {
    "code": "insufficient_scope",
    "message": "This API key doesn't have the read:leave scope."
  }
}
Error codes
StatusCodeMeaning
400invalid_date_rangestart_date or end_date is missing, not YYYY-MM-DD, in the wrong order or more than 93 days apart.
400invalid_cursorThe cursor wasn't one this API returned.
400invalid_limitlimit isn't a whole number from 1 to 100.
400invalid_parameterAnother query parameter has a value the endpoint doesn't accept.
401missing_api_keyNo Authorization: Bearer header.
401invalid_api_keyThe key isn't one of your organisation's keys.
401api_key_revokedThe Owner revoked the key.
401api_key_expiredThe key passed its expiry date.
403insufficient_scopeThe key doesn't have the scope the endpoint needs.
403plan_not_includedYour organisation's plan doesn't include the API.
403api_pausedYour organisation's subscription isn't active or the account is suspended.
404not_foundNo such record in your organisation.
429rate_limitedThis hour's requests are used up. Wait for the seconds in Retry-After.

Reference

All paths are under https://api.xtracker.enroutex.co.uk/api/public/v1.

GET /organisation

The organisation the key belongs to, and its time zone. Needs no scope. No scope needed.

Fields of data
Fields returned by /organisation
FieldTypeDescription
iduuid
namestring
time_zonestringThe organisation's time zone. Every `date` in the API is a day in this zone.

GET /people

People in the organisation (managers and members), by first name then last name. Scope: read:people.

Parameters of /people
ParameterTypeDescription
team_idstring
statusactive | invited | suspended | deactivated
limitnumberRows per page, 1–100 (default 50).
cursorstringThe `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /people
FieldTypeDescription
emailstring
first_namestring
iduuid
job_titlestring or null
joined_atdate-time or null
last_namestring
rolemanager | member
statusactive | invited | suspended | deactivated
team_iduuid or null

GET /people/{id}

One person. Scope: read:people.

Parameters of /people/{id}
ParameterTypeDescription
id requiredstring
Fields of data
Fields returned by /people/{id}
FieldTypeDescription
emailstring
first_namestring
iduuid
job_titlestring or null
joined_atdate-time or null
last_namestring
rolemanager | member
statusactive | invited | suspended | deactivated
team_iduuid or null

GET /teams

Teams, by name. Scope: read:teams.

Parameters of /teams
ParameterTypeDescription
limitnumberRows per page, 1–100 (default 50).
cursorstringThe `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /teams
FieldTypeDescription
created_atdate-time
iduuid
manager_iduuid or nullThe team's manager. Null when it has none, or when the Owner manages it (the Owner isn't in the API).
member_countnumber
namestring

GET /projects

Projects, by name. Archived projects only with include_archived=true. Scope: read:projects.

Parameters of /projects
ParameterTypeDescription
include_archivedtrue | false
limitnumberRows per page, 1–100 (default 50).
cursorstringThe `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /projects
FieldTypeDescription
activebooleanFalse for archived projects.
created_atdate-time
iduuid
namestring

GET /time-entries

Approved time entries that started in the date range, oldest first, with approved minutes. Scope: read:time.

Parameters of /time-entries
ParameterTypeDescription
start_date requiredstringFirst day, YYYY-MM-DD (organisation time zone).
end_date requiredstringLast day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
person_idstringOnly this person.
limitnumberRows per page, 1–100 (default 50).
cursorstringThe `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /time-entries
FieldTypeDescription
datedate
entry_typetimer | focus_block
iduuid
minutesnumberApproved time, in whole minutes.
person_iduuid
project_iduuid or null
started_atdate-time
stopped_atdate-time or null

GET /approved-hours

Approved minutes per person for the date range. Scope: read:time.

Parameters of /approved-hours
ParameterTypeDescription
start_date requiredstringFirst day, YYYY-MM-DD (organisation time zone).
end_date requiredstringLast day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
limitnumberRows per page, 1–100 (default 50).
cursorstringThe `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /approved-hours
FieldTypeDescription
approved_minutesnumberApproved time in the range, in whole minutes (1770 = 29h 30m).
end_datedate
entriesnumber
person_iduuid
start_datedate

GET /timesheets

Submitted time entries in the date range and where each is in review. Scope: read:timesheets.

Parameters of /timesheets
ParameterTypeDescription
start_date requiredstringFirst day, YYYY-MM-DD (organisation time zone).
end_date requiredstringLast day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
person_idstringOnly this person.
statussubmitted | approved | rejected
limitnumberRows per page, 1–100 (default 50).
cursorstringThe `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /timesheets
FieldTypeDescription
approved_minutesnumber or nullApproved minutes; null until approved.
auto_approvedboolean
datedate
iduuid
minutesnumberTime recorded, in whole minutes.
person_iduuid
project_iduuid or null
reviewed_atdate-time or null
started_atdate-time
statussubmitted | approved | rejected
stopped_atdate-time or null
submitted_atdate-time

GET /attendance

One row per person per day they clocked in: first clock-in, last clock-out, minutes worked, lateness. Scope: read:attendance.

Parameters of /attendance
ParameterTypeDescription
start_date requiredstringFirst day, YYYY-MM-DD (organisation time zone).
end_date requiredstringLast day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
person_idstringOnly this person.
limitnumberRows per page, 1–100 (default 50).
cursorstringThe `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /attendance
FieldTypeDescription
clock_in_atdate-time
clock_out_atdate-time or nullNull while the timer is still running.
datedate
latebooleanAfter the person's start time plus the organisation's grace period.
late_minutesnumberMinutes after the start time; 0 when on time.
person_iduuid
worked_minutesnumberWhole minutes.

GET /leave-requests

Leave requests (pending, approved, rejected) that overlap the date range. Scope: read:leave.

Parameters of /leave-requests
ParameterTypeDescription
start_date requiredstringFirst day, YYYY-MM-DD (organisation time zone).
end_date requiredstringLast day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
person_idstringOnly this person.
statuspending | approved | rejected
limitnumberRows per page, 1–100 (default 50).
cursorstringThe `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /leave-requests
FieldTypeDescription
daysnumber
end_datedate
half_dayboolean
half_day_partmorning | afternoon
iduuid
leave_typestring
leave_type_namestring
person_iduuid
requested_atdate-time
reviewed_atdate-time or null
start_datedate
statuspending | approved | rejected

GET /leave-balances

Each person's leave balances for the current leave year. Up to 25 people per page. Scope: read:leave.

Parameters of /leave-balances
ParameterTypeDescription
person_idstringOnly this person.
limitnumberPeople per page, 1–25 (default 25).
cursorstringThe `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /leave-balances
FieldTypeDescription
balancesobject[]
balances[].allowance_daysnumber or null
balances[].available_daysnumber or null
balances[].leave_typestring
balances[].leave_type_namestring
balances[].pending_daysnumber
balances[].unlimitedboolean
balances[].used_daysnumber
leave_yearobject
leave_year.end_datedate
leave_year.start_datedate
person_iduuid

Webhooks

Add an https address on your own system in Settings → Integrations → API & webhooks and choose its events. xTracker sends each event as a POST with a JSON body holding ids and a few fields, never more than the API would return.

Events
EventSent when
leave.requestedLeave requested
leave.approvedLeave approved
leave.rejectedLeave rejected
leave.cancelledLeave cancelled
timesheet.submittedTimesheet submitted
timesheet.approvedTimesheet approved
timesheet.rejectedTimesheet rejected
attendance.clock_inClock-in
attendance.clock_outClock-out
attendance.lateLate arrival
member.addedMember added
member.removedMember removed
member.team_changedMember moved team
A delivery
POST /your/endpoint HTTP/1.1
Content-Type: application/json
X-Xtracker-Event: leave.approved
X-Xtracker-Delivery: 0d4f6c1e-2a7b-4c55-9a4e-6f1f0f0b7f21
X-Xtracker-Signature: t=1795424400,v1=5f2b…

{
  "id": "6a0e2b9c-0f4e-4a8e-9a37-2f8a51b1c0de",
  "type": "leave.approved",
  "created_at": "2026-11-23T09:10:00.000Z",
  "organisation_id": "4f8e3c1a-7b2d-4e6f-9a1b-2c3d4e5f6a7b",
  "api_version": "v1",
  "data": {
    "leave_request_id": "c2a7d1e4-5b6f-4a3c-8d9e-0f1a2b3c4d5e",
    "person_id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
    "leave_type": "annual",
    "start_date": "2026-11-24",
    "end_date": "2026-11-25",
    "days": 2,
    "half_day": false,
    "status": "approved"
  }
}
  • Answer with any 2xxstatus within 10 seconds. Redirects aren't followed.
  • A delivery that fails is tried again after 1 minute, 5 minutes, 15 minutes, 1 hour, 3 hours, 6 hours and 12 hours, and never more than 24 hours after the event. The same event keeps its id, so you can ignore repeats.
  • The delivery log in Settings shows each delivery's status, attempts and your response code, and can send any event again.
  • An endpoint that fails 20 times in a row, or for 24 hours, is turned off and the Owner gets an email.
  • Addresses must be public: https only, and never an address inside a private network. The address is checked again before every delivery.
  • pingis the test event sent by “Send test event”.

Verifying signatures

Each endpoint has its own signing secret, shown once when you add the endpoint or rotate the secret. Every delivery has X-Xtracker-Signature: t=<Unix seconds>,v1=<signature>, where the signature is the HMAC-SHA256 of <t>.<raw body> with the secret, in hex. Check it against the raw body before parsing, and refuse a tmore than 300 seconds from now so an old delivery can't be replayed. For 24 hours after you rotate the secret, the header has a second v1= signed with the old secret; accept either.

Node.js
import crypto from "node:crypto";

// rawBody: the request body exactly as received, before any JSON parsing.
export function verifyXtrackerSignature(rawBody, header, secret, toleranceSeconds = 300) {
  const parts = String(header || "").split(",").map((p) => p.trim().split("="));
  const t = Number(parts.find(([k]) => k === "t")?.[1]);
  const signatures = parts.filter(([k]) => k === "v1").map(([, v]) => v);
  if (!Number.isInteger(t) || signatures.length === 0) return false;
  if (Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return signatures.some(
    (s) => s.length === expected.length && crypto.timingSafeEqual(Buffer.from(s), Buffer.from(expected)),
  );
}
Python
import hashlib
import hmac
import time


def verify_xtracker_signature(raw_body: bytes, header: str, secret: str, tolerance: int = 300) -> bool:
    """raw_body: the request body exactly as received, before any JSON parsing."""
    items = [part.strip().split("=", 1) for part in (header or "").split(",") if "=" in part]
    t = next((value for key, value in items if key == "t"), None)
    signatures = [value for key, value in items if key == "v1"]
    if t is None or not t.isdigit() or not signatures:
        return False
    if abs(time.time() - int(t)) > tolerance:
        return False
    expected = hmac.new(secret.encode(), t.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(s, expected) for s in signatures)

X-Xtracker-Event names the event and X-Xtracker-Delivery identifies the delivery.

What's never shared

The API and webhooks never return screenshots, app or website details, activity or productivity scores, idle time, pay, bank or any other Finance data. The Owner is never included in people, time, attendance, leave or events. Every answer is checked for these before it's sent.

Questions? See Help or the Security page.