---
title: "Create a new leave type"
method: POST
path: "/api/leavetypes"
tags: ["LeaveTypes"]
---

# Create a new leave type

`POST /api/leavetypes`

## 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`
- Auth: none declared

Creates a new leave type for your organisation. Only admins can create leave types.

## 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 created. Returns the ID of the new leave type.

- integer

## Other responses

- `400`: Invalid input data or validation error
- `403`: You don't have permission to create leave types

---

[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)
