---
updatedAt: 2025-12-16T17:43:06.000Z
---

Fetch the complete documentation index at: https://apidocs.hibob.com/llms.txt. Use this file to discover all available pages before exploring further.

# Submit a new time off request.

Submits a new time off request.<br /> <br />Time off requests can be of the listed types in the body params section below.<br /> <br />Each request type requires different parameters in the body params. Select the type in the body params section to view the expected fields. <br /><br>**Testing Note:**<br/> To test each type of request:<br /> 1. Open the relevant request type in the body params section.<br /> 2. In the test widget on the right, click "Request Example" to open the menu, and select the request type you want to send. <br /> 3. Update values and send.<br /> <br>**Important testing disclaimer:** Changing the request type example does not automatically switch the parameters. First, select the request schema, and then select the equivalent request in the "Request Example" to avoid inconsistencies in the example fields.

# OpenAPI definition

```json
{
  "openapi": "3.1.1",
  "info": {
    "title": "Time Off API",
    "description": "Use Public API to access Time off requests, policies, and balances in Bob",
    "license": {
      "name": "Proprietary",
      "url": "https://apidocs.hibob.com/docs/api-terms-of-use"
    },
    "contact": {
      "name": "Hi Bob, Inc."
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.hibob.com/v1",
      "description": "Production"
    },
    {
      "url": "https://api.sandbox.hibob.com/v1",
      "description": "Sandbox"
    }
  ],
  "x-readme": {
    "metrics-enabled": false
  },
  "tags": [
    {
      "name": "Time off requests",
      "description": "Operations for managing time off requests"
    },
    {
      "name": "Time off Webhooks",
      "description": "Webhook events for time off request-related operations"
    }
  ],
  "webhooks": {
    "timeoffRequestRequested": {
      "post": {
        "operationId": "post_webhook_timeoff-request-requested",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request requested",
        "description": "Triggered when submitting a time off request.\n\nUse the **getApi** URL in the payload to retrieve the full request details.\nWhen using the getApi URL immediately after this event, the status in the response will be **approved** if the request was auto-approved, or **pending** if it is awaiting approval.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestRequestedEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.requested",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32832853,
                  "employeeId": "3373576791477190995",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3373576791477190995/requests/32832853"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestApproved": {
      "post": {
        "operationId": "post_webhook_timeoff-request-approved",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request approved",
        "description": "Triggered when approving a time off request.\n\nFor auto-approved requests, two events are sent in sequence: **requested** then **approved**.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestApprovedEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.approved",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32832853,
                  "employeeId": "3373576791477190995",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3373576791477190995/requests/32832853"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestDeclined": {
      "post": {
        "operationId": "post_webhook_timeoff-request-declined",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request declined",
        "description": "Triggered when declining a time off request.\n\nWhen using the **getApi** URL to retrieve details of a declined request, the status in the response will be **disapproved** (not \"declined\").\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestDeclinedEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.declined",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32832969,
                  "employeeId": "3332883884017713938",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3332883884017713938/requests/32832969"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestCancelled": {
      "post": {
        "operationId": "post_webhook_timeoff-request-cancelled",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request cancelled",
        "description": "Triggered when cancelling a time off request.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestCancelledEvent"
              },
              "example": {
                "companyId": 636192,
                "type": "timeoff.request.cancelled",
                "triggeredBy": "3332883804594373380",
                "triggeredAt": "2025-01-02T11:08:26.022782",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32809865,
                  "employeeId": "3332883804594373380",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3332883804594373380/requests/32809865",
                  "originalRequestId": null
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestDeleted": {
      "post": {
        "operationId": "post_webhook_timeoff-request-deleted",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request deleted",
        "description": "Triggered when deleting a time off request.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestDeletedEvent"
              },
              "example": {
                "companyId": 636192,
                "type": "timeoff.request.deleted",
                "triggeredBy": "3332883804594373380",
                "triggeredAt": "2025-01-02T11:08:26.022782",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32809865,
                  "employeeId": "3332883804594373380",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3332883804594373380/requests/32809865",
                  "originalRequestId": null
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestUpdated": {
      "post": {
        "operationId": "post_webhook_timeoff-request-updated",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request updated",
        "description": "Triggered when updating a time off request.\n\nFor date or time changes (hard-update), a new request replaces the existing one. The payload then includes **originalRequestId** (the very first request before any modifications) and **previousRequestId** (the most recently replaced request).\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestUpdatedEvent"
              },
              "example": {
                "companyId": 636192,
                "type": "timeoff.request.updated",
                "triggeredBy": "3332883804594373380",
                "triggeredAt": "2025-02-18T16:15:00.218602",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 34902625,
                  "employeeId": "3332883884017713938",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3332883884017713938/requests/34900183",
                  "originalRequestId": 34615592,
                  "previousRequestId": 34900183
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestImported": {
      "post": {
        "operationId": "post_webhook_timeoff-request-imported",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request created from import",
        "description": "Triggered when importing a time off request.\n\nImported requests are always approved by default. When using the **getApi** URL immediately after this event, the status in the response will be **approved**.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestImportedEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.imported",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 24640322,
                  "employeeId": "3052501936990322832",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3052501936990322832/requests/24640322"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestSetEndDate": {
      "post": {
        "operationId": "post_webhook_timeoff-request-set-end-date",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Set end date to a time off request",
        "description": "Triggered when setting the end date of an open-ended time off request.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestSetEndDateEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.setEndDate",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32832853,
                  "employeeId": "3373576791477190995",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3373576791477190995/requests/32832853"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "paths": {
    "/timeoff/employees/{id}/requests": {
      "post": {
        "operationId": "post_timeoff-employees-id-requests",
        "tags": [
          "Time off requests"
        ],
        "summary": "Submit a new time off request.",
        "description": "Submits a new time off request.<br /> <br />Time off requests can be of the listed types in the body params section below.<br /> <br />Each request type requires different parameters in the body params. Select the type in the body params section to view the expected fields. <br /><br>**Testing Note:**<br/> To test each type of request:<br /> 1. Open the relevant request type in the body params section.<br /> 2. In the test widget on the right, click \"Request Example\" to open the menu, and select the request type you want to send. <br /> 3. Update values and send.<br /> <br>**Important testing disclaimer:** Changing the request type example does not automatically switch the parameters. First, select the request schema, and then select the equivalent request in the \"Request Example\" to avoid inconsistencies in the example fields.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Employee ID as pulled from the database, or from the URL In Bob when viewing the employee. For example, if the URL in Bob is \"https://app.hibob.com/employee-profile/3332883884017713238\" you should copy the \"3332883884017713238\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestDays"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestHours"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestDiffHoursPerDay"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestPortionOnRange"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestHoursOnRange"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestSpecificHoursOnRange"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestDifferentSpecificHoursOnRange"
                  }
                ]
              },
              "examples": {
                "SubmitTimeoffRequestDays": {
                  "summary": "Time off request in days",
                  "value": {
                    "requestRangeType": "days",
                    "policyType": "Holiday",
                    "startDate": "2024-05-29",
                    "startDatePortion": "all_day",
                    "endDate": "2024-06-03",
                    "endDatePortion": "morning",
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestHours": {
                  "summary": "Time off request in hours",
                  "value": {
                    "requestRangeType": "hours",
                    "policyType": "Holiday",
                    "startDate": "2024-05-29",
                    "endDate": "2024-05-29",
                    "hours": 4,
                    "minutes": 30,
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestDiffHoursPerDay": {
                  "summary": "Time off request of different hours per day",
                  "value": {
                    "requestRangeType": "differentDayDurations",
                    "policyType": "Holiday",
                    "startDate": "2024-01-03",
                    "endDate": "2024-01-05",
                    "durations": [
                      {
                        "date": "2024-01-03",
                        "hours": 0,
                        "minutes": 15
                      },
                      {
                        "date": "2024-01-04",
                        "hours": 0,
                        "minutes": 0
                      },
                      {
                        "date": "2024-01-05",
                        "hours": 2,
                        "minutes": 45
                      }
                    ],
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestPortionOnRange": {
                  "summary": "Time off request of same portion per day",
                  "value": {
                    "requestRangeType": "portionOnRange",
                    "policyType": "Holiday",
                    "startDate": "2024-05-29",
                    "endDate": "2024-06-03",
                    "dayPortion": "morning",
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestHoursOnRange": {
                  "summary": "Time off request of same hours per day",
                  "value": {
                    "requestRangeType": "hoursOnRange",
                    "policyType": "Holiday",
                    "startDate": "2024-05-29",
                    "endDate": "2024-06-03",
                    "dailyHours": 7,
                    "dailyMinutes": 30,
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestSpecificHoursOnRange": {
                  "summary": "Time off request of specific hours per day",
                  "value": {
                    "requestRangeType": "specificHoursDayDurations",
                    "policyType": "Holiday",
                    "startDate": "2024-01-03",
                    "endDate": "2024-01-05",
                    "localStartTime": "09:30:00",
                    "localEndTime": "13:00:00",
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestDifferentSpecificHoursOnRange": {
                  "summary": "Time off request of different specific hours per day",
                  "value": {
                    "requestRangeType": "differentSpecificHoursDayDurations",
                    "policyType": "Holiday",
                    "startDate": "2024-01-03",
                    "endDate": "2024-01-06",
                    "durations": [
                      {
                        "date": "2024-01-03",
                        "dayDuration": {
                          "dayDurationType": "specificHoursDayDuration",
                          "localStartTime": "09:00:00",
                          "localEndTime": "11:00:00"
                        }
                      },
                      {
                        "date": "2024-01-04",
                        "dayDuration": {
                          "dayDurationType": "portionDayDuration",
                          "portion": "vacant"
                        }
                      },
                      {
                        "date": "2024-01-05",
                        "dayDuration": {
                          "dayDurationType": "specificHoursDayDuration",
                          "localStartTime": "14:00:00",
                          "localEndTime": "16:30:00"
                        }
                      },
                      {
                        "date": "2024-01-06",
                        "dayDuration": {
                          "dayDurationType": "portionDayDuration",
                          "portion": "all_day"
                        }
                      }
                    ],
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "flexible schedule vacation",
                    "reasonCode": 3000
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully submitted",
            "content": {}
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "components": {
    "schemas": {
      "WebhookEvent": {
        "type": "object",
        "description": "Base webhook event structure containing common webhook properties",
        "properties": {
          "companyId": {
            "type": "number",
            "description": "The company ID"
          },
          "type": {
            "type": "string",
            "description": "The event type (e.g., timeoff.request.requested)"
          },
          "triggeredBy": {
            "type": "string",
            "description": "The backend-id of the employee that triggered the event, or 'system' for system-triggered events"
          },
          "triggeredAt": {
            "type": "string",
            "description": "The timestamp when the event occurred (ISO 8601-style string)"
          },
          "version": {
            "type": "string",
            "description": "The webhook version (e.g., v2)"
          },
          "data": {
            "type": "object",
            "description": "Event-specific payload; structure varies by event type"
          }
        },
        "required": [
          "companyId",
          "type",
          "triggeredBy",
          "triggeredAt",
          "version",
          "data"
        ]
      },
      "TimeoffRequestRequestedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.requested event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestApprovedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.approved event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestDeclinedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.declined event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestCancelledEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.cancelled event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          },
          "originalRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The ID of the very first request before any modifications"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestDeletedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.deleted event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          },
          "originalRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The ID of the very first request before any modifications"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestUpdatedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.updated event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          },
          "originalRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The ID of the very first request before any modifications"
          },
          "previousRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The ID of the most recently replaced request (for date/time changes)"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestImportedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.imported event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestSetEndDateEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.setEndDate event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestRequestedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.requested"
                ],
                "description": "Event type for time off request submitted"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestRequestedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestApprovedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.approved"
                ],
                "description": "Event type for time off request approved"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestApprovedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestDeclinedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.declined"
                ],
                "description": "Event type for time off request declined"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestDeclinedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestCancelledEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.cancelled"
                ],
                "description": "Event type for time off request cancelled"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestCancelledEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestDeletedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.deleted"
                ],
                "description": "Event type for time off request deleted"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestDeletedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.updated"
                ],
                "description": "Event type for time off request updated"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestUpdatedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestImportedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.imported"
                ],
                "description": "Event type for time off request created from import"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestImportedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestSetEndDateEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.setEndDate"
                ],
                "description": "Event type for setting the end date of an open-ended time off request"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestSetEndDateEventData"
              }
            }
          }
        ]
      },
      "SubmitTimeoffRequestDays": {
        "title": "Time off request in days",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "startDatePortion",
          "endDate",
          "endDatePortion"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for X days. Value must be 'days'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off.",
            "format": "date"
          },
          "startDatePortion": {
            "type": "string",
            "description": "What portion of the first day is included - <b>'all_day'</b> or <b>'afternoon'</b> (relevant for requests using the Days type)."
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off .",
            "format": "date"
          },
          "endDatePortion": {
            "type": "string",
            "description": "What portion of the last day is included - <b>'all_day'</b> or <b>'morning'</b> (relevant for requests using the Days type)."
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestHours": {
        "title": "Time off request in hours",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "hours",
          "minutes"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for X hours during the day requested (This is supported only for policy types measured in hours). Value must be 'hours'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off (must be the same as startDate).",
            "format": "date"
          },
          "hours": {
            "type": "integer",
            "description": "This field is mandatory if the requestRangeType is set to 'hours'."
          },
          "minutes": {
            "type": "integer",
            "description": "Relevant if requestRangeType is set to 'hours'."
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestDiffHoursPerDay": {
        "title": "Time off request of different hours per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "durations"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for different hours per day. Value must be 'differentDayDurations'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "durations": {
            "type": "array",
            "description": "Array of durations for each day in the request.",
            "items": {
              "required": [
                "date",
                "hours",
                "minutes"
              ],
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "description": "Date of the duration.",
                  "format": "date"
                },
                "hours": {
                  "type": "integer",
                  "description": "The number of hours in the duration."
                },
                "minutes": {
                  "type": "integer",
                  "description": "The number of minutes in the duration."
                }
              }
            }
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestPortionOnRange": {
        "title": "Time off request of same portion per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "dayPortion"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for every morning or every afternoon during the days requested. Value must be 'portionOnRange'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "dayPortion": {
            "type": "string",
            "description": "Select <b>morning</b> when the request is for mornings on the days requested. Select <b>afternoon</b> when the request is for afternoons on the days requested."
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestHoursOnRange": {
        "title": "Time off request of same hours per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "dailyHours",
          "dailyMinutes"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for X hours every day during the days requested (This is supported only for policy types measured in hours). Value must be 'hoursOnRange'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "dailyHours": {
            "type": "integer",
            "description": "Enter the number of hours when the request is for X hours on the days requested.<br> This is mandatory when the <b>requestRangeType</b> is <b>hoursOnRange</b>."
          },
          "dailyMinutes": {
            "type": "integer",
            "description": "Enter the number of minutes when the request is for X hours and X minutes on the days requested.<br> This is relevant when the <b>requestRangeType</b> is <b>hoursOnRange</b> and the amount requested is not a full hour or hours."
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestSpecificHoursOnRange": {
        "title": "Time off request of specific hours per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "localStartTime",
          "localEndTime"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for specific hours per day. Value must be 'specificHoursDayDurations'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "localStartTime": {
            "type": "string",
            "description": "Start time of the duration",
            "format": "time"
          },
          "localEndTime": {
            "type": "string",
            "description": "End time of the duration",
            "format": "time"
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestDifferentSpecificHoursOnRange": {
        "title": "Time off request of different specific hours per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "durations"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for different specific hours per day. Value must be 'differentSpecificHoursDayDurations'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "durations": {
            "type": "array",
            "description": "Array of day durations for each date in the range",
            "items": {
              "type": "object",
              "required": [
                "date",
                "dayDuration"
              ],
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date",
                  "description": "The date for this duration entry"
                },
                "dayDuration": {
                  "description": "The duration for this specific date. Each date must include exactly one of the following types: <ul> <li>SpecificHoursDayDuration</li> <li>PortionDayDuration</li> </ul>\n",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SpecificHoursDayDuration"
                    },
                    {
                      "$ref": "#/components/schemas/DiffSpecHoursPortionDayDuration"
                    }
                  ]
                }
              }
            }
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SpecificHoursDayDuration": {
        "title": "Specific hours day duration",
        "description": "Defines the request by exact working hours (for example, 10:00-12:00).\n",
        "required": [
          "dayDurationType",
          "localStartTime",
          "localEndTime"
        ],
        "type": "object",
        "properties": {
          "dayDurationType": {
            "type": "string",
            "enum": [
              "specificHoursDayDuration"
            ],
            "description": "The type of day duration"
          },
          "localStartTime": {
            "type": "string",
            "format": "time",
            "description": "Start time of the duration"
          },
          "localEndTime": {
            "type": "string",
            "format": "time",
            "description": "End time of the duration"
          }
        }
      },
      "DiffSpecHoursPortionDayDuration": {
        "title": "PortionDayDuration",
        "description": "Defines the request as either the entire day (all_day) or no hours at all (vacant).\n",
        "required": [
          "dayDurationType",
          "portion"
        ],
        "type": "object",
        "properties": {
          "dayDurationType": {
            "type": "string",
            "enum": [
              "portionDayDuration"
            ],
            "description": "The type of day duration"
          },
          "portion": {
            "type": "string",
            "enum": [
              "all_day",
              "vacant"
            ],
            "description": "The portion of the day"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The unique identifier of the error."
          },
          "error": {
            "type": "string",
            "description": "A human readable error message."
          }
        }
      }
    },
    "securitySchemes": {
      "Basic": {
        "type": "http",
        "scheme": "basic"
      },
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth 2.0",
        "description": "OAuth 2.0 authentication using an Access Token is available for registered partners only.  Try It! does not support the full HiBob OAuth flow. You can follow <a href=\"https://apidocs.hibob.com/reference/oauth-20#testing-from-the-public-api-reference\" target=\"_blank\">these steps</a> to complete the OAuth 2.0 flow in Postman and then paste the token here."
      }
    }
  }
}
```