Skip to content

Time off

Holidays, sick days and the rest: who's away when, booking and approving time off, balances, and who's on call on a rota. Every request needs an API key; the examples read it from $MAVATU_API_KEY. How lists, dates, money and errors work is in the API guide.

The rota turn object

A turn on a rota: who's on (or nobody, a gap) from when to when, and the time off that puts it on their calendar. Turns are filled twelve weeks ahead.

objectstring

Always rota_turn.

idstring
rota{id, name}
person{id, name}or null

Who's on; null for a gap, with nobody on.

daydate

The turn's day, in the workspace's calendar.

starts_attime
ends_attime
swappedboolean

Someone other than whose turn it was in order took it.

time_off_idstringor null

The time off that puts it on their calendar.

urlstring
The rota turn object
{
"object": "rota_turn",
"id": "tot_01jd4b7n1q5t9w3y6b0m4r8x2k",
"rota": {
"id": "tor_01jd1a5m9q3t7w1y5b9n3r7x1k",
"name": "Support out of hours"
},
"person": {
"id": "mem_01jcqkfbf5kznwj47tan9zt24m",
"name": "Felix Marsh"
},
"day": "2026-11-23",
"starts_at": "2026-11-23T09:00:00Z",
"ends_at": "2026-11-30T09:00:00Z",
"swapped": false,
"time_off_id": "tof_01jd4b7p2r6v0x4z8c2n6q0t4m",
"url": "https://app.mavatu.com/kettle-kite/people/time-off?pane=tof_01jd4b7p2r6v0x4z8c2n6q0t4m"
}

List rota turns

GET/rota_turns

Turns on the workspace's rotas, soonest first, from today unless you say: who's on (none for a gap) from when to when. Filter by rota, person or the days they cover. Turns are filled twelve weeks ahead.

Filters and paging

rota_idstring
person_idstring

One person's turns: their member ID, me, or none for gaps.

fromdate

Turns ending on or after this day; today unless you say.

todate

Turns starting on or before this day.

limitinteger

How many to return, 1 to 100. Default 25.

cursorstring

next_cursor from the previous page.

Returns

A list of rota turns.

GET /rota_turns
curl "https://app.mavatu.com/api/v1/rota_turns?rota_id=tor_01jd1a5m9q3t7w1y5b9n3r7x1k&person_id=me" \
-H "Authorization: Bearer $MAVATU_API_KEY"

The rota object

A rota: who takes turns on an On duty kind, in order, how often turns come round, when they hand over, and the time in lieu each earns.

objectstring

Always rota.

idstring
namestring
kind{id, name}

The On duty kind its turns are.

owner{id, name}or null

Who runs it, and hears of gaps and swaps.

peoplearray of {id, name}or null

Who takes turns, in order.

repeatsstring

When turns start, in words: Weekly on Monday.

hands_overstring

When a turn hands over, in the workspace's time: 09:00.

length_daysinteger

How many days a turn lasts.

time_in_lieunumber

Days of time in lieu a turn earns once it's over.

archivedboolean
The rota object
{
"object": "rota",
"id": "tor_01jd1a5m9q3t7w1y5b9n3r7x1k",
"name": "Support out of hours",
"kind": {
"id": "tok_01jcz8p4r1t6w9y3b5n7q2x0mk",
"name": "On call"
},
"owner": {
"id": "mem_01jcm9s346q3d25vt4f5v37e3s",
"name": "Imogen Hale"
},
"people": [
{
"id": "mem_01jcqkfbf5kznwj47tan9zt24m",
"name": "Felix Marsh"
},
{
"id": "mem_01jc3e28jt97kb6cq643dzvmxx",
"name": "Wren Abbott"
}
],
"repeats": "Weekly on Monday",
"hands_over": "09:00",
"length_days": 7,
"time_in_lieu": 0.5,
"archived": false
}

List rotas

GET/rotas

The workspace's rotas: who takes turns on which On duty kind, in order, how often turns come round and how long they last.

Filters and paging

include_archivedboolean

Archived rotas too.

Returns

A list of rotas.

