---
title: "POST Leave Request (hourly)"
method: POST
path: "/leaves?access_token=xxxxxxx"
---

# POST Leave Request (hourly)

`POST /leaves?access_token=xxxxxxx`

## Request

- Base URL: `https://www.humanity.com/api/v2`
- URL: `https://www.humanity.com/api/v2/leaves?access_token=xxxxxxx`
- Auth: API key in query parameter `access_token`

Permission Level: 5

## Request body `application/x-www-form-urlencoded`

- object
  - `employee` integer: Employee ID
  - `leavetype` integer: Leave type ID
  - `start_date` string, date: Start date of the leave request
  - `end_date` string, date: End date of the leave request
  - `is_hourly` boolean: Can be True or False (True - Hourly leave) (False - Full day request) in this case True since it we are requesting a hourly leave
  - `start_time` string, date-time: Start time of the leave request (HH:MM:SS)
  - `end_time` string, date-time: End time of the leave request (HH:MM:SS)

## Response `200`

200

- object
  - `status` integer
  - `data` object
    - `id` string
    - `user` string
    - `store` string
    - `date` string
    - `requested_on` object
      - `id` integer
      - `month` integer
      - `day` integer
      - `wday` integer
      - `year` integer
      - `weekday` string
      - `mname` string
      - `week` integer
      - `dayid` integer
      - `timeid` integer
      - `timeid_exact` integer
      - `formatted` string
      - `iso8601` string
      - `time` string
      - `timestamp` integer
      - `hours` integer
      - `minutes` integer
      - `seconds` integer
      - `date` string
      - `day_of_year` string
      - `week_adjusted` integer
      - `sp_wday` integer
    - `approved_on` string
    - `status` string
    - `admin` string
    - `comments` string
    - `notes` string
    - `start_day` object
      - `id` integer
      - `month` integer
      - `day` integer
      - `wday` integer
      - `year` integer
      - `weekday` string
      - `mname` string
      - `week` integer
      - `dayid` integer
      - `timeid` integer
      - `timeid_exact` integer
      - `formatted` string
      - `iso8601` string
      - `time` string
      - `timestamp` integer
      - `hours` integer
      - `minutes` integer
      - `seconds` integer
      - `date` string
      - `day_of_year` string
      - `week_adjusted` integer
      - `sp_wday` integer
    - `end_day` object
      - `id` integer
      - `month` integer
      - `day` integer
      - `wday` integer
      - `year` integer
      - `weekday` string
      - `mname` string
      - `week` integer
      - `dayid` integer
      - `timeid` integer
      - `timeid_exact` integer
      - `formatted` string
      - `iso8601` string
      - `time` string
      - `timestamp` integer
      - `hours` integer
      - `minutes` integer
      - `seconds` integer
      - `date` string
      - `day_of_year` string
      - `week_adjusted` integer
      - `sp_wday` integer
    - `requested_on_timestamp` string
    - `start_timestamp` string
    - `end_timestamp` string
    - `leave_type` string
    - `approved_by` string
    - `rejected_by` string
    - `rejected_on` string
    - `reason` unknown
    - `is_hourly` string
    - `unique_id` unknown
    - `deduct_days` string
    - `leave_type_name` string
    - `dont_deduct_from_vac` string
    - `max_num_of_staff_at_once` string
    - `employee` string
    - `employee_name` string
    - `until` object
      - `id` integer
      - `month` integer
      - `day` integer
      - `wday` integer
      - `year` integer
      - `weekday` string
      - `mname` string
      - `week` integer
      - `dayid` integer
      - `timeid` integer
      - `timeid_exact` integer
      - `formatted` string
      - `iso8601` string
      - `time` string
      - `timestamp` integer
      - `hours` integer
      - `minutes` integer
      - `seconds` integer
      - `date` string
      - `day_of_year` string
      - `week_adjusted` integer
      - `sp_wday` integer
    - `length` integer
    - `total_days` integer
    - `total_quarters_used` integer
    - `total_human_friendly` string
    - `total_time_alotted` object
      - `y` integer
      - `m` integer
      - `d` integer
      - `h` integer
      - `i` integer
      - `s` integer
      - `f` integer
      - `weekday` integer
      - `weekday_behavior` integer
      - `first_last_day_of` integer
      - `invert` integer
      - `days` integer
      - `special_type` integer
      - `special_amount` integer
      - `have_weekday_relative` integer
      - `have_special_relative` integer
  - `token` string
  - `error` unknown

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `ffb87b44c733`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/humanity-com/apis/humanity/changes/leaves%3Faccess_token=xxxxxxx/post.md)

---

[API](https://skmtc.dev/humanity-com/apis/humanity.md) - [All operations](https://skmtc.dev/humanity-com/apis/humanity/llms.txt) - [OpenAPI document](https://skmtc.dev/humanity-com/apis/humanity/revisions/ffb87b44c733?raw)
