We use necessary cookies to make this site work. With your permission, we'd also like to set analytics cookies to understand how the site is used, and marketing cookies to measure our adverts. We won't set these unless you agree.
You can change your choice at any time from “Cookie Settings” at the bottom of the page. Read our Privacy Policy and how we use cookies.
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.
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
Scope
What it reads
read:people
Read people
read:teams
Read teams
read:projects
Read projects
read:time
Read approved time
read:timesheets
Read timesheets
read:attendance
Read attendance
read:leave
Read 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.
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
Plan
Requests an hour
Webhook endpoints
Standard
Not included
Not included
Business
1,000
3
Enterprise
10,000
No 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
Status
Code
Meaning
400
invalid_date_range
start_date or end_date is missing, not YYYY-MM-DD, in the wrong order or more than 93 days apart.
400
invalid_cursor
The cursor wasn't one this API returned.
400
invalid_limit
limit isn't a whole number from 1 to 100.
400
invalid_parameter
Another query parameter has a value the endpoint doesn't accept.
401
missing_api_key
No Authorization: Bearer header.
401
invalid_api_key
The key isn't one of your organisation's keys.
401
api_key_revoked
The Owner revoked the key.
401
api_key_expired
The key passed its expiry date.
403
insufficient_scope
The key doesn't have the scope the endpoint needs.
403
plan_not_included
Your organisation's plan doesn't include the API.
403
api_paused
Your organisation's subscription isn't active or the account is suspended.
404
not_found
No such record in your organisation.
429
rate_limited
This 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
Field
Type
Description
id
uuid
name
string
time_zone
string
The 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
Parameter
Type
Description
team_id
string
status
active | invited | suspended | deactivated
limit
number
Rows per page, 1–100 (default 50).
cursor
string
The `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /people
Field
Type
Description
email
string
first_name
string
id
uuid
job_title
string or null
joined_at
date-time or null
last_name
string
role
manager | member
status
active | invited | suspended | deactivated
team_id
uuid or null
GET/people/{id}
One person. Scope: read:people.
Parameters of /people/{id}
Parameter
Type
Description
id required
string
Fields of data
Fields returned by /people/{id}
Field
Type
Description
email
string
first_name
string
id
uuid
job_title
string or null
joined_at
date-time or null
last_name
string
role
manager | member
status
active | invited | suspended | deactivated
team_id
uuid or null
GET/teams
Teams, by name. Scope: read:teams.
Parameters of /teams
Parameter
Type
Description
limit
number
Rows per page, 1–100 (default 50).
cursor
string
The `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /teams
Field
Type
Description
created_at
date-time
id
uuid
manager_id
uuid or null
The team's manager. Null when it has none, or when the Owner manages it (the Owner isn't in the API).
member_count
number
name
string
GET/projects
Projects, by name. Archived projects only with include_archived=true. Scope: read:projects.
Parameters of /projects
Parameter
Type
Description
include_archived
true | false
limit
number
Rows per page, 1–100 (default 50).
cursor
string
The `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /projects
Field
Type
Description
active
boolean
False for archived projects.
created_at
date-time
id
uuid
name
string
GET/time-entries
Approved time entries that started in the date range, oldest first, with approved minutes. Scope: read:time.
Parameters of /time-entries
Parameter
Type
Description
start_date required
string
First day, YYYY-MM-DD (organisation time zone).
end_date required
string
Last day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
person_id
string
Only this person.
limit
number
Rows per page, 1–100 (default 50).
cursor
string
The `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /time-entries
Field
Type
Description
date
date
entry_type
timer | focus_block
id
uuid
minutes
number
Approved time, in whole minutes.
person_id
uuid
project_id
uuid or null
started_at
date-time
stopped_at
date-time or null
GET/approved-hours
Approved minutes per person for the date range. Scope: read:time.
Parameters of /approved-hours
Parameter
Type
Description
start_date required
string
First day, YYYY-MM-DD (organisation time zone).
end_date required
string
Last day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
limit
number
Rows per page, 1–100 (default 50).
cursor
string
The `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /approved-hours
Field
Type
Description
approved_minutes
number
Approved time in the range, in whole minutes (1770 = 29h 30m).
end_date
date
entries
number
person_id
uuid
start_date
date
GET/timesheets
Submitted time entries in the date range and where each is in review. Scope: read:timesheets.
Parameters of /timesheets
Parameter
Type
Description
start_date required
string
First day, YYYY-MM-DD (organisation time zone).
end_date required
string
Last day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
person_id
string
Only this person.
status
submitted | approved | rejected
limit
number
Rows per page, 1–100 (default 50).
cursor
string
The `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /timesheets
Field
Type
Description
approved_minutes
number or null
Approved minutes; null until approved.
auto_approved
boolean
date
date
id
uuid
minutes
number
Time recorded, in whole minutes.
person_id
uuid
project_id
uuid or null
reviewed_at
date-time or null
started_at
date-time
status
submitted | approved | rejected
stopped_at
date-time or null
submitted_at
date-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
Parameter
Type
Description
start_date required
string
First day, YYYY-MM-DD (organisation time zone).
end_date required
string
Last day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
person_id
string
Only this person.
limit
number
Rows per page, 1–100 (default 50).
cursor
string
The `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /attendance
Field
Type
Description
clock_in_at
date-time
clock_out_at
date-time or null
Null while the timer is still running.
date
date
late
boolean
After the person's start time plus the organisation's grace period.
late_minutes
number
Minutes after the start time; 0 when on time.
person_id
uuid
worked_minutes
number
Whole minutes.
GET/leave-requests
Leave requests (pending, approved, rejected) that overlap the date range. Scope: read:leave.
Parameters of /leave-requests
Parameter
Type
Description
start_date required
string
First day, YYYY-MM-DD (organisation time zone).
end_date required
string
Last day, YYYY-MM-DD, inclusive. At most 93 days after start_date.
person_id
string
Only this person.
status
pending | approved | rejected
limit
number
Rows per page, 1–100 (default 50).
cursor
string
The `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /leave-requests
Field
Type
Description
days
number
end_date
date
half_day
boolean
half_day_part
morning | afternoon
id
uuid
leave_type
string
leave_type_name
string
person_id
uuid
requested_at
date-time
reviewed_at
date-time or null
start_date
date
status
pending | 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
Parameter
Type
Description
person_id
string
Only this person.
limit
number
People per page, 1–25 (default 25).
cursor
string
The `next_cursor` of the previous page.
Fields of each row in data
Fields returned by /leave-balances
Field
Type
Description
balances
object[]
balances[].allowance_days
number or null
balances[].available_days
number or null
balances[].leave_type
string
balances[].leave_type_name
string
balances[].pending_days
number
balances[].unlimited
boolean
balances[].used_days
number
leave_year
object
leave_year.end_date
date
leave_year.start_date
date
person_id
uuid
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.
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.