GET /rotas
curl https://app.mavatu.com/api/v1/rotas \
-H "Authorization: Bearer $MAVATU_API_KEY"

The time off object

Someone's time off: who, what, which days (or hours), how long it comes to in their working pattern, and where it stands. A private kind says only Away, with no kind or note, to anyone but the person and whoever approves for them.

objectstring

Always time_off.

idstring
person{id, name}
kind{id, name}or null

The kind of time off; null when it's a private kind you can't see.

labelstring

What it shows as to you: the kind's name, what others see of it (On holiday), or Away.

meansstring

One of away, elsewhere, duty.

statusstring

requested (waiting for approval), approved, declined or cancelled.

fromdate

The first day.

todateor null

The last day; null while it has no end yet (sickness).

starts_middayboolean

Only the afternoon of the first day.

ends_middayboolean

Only the morning of the last day.

starts_attimeor null

For kinds booked in hours and rota turns: when it starts. Null otherwise.

ends_attimeor null
amountnumberor null

How long it is, in unit, counted in the person's working pattern (bank holidays and their days off left out); null while it has no end.

unitstring

One of days, hours.

notestring

The person's note, for those who may see it; empty otherwise.

requested_by{id, name}or null

Who booked it, when it was booked for the person by someone else.

decided_by{id, name}or null

Who approved or declined it.

decided_attimeor null
decline_reasonstring

Why it was declined, as the approver put it.

replaces_idstringor null

For a change waiting for approval: the approved time off it changes.

rota{id, name}or null

For a turn on a rota: the rota.

urlstring
created_attime
updated_attime
The time off object
{
"object": "time_off",
"id": "tof_01jd3q8m2v6x0b4n7r1t5w9y3k",
"person": {
"id": "mem_01jc3e28jt97kb6cq643dzvmxx",
"name": "Wren Abbott"
},
"kind": {
"id": "tok_01jcz5t8m3q7x1b4n6r9t2w5yk",
"name": "Holiday"
},
"label": "Holiday",
"means": "away",
"status": "approved",
"from": "2027-03-01",
"to": "2027-03-05",
"starts_midday": false,
"ends_midday": false,
"starts_at": null,
"ends_at": null,
"amount": 5,
"unit": "days",
"note": "Lisbon, at last.",
"requested_by": null,
"decided_by": {
"id": "mem_01jcm9s346q3d25vt4f5v37e3s",
"name": "Imogen Hale"
},
"decided_at": "2026-11-16T10:04:31Z",
"decline_reason": "",
"replaces_id": null,
"rota": null,
"url": "https://app.mavatu.com/kettle-kite/people/time-off?pane=tof_01jd3q8m2v6x0b4n7r1t5w9y3k",
"created_at": "2026-11-16T09:12:40Z",
"updated_at": "2026-11-16T10:04:31Z"
}

List time off

GET/time_off

Time off the key's person can see, newest booking first: their own, the people they approve for or manage, and everyone's approved time off on the team calendar. Filter by person, kind, status, department or the days it covers. A private kind (sickness, a medical appointment) says only "Away" to anyone but the person and whoever approves for them.

Filters and paging

person_idstring

One person's: their member ID, or me.

kind_idstring
statusstring

Only those in this state; every state unless you say.

One of requested, approved, declined, cancelled.

department_idstring

