---
title: "Create leave application"
method: POST
path: "/users/leave-applications"
tags: ["Leave Applications"]
---

# Create leave application

`POST /users/leave-applications`

Create leave application

## Request body

- object
  - `from` string, required — Start date time of the leave application in format Y-m-d H:i:s, required
  - `to` string, required — End date time of the leave application in format Y-m-d H:i:s, required, if leave is allDay and for example employee selected 27.06.2020 then we should send value like 2020-06-27 00:00:00, can be in some cases same value as 'from' if leave is exactly one date long
  - `leaveReasonId` string, required — Leave reason id, required
  - `managerId` string — Manager id which will receive leave application, can be omitted
  - `leaveMessage` string — Leave message, can be omitted
  - `allDay` boolean — Not really needed and its not used by the backend logic, should be used by frontend only, if time in 'from' and 'to' parameters is 00:00:00 or leave lasts longer than 24h then its automatically allDay true by default, otherwise its false

## Response `201`

Created leave application

- object
  - `leaveApp` LeaveApplication — Leave Application Model
    - `id` string
    - `employeeName` string
    - `leaveReason` string
    - `from` string
    - `to` string
    - `sendDate` string
    - `status` 'PENDING' | 'APPROVED' | 'DENIED'
    - `comment` string
    - `allDay` boolean

## Other responses

- `400` — When some validation is failing, msg property closely describes what was the problem
- `403` — When salary period is locked

---

[API](https://skmtc.net/quinyx/apis/quinyx-user-api.md) · [All operations](https://skmtc.net/quinyx/apis/quinyx-user-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quinyx/quinyx-user-api/revisions/24b687a6e18c/schema)
