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.
objectstringAlways rota_turn.
idstringrota{id, name}person{id, name}or nullWho's on; null for a gap, with nobody on.
daydateThe turn's day, in the workspace's calendar.
starts_attimeends_attimeswappedbooleanSomeone other than whose turn it was in order took it.
time_off_idstringor nullThe time off that puts it on their calendar.
urlstring
{ "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_idstringperson_idstringOne person's turns: their member ID, me, or none for gaps.
fromdateTurns ending on or after this day; today unless you say.
todateTurns starting on or before this day.
limitintegerHow many to return, 1 to 100. Default 25.
cursorstringnext_cursor from the previous page.
Returns
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.
objectstringAlways rota.
idstringnamestringkind{id, name}The On duty kind its turns are.
owner{id, name}or nullWho runs it, and hears of gaps and swaps.
peoplearray of {id, name}or nullWho takes turns, in order.
repeatsstringWhen turns start, in words: Weekly on Monday.
hands_overstringWhen a turn hands over, in the workspace's time: 09:00.
length_daysintegerHow many days a turn lasts.
time_in_lieunumberDays of time in lieu a turn earns once it's over.
archivedboolean
{ "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.
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.
objectstringAlways time_off.
idstringperson{id, name}kind{id, name}or nullThe kind of time off; null when it's a private kind you can't see.
labelstringWhat it shows as to you: the kind's name, what others see of it (On holiday), or Away.
meansstringOne of
away,elsewhere,duty.statusstringrequested (waiting for approval), approved, declined or cancelled.
fromdateThe first day.
todateor nullThe last day; null while it has no end yet (sickness).
starts_middaybooleanOnly the afternoon of the first day.
ends_middaybooleanOnly the morning of the last day.
starts_attimeor nullFor kinds booked in hours and rota turns: when it starts. Null otherwise.
ends_attimeor nullamountnumberor nullHow 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.
unitstringOne of
days,hours.notestringThe person's note, for those who may see it; empty otherwise.
requested_by{id, name}or nullWho booked it, when it was booked for the person by someone else.
decided_by{id, name}or nullWho approved or declined it.
decided_attimeor nulldecline_reasonstringWhy it was declined, as the approver put it.
replaces_idstringor nullFor a change waiting for approval: the approved time off it changes.
rota{id, name}or nullFor a turn on a rota: the rota.
urlstringcreated_attimeupdated_attime
{ "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_idstringOne person's: their member ID, or me.
kind_idstringstatusstringOnly those in this state; every state unless you say.
One of
requested,approved,declined,cancelled.department_idstringOnly people in this department (a team that's a department).
fromdateOnly time off covering this day or later (YYYY-MM-DD).
todateOnly time off covering this day or earlier.
limitintegerHow many to return, 1 to 100. Default 25.
cursorstringnext_cursor from the previous page.
sortstringcreated_at (the default: in the order they were made) or updated_at (by when they last changed).
orderstringdesc (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_sincetimeOnly what changed at or after this time (RFC 3339, e.g. 2026-11-06T09:00:00Z): for polling.
Returns
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.
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
idstringAn ID of your own (tof_…), to retry safely; we make one otherwise.
person_idstringWho it's for: me (the default), or someone you approve for.
kind_idstringrequiredThe kind of time off (
GET /time_off_kinds).fromdaterequiredThe first day, YYYY-MM-DD.
todaterequiredThe 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_middaybooleanOnly the afternoon of the first day.
ends_middaybooleanOnly the morning of the last day.
starts_attimeFor a kind booked in hours: when it starts (RFC 3339).
ends_attimeFor a kind booked in hours: when it ends.
notestringA note for whoever approves it.
Returns
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.
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
idstringrequiredThe time off's ID.
Body
approvebooleanrequiredtrue approves it; false declines it.
reasonstringWhy it's declined, which the person sees: needed to decline, up to 1,000 characters.
Returns
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.
objectstringAlways time_off_kind.
idstringnamestringshown_asstringWhat others see: On holiday, Working from home; Away for a private kind.
meansstringaway (not working), elsewhere (working somewhere else: home, a client's office) or duty (on call, outside normal hours).
countsstringWhat it comes out of: holiday (the holiday allowance), limit (its own yearly limit), earned (time in lieu earned) or none.
yearly_limitnumberor nullIts own yearly limit, for counts limit; null otherwise.
unitstringBooked in days (and half days) or hours.
needs_approvalbooleanWhether it goes to an approver; false goes straight in.
privatebooleanOthers see only Away, with no kind or note.
open_endedbooleanIt can start without an end (sickness).
booked_bystringanyone (for themselves) or approvers (and admins) only.
archivedboolean
{ "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.
Returns
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.
objectstringAlways time_off_balance.
person{id, name}yeardateThe holiday year's first day.
year_labelstringThe year as people say it: 2027, or 2027–28.
balancesarray of objector nullkind{id, name}The kind it's the balance of: Holiday for the holiday allowance, whichever kinds come out of it.
countsstringOne of
holiday,limit,earned.unitstringOne of
days,hours.allowancenumberThe 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_servicenumberWhat long service adds, within allowance.
carriednumberCarried over from last year; less than 0 when they went over.
expirednumberCarried-over days written off when they expired (0 or less).
adjustednumberAdded or taken by hand, imported, or earned (time in lieu).
bank_holidaysnumberBank holidays on their working days, when their policy takes them from the allowance.
totalnumbertakennumberApproved time off that's over.
bookednumberApproved time off to come.
requestednumberWaiting for approval.
leftnumbertotal less taken, booked and requested.
accruednumberor nullFor a policy that builds the allowance up month by month: how much is built up by the end of this month; null otherwise.
{ "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
idstringrequiredThe person's member ID, or me.
Filters and paging
daydateA day in the holiday year to show (YYYY-MM-DD); today unless you say.
Returns
curl "https://app.mavatu.com/api/v1/members/…/time_off_balance?day=2027-03-01" \ -H "Authorization: Bearer $MAVATU_API_KEY"