Only people in this department (a team that's a department).

fromdate

Only time off covering this day or later (YYYY-MM-DD).

todate

Only time off covering this day or earlier.

limitinteger

How many to return, 1 to 100. Default 25.

cursorstring

next_cursor from the previous page.

sortstring

created_at (the default: in the order they were made) or updated_at (by when they last changed).

orderstring

desc (the default: newest first) or asc (oldest first). To sync everything that changed, use sort=updated_at&order=asc with updated_since: what changes while you page through comes again at the end.

updated_sincetime

Only what changed at or after this time (RFC 3339, e.g. 2026-11-06T09:00:00Z): for polling.

Returns

A list of time offs.

GET /time_off
curl "https://app.mavatu.com/api/v1/time_off?from=2026-11-16&to=2026-11-20&status=approved" \
-H "Authorization: Bearer $MAVATU_API_KEY"

Get time off

GET/time_off/{id}

One booking of time off: who, what, when, how long it is and where it stands, as the key's person may see it.

Path

idstringrequired

The time off's ID.

Returns

The time off.

GET /time_off/{id}
curl https://app.mavatu.com/api/v1/time_off/tof_01jd3q8m2v6x0b4n7r1t5w9y3k \
-H "Authorization: Bearer $MAVATU_API_KEY"

Book time off

POST/time_off

Books time off, as the app's Book time off does: for the key's person, it goes to whoever approves it (or straight in, when it needs no approval); for someone they approve for, it's approved at once and they're told. It's refused, saying why, when it overlaps other time off, falls on blocked dates, or is more than they have left.

Needs a key that can read and change. Send an Idempotency-Key to try it again safely.

Body

idstring

An ID of your own (tof_…), to retry safely; we make one otherwise.

person_idstring

Who it's for: me (the default), or someone you approve for.

kind_idstringrequired

The kind of time off (GET /time_off_kinds).

fromdaterequired

The first day, YYYY-MM-DD.

todaterequired

The last day; null for a kind that can be open-ended (sickness), with no end yet. For a kind in hours, the first day.

starts_middayboolean

Only the afternoon of the first day.

ends_middayboolean

Only the morning of the last day.

starts_attime

For a kind booked in hours: when it starts (RFC 3339).

ends_attime

For a kind booked in hours: when it ends.

notestring

A note for whoever approves it.

Returns

The time off, with 201 Created.

POST /time_off
curl -X POST https://app.mavatu.com/api/v1/time_off \
-H "Authorization: Bearer $MAVATU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"person_id": "me",
"kind_id": "tok_01jcz5t8m3q7x1b4n6r9t2w5yk",
"from": "2027-03-01",
"to": "2027-03-05",
"note": "Lisbon, at last."
}'

Cancel time off

POST/time_off/{id}/cancel

Cancels time off, or takes back a request. Time off that's begun is cancelled only by whoever approves the person's time off. Turns on a rota change through the rota, not here.

Needs a key that can read and change. Send an Idempotency-Key to try it again safely.

Path

idstringrequired

The time off's ID.

Returns

The time off.

POST /time_off/{id}/cancel
curl -X POST https://app.mavatu.com/api/v1/time_off/tof_01jd3q8m2v6x0b4n7r1t5w9y3k/cancel \
-H "Authorization: Bearer $MAVATU_API_KEY"

Approve or decline time off

POST/time_off/{id}/decide

Approves or declines a request, for someone who approves the person's time off (never their own). Declining needs a reason, which is shown to the person. The first approver to decide decides.

Needs a key that can read and change. Send an Idempotency-Key to try it again safely.

Path

idstringrequired

The time off's ID.

Body

approvebooleanrequired

true approves it; false declines it.

reasonstring

Why it's declined, which the person sees: needed to decline, up to 1,000 characters.

Returns

The time off.

POST /time_off/{id}/decide
curl -X POST https://app.mavatu.com/api/v1/time_off/tof_01jd3q8m2v6x0b4n7r1t5w9y3k/decide \
-H "Authorization: Bearer $MAVATU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"approve": false,
"reason": "We'\''re short that week with the Honeybee launch. Could you take the week after?"
}'

The time off kind object

A kind of time off people book here, Holiday, Sick or Working from home, with what it means underneath (away, working elsewhere, on duty) and what it comes out of. Its name can change; what it means doesn't.

objectstring

Always time_off_kind.

idstring
namestring
shown_asstring

What others see: On holiday, Working from home; Away for a private kind.

meansstring

