---
title: "Add a Locked Date"
method: POST
path: "/api/lockeddates"
tags: ["LockedDates"]
---

# Add a Locked Date

`POST /api/lockeddates`

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

Creates a new locked date period. Locked dates prevent employees from booking time off during the specified period.
You can lock dates at organisation level (all employees), department level, or individual user level.
Higher-level locks supersede lower-level locks (e.g., an organisation lock will supersede existing department or user locks).

## Request body

- TimetasticCoreModelsApiModelsAddLockedDateRequest
  - `from` string, date-time, required
  - `to` string, date-time, required
  - `reason` string, required
  - `recordId` integer, required
  - `recordType` 1 | 2 | 3, required: - `1` — **Organisation** - `2` — **Department** - `3` — **User**

## Response `200`

The locked date was successfully created

- TimetasticWebApiResourceModelsAddLockedDateResponse
  - `id` integer
  - `createdOverExistingBookings` boolean

## Other responses

- `400`: Invalid input data or validation error

---

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