---
title: "Update a leave type"
method: PUT
path: "/api/leavetypes/{id}"
tags: ["LeaveTypes"]
---

# Update a leave type

`PUT /api/leavetypes/{id}`

## Request

- Base URL: `https://app.timetastic.co.uk` (the document declares no server; this is the origin it was published from)
- URL: `https://app.timetastic.co.uk/api/leavetypes/{id}`
- Auth: none declared

Updates an existing leave type. Only admins can update leave types.

## Path parameters

- `id` integer, required

## Request body

- TimetasticWebApiResourceModelsLeaveTypeRequest
  - `name` string, required
  - `deducted` boolean
  - `requiresApproval` boolean
  - `includeMaxOff` boolean
  - `isPrivate` boolean
  - `color` string, nullable
  - `icon` string, nullable
  - `calendarVisibility` 1 | 2 | 3: - `1` — **Busy** - `2` — **Available** - `3` — **OutOfOffice**
  - `limitHours` number, double, nullable
  - `limitDays` number, double, nullable

## Response `200`

The leave type was successfully updated

## Other responses

- `400`: Invalid input data or validation error
- `403`: You don't have permission to update this leave type
- `404`: The leave type was not found

---

[API](https://skmtc.dev/timetastic/apis/timetastic-api.md) · [All operations](https://skmtc.dev/timetastic/apis/timetastic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/timetastic/apis/timetastic-api/revisions/709ccb0412c3?raw)