away (not working), elsewhere (working somewhere else: home, a client's office) or duty (on call, outside normal hours).

countsstring

What it comes out of: holiday (the holiday allowance), limit (its own yearly limit), earned (time in lieu earned) or none.

yearly_limitnumberor null

Its own yearly limit, for counts limit; null otherwise.

unitstring

Booked in days (and half days) or hours.

needs_approvalboolean

Whether it goes to an approver; false goes straight in.

privateboolean

Others see only Away, with no kind or note.

open_endedboolean

It can start without an end (sickness).

booked_bystring

anyone (for themselves) or approvers (and admins) only.

archivedboolean
The time off kind object
{
"object": "time_off_kind",
"id": "tok_01jcz5t8m3q7x1b4n6r9t2w5yk",
"name": "Holiday",
"shown_as": "On holiday",
"means": "away",
"counts": "holiday",
"yearly_limit": null,
"unit": "days",
"needs_approval": true,
"private": false,
"open_ended": false,
"booked_by": "anyone",
"archived": false
}

List kinds of time off

GET/time_off_kinds

The kinds of time off people book here (Holiday, Sick, Working from home, On call…), in the order the booking dialog offers them, with what each means underneath and what it counts against. Archived kinds come last.

GET /time_off_kinds
curl https://app.mavatu.com/api/v1/time_off_kinds \
-H "Authorization: Bearer $MAVATU_API_KEY"

The time off balance object

A person's balances in a holiday year, as people say them: the allowance (pro rata to their working pattern), carried over and adjusted, less what's taken, booked and requested, and what's left. One line for the holiday allowance, and one for each kind with a yearly limit or earned time in lieu.

objectstring

Always time_off_balance.

person{id, name}
yeardate

The holiday year's first day.

year_labelstring

The year as people say it: 2027, or 2027–28.

balancesarray of objector null
kind{id, name}

The kind it's the balance of: Holiday for the holiday allowance, whichever kinds come out of it.

countsstring

One of holiday, limit, earned.

unitstring

One of days, hours.

allowancenumber

The year's allowance, pro rata to their working pattern and the days they're employed, with long service; or the kind's yearly limit; 0 for earned time.

long_servicenumber

What long service adds, within allowance.

carriednumber

Carried over from last year; less than 0 when they went over.

expirednumber

Carried-over days written off when they expired (0 or less).

adjustednumber

Added or taken by hand, imported, or earned (time in lieu).

bank_holidaysnumber

Bank holidays on their working days, when their policy takes them from the allowance.

totalnumber
takennumber

Approved time off that's over.

bookednumber

Approved time off to come.

requestednumber

Waiting for approval.

leftnumber

total less taken, booked and requested.

accruednumberor null

For a policy that builds the allowance up month by month: how much is built up by the end of this month; null otherwise.

The time off balance object
{
"object": "time_off_balance",
"person": {
"id": "mem_01jc3e28jt97kb6cq643dzvmxx",
"name": "Wren Abbott"
},
"year": "2027-01-01",
"year_label": "2027",
"balances": [
{
"kind": {
"id": "tok_01jcz5t8m3q7x1b4n6r9t2w5yk",
"name": "Holiday"
},
"counts": "holiday",
"unit": "days",
"allowance": 26,
"long_service": 1,
"carried": 3,
"expired": 0,
"adjusted": 0,
"bank_holidays": 0,
"total": 29,
"taken": 14,
"booked": 5,
"requested": 2,
"left": 8,
"accrued": null
},
{
"kind": {
"id": "tok_01jcz6v2m9q3x7b1n5r8t4w0yk",
"name": "Time in lieu"
},
"counts": "earned",
"unit": "days",
"allowance": 0,
"long_service": 0,
"carried": 0,
"expired": 0,
"adjusted": 1.5,
"bank_holidays": 0,
"total": 1.5,
"taken": 0,
"booked": 1,
"requested": 0,
"left": 0.5,
"accrued": null
}
]
}

Get a time off balance

GET/members/{id}/time_off_balance

A person's balances in a holiday year (this one unless you say): their holiday allowance, and each kind with a yearly limit or earned time, as people say it: the allowance, carried over, long service and adjustments, less what's taken, booked and requested, and what's left. For the key's person, their people and Manage time off.

Path

idstringrequired

The person's member ID, or me.

Filters and paging

daydate

A day in the holiday year to show (YYYY-MM-DD); today unless you say.

Returns

The time off balance.

GET /members/{id}/time_off_balance
curl "https://app.mavatu.com/api/v1/members/…/time_off_balance?day=2027-03-01" \
-H "Authorization: Bearer $MAVATU_API_KEY"