# Create time-off request

POST https://api.letsdeel.com/rest/v2/time_offs
Content-Type: application/json

Create time-off request
 **Token scopes**: `time-off:write`, `worker:write`

Reference: https://developer.deel.com/api/endpoints/time-off/create-time-off-request

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Deel HRIS SCIM API
  version: 1.0.0
paths:
  /time_offs:
    post:
      operationId: create-time-off-request
      summary: Create time-off request
      description: |-
        Create time-off request
         **Token scopes**: `time-off:write`, `worker:write`
      tags:
        - subpackage_timeOff
      parameters:
        - name: Authorization
          in: header
          description: >
            ## Authentication

            The Deel API uses bearer tokens to authenticate requests. All API
            calls must be made over HTTPS — calls over plain HTTP or without
            authentication will fail.


            ```curl

            curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
              -H 'Authorization: Bearer YOUR-TOKEN-HERE'
            ```


            [Learn more about authentication](/api/authentication)
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Time off creation data
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/time-off_createTimeOffRequest_Response_201
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateTimeOffRequest-v2026-01-01RequestBadRequestError
        '401':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateTimeOffRequest-v2026-01-01RequestForbiddenError
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateTimeOffRequest-v2026-01-01RequestNotFoundError
        '500':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
      requestBody:
        description: The time off request data
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: >-
                    #/components/schemas/TimeOffsPostRequestBodyContentApplicationJsonSchemaData
                  description: The time off request data
servers:
  - url: https://api.letsdeel.com/rest/v2
  - url: https://api-staging.letsdeel.com/rest/v2
components:
  schemas:
    TimeOffsPostRequestBodyContentApplicationJsonSchemaDataDatesItemsDate:
      oneOf:
        - type: string
          format: date
        - type: string
          format: date-time
      description: An specific date in the time-off request
      title: TimeOffsPostRequestBodyContentApplicationJsonSchemaDataDatesItemsDate
    TimeOffsPostRequestBodyContentApplicationJsonSchemaDataDatesItemsDayType:
      type: string
      enum:
        - HALF_DAY
        - FULL_DAY
        - PERCENTAGE
        - HOURLY
      description: >-
        The type of day for the time off request. All dates must follow the same
        type.
      title: TimeOffsPostRequestBodyContentApplicationJsonSchemaDataDatesItemsDayType
    TimeOffsPostRequestBodyContentApplicationJsonSchemaDataDatesItems:
      type: object
      properties:
        date:
          $ref: >-
            #/components/schemas/TimeOffsPostRequestBodyContentApplicationJsonSchemaDataDatesItemsDate
          description: An specific date in the time-off request
        hours:
          type: number
          format: double
          description: >-
            The amount taken in hours during this specific date. It can not
            exceed the maximum allowed hours for the date.
        amount:
          type: number
          format: double
          description: >-
            The amount of time off requested for the date. It must be in the
            same time unit as in the total amount for the time off request.
        day_type:
          $ref: >-
            #/components/schemas/TimeOffsPostRequestBodyContentApplicationJsonSchemaDataDatesItemsDayType
          description: >-
            The type of day for the time off request. All dates must follow the
            same type.
      required:
        - date
      description: The dates breakdown for the time off request.
      title: TimeOffsPostRequestBodyContentApplicationJsonSchemaDataDatesItems
    TimeOffsPostRequestBodyContentApplicationJsonSchemaDataStatus:
      type: string
      enum:
        - REQUESTED
        - APPROVED
      default: APPROVED
      description: >-
        Status for the time off request. When set to REQUESTED the time off
        should be reviewed later through the Approve/Reject time off api.
      title: TimeOffsPostRequestBodyContentApplicationJsonSchemaDataStatus
    TimeOffsPostRequestBodyContentApplicationJsonSchemaDataEndDate:
      oneOf:
        - type: string
          format: date
        - type: string
          format: date-time
      description: >-
        End date of the time off request. This is the date when the time off
        ends. For example, if you take 2 days off, this will be the end date of
        the second day.
      title: TimeOffsPostRequestBodyContentApplicationJsonSchemaDataEndDate
    TimeOffsPostRequestBodyContentApplicationJsonSchemaDataStartDate:
      oneOf:
        - type: string
          format: date
        - type: string
          format: date-time
      description: >-
        Start date of the time off request. This is the date when the time off
        starts. For example, if you take 2 days off, this will be the start date
        of the first day.
      title: TimeOffsPostRequestBodyContentApplicationJsonSchemaDataStartDate
    TimeOffsPostRequestBodyContentApplicationJsonSchemaDataEventDetails:
      type: object
      properties:
        birth_date:
          type: string
          format: date
          description: >-
            The birth date of the child. This is used for parental leave
            requests.
        adoption_date:
          type: string
          format: date
          description: The date of adoption. This is used for parental leave requests.
        was_premature_birth:
          type: boolean
          description: >-
            Whether the birth was premature or not. This is used for parental
            leave requests.
        had_multiple_children:
          type: boolean
          description: >-
            Whether the birth was multiple or not. This is used for parental
            leave requests.
      required:
        - birth_date
        - was_premature_birth
        - had_multiple_children
      description: >-
        Details of the event associated with the time off request. Required for
        event based policies such as parental leave.
      title: TimeOffsPostRequestBodyContentApplicationJsonSchemaDataEventDetails
    TimeOffsPostRequestBodyContentApplicationJsonSchemaData:
      type: object
      properties:
        dates:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsPostRequestBodyContentApplicationJsonSchemaDataDatesItems
          description: The dates breakdown for the time off request.
        reason:
          type:
            - string
            - 'null'
          description: >-
            Reason for taking time off. This is complementary information for
            the time-off description. Useful to provide sub categories for the
            same policy.
        status:
          $ref: >-
            #/components/schemas/TimeOffsPostRequestBodyContentApplicationJsonSchemaDataStatus
          description: >-
            Status for the time off request. When set to REQUESTED the time off
            should be reviewed later through the Approve/Reject time off api.
        is_paid:
          type: boolean
          description: >-
            Whether the time off is paid or unpaid. By default it follows the
            policy configuration.
        end_date:
          $ref: >-
            #/components/schemas/TimeOffsPostRequestBodyContentApplicationJsonSchemaDataEndDate
          description: >-
            End date of the time off request. This is the date when the time off
            ends. For example, if you take 2 days off, this will be the end date
            of the second day.
        policy_id:
          type: string
          format: uuid
          description: The time off policy id. Can be used in place of time_off_type_id
        start_date:
          $ref: >-
            #/components/schemas/TimeOffsPostRequestBodyContentApplicationJsonSchemaDataStartDate
          description: >-
            Start date of the time off request. This is the date when the time
            off starts. For example, if you take 2 days off, this will be the
            start date of the first day.
        description:
          type:
            - string
            - 'null'
          description: >-
            Description of the time off request. Some policies require that a
            description is provided.
        contract_oid:
          type:
            - string
            - 'null'
          description: >-
            Contract id. This is the id of the contract associated with the time
            off request.
        event_details:
          $ref: >-
            #/components/schemas/TimeOffsPostRequestBodyContentApplicationJsonSchemaDataEventDetails
          description: >-
            Details of the event associated with the time off request. Required
            for event based policies such as parental leave.
        deduction_amount:
          type:
            - number
            - 'null'
          format: double
          description: Deduction amount. Available for independent contractor's policies
        time_off_type_id:
          type: string
          format: uuid
          description: The time off type id. Required when policy_id is not provided
        time_off_event_id:
          type: string
          format: uuid
          description: >-
            The time off event id. This is used to link the time off request to
            an event.
        time_off_percentage:
          type:
            - number
            - 'null'
          format: double
          description: >-
            This is the percentage of time off taken. This is used when the time
            off request is a percentage.
        recipient_profile_id:
          type: string
          format: uuid
          description: The hris profile id of the recipient
        other_type_description:
          type:
            - string
            - 'null'
          description: >-
            Description of the time off type. This is used when the policy is
            OTHER.
      required:
        - end_date
        - start_date
        - recipient_profile_id
      description: The time off request data
      title: TimeOffsPostRequestBodyContentApplicationJsonSchemaData
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsStatus:
      type: string
      enum:
        - REQUESTED
        - APPROVED
        - REJECTED
        - USED
        - CANCELED
      description: >-
        Status of the time off request. Can be REQUESTED, APPROVED, REJECTED,
        USED or CANCELED.
      title: TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsStatus
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsAttachmentsItems:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Attachment id
        filename:
          type: string
          description: Filename of the attachment
        created_at:
          type: string
          format: date-time
          description: This is the date when the attachment was created in the database.
        updated_at:
          type: string
          format: date-time
          description: >-
            This is the date when the attachment was last updated in the
            database.
      required:
        - id
        - filename
        - created_at
        - updated_at
      description: An attachment associated with the time off request.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsAttachmentsItems
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffTypePolicyPolicyType:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Policy type id
        name:
          type: string
          description: Depicts the type of policy, like VACATION, SICK etc
      required:
        - id
        - name
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffTypePolicyPolicyType
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffTypePolicy:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Policy id
        name:
          type: string
          description: The custom name given to policy during policy creation.
        policy_type:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffTypePolicyPolicyType
      required:
        - id
        - name
        - policy_type
      description: The policy associated with the time off type.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffTypePolicy
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffType:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Time off type id.
        name:
          type: string
          description: >-
            Time off type name. Basically the reason or category of time-off
            taken. For SICK leave, it can be doctor appointment, surgery etc.
        policy:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffTypePolicy
          description: The policy associated with the time off type.
      required:
        - id
        - name
      description: The type of time off taken.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffType
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffEventType:
      type: string
      enum:
        - PARENTAL_LEAVE
      description: The type of the time off event.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffEventType
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffEventEventDetails:
      type: object
      properties:
        birth_date:
          type: string
          format: date
          description: >-
            The birth date of the child. This is used for parental leave
            requests.
        adoption_date:
          type: string
          format: date
          description: The date of adoption. This is used for parental leave requests.
        was_premature_birth:
          type: boolean
          description: >-
            Whether the birth was premature or not. This is used for parental
            leave requests.
        estimated_birth_date:
          type: string
          format: date
          description: >-
            The estimated birth date of the child. Birth is estimated when the
            birth date has not been confirmed yet.
        had_multiple_children:
          type: boolean
          description: >-
            Whether the birth was multiple or not. This is used for parental
            leave requests.
        estimated_adoption_date:
          type: string
          format: date
          description: >-
            The estimated adoption date of the child. Birth is estimated when
            the adoption date has not been confirmed yet.
      required:
        - was_premature_birth
        - had_multiple_children
      description: >-
        Details of the event associated with the time off request. Required for
        event based policies such as parental leave.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffEventEventDetails
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffEvent:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The time off event id. This is used to link the time off request to
            an event.
        type:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffEventType
          description: The type of the time off event.
        policy_id:
          type: string
          format: uuid
          description: >-
            The policy id associated with the time off event. Same as the
            policy_id in the time off type.
        created_at:
          type: string
          format: date-time
          description: The date when the time off event was created in the database.
        updated_at:
          type: string
          format: date-time
          description: The date when the time off event was last updated in the database.
        event_details:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffEventEventDetails
          description: >-
            Details of the event associated with the time off request. Required
            for event based policies such as parental leave.
        hris_profile_id:
          type: string
          format: uuid
          description: >-
            The HRIS profile id of the worker associated with the time off
            event. Same as the hris_profile_id in the recipient_profile.
        time_off_type_id:
          type: string
          format: uuid
          description: >-
            The time off type id associated with the time off event. Same as the
            time_off_type_id in the time off request.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffEvent
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsEntitlementUnit:
      type: string
      enum:
        - HOUR
        - BUSINESS_DAY
        - CALENDAR_DAY
        - WEEK
        - MONTH
        - YEAR
      description: The unit in which the time off usage and entitlement are calculated.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsEntitlementUnit
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffDailiesItemsType:
      type: string
      enum:
        - WORKING_DAY
        - NON_WORKING_DAY
        - HOLIDAY
      description: >-
        Type of the time off daily. Can be WORKING_DAY, NON_WORKING_DAY or
        HOLIDAY.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffDailiesItemsType
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffDailiesItems:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Time off daily id
        date:
          type: string
          format: date
          description: >-
            Date of the time off daily. This is the date when the time off was
            taken.
        type:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffDailiesItemsType
          description: >-
            Type of the time off daily. Can be WORKING_DAY, NON_WORKING_DAY or
            HOLIDAY.
        amount:
          type: number
          format: double
          description: Amount of time off taken in this specific date.
        created_at:
          type: string
          format: date-time
          description: >-
            This is the date when the time off daily was created in the
            database.
        updated_at:
          type: string
          format: date-time
          description: >-
            This is the date when the time off daily was last updated in the
            database.
        description:
          type:
            - string
            - 'null'
          description: >-
            Description of the time off daily. When it is a HOLIDAY this is the
            holiday name.
        time_off_id:
          type: string
          format: uuid
          description: >-
            Time off id. This is the id of the time off request associated with
            the time off daily.
      required:
        - id
        - date
        - type
        - amount
        - created_at
        - updated_at
        - time_off_id
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffDailiesItems
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsRecipientProfile:
      type: object
      properties:
        hris_profile_id:
          type: string
          format: uuid
          description: The worker HRIS profile id in the given organization.
        organization_id:
          type: string
          format: uuid
          description: Id of the organization the profile belongs to.
      required:
        - hris_profile_id
        - organization_id
      description: >-
        The time off profile of the recipient of the time off request. Must be a
        worker profile.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsRecipientProfile
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsRequesterProfile:
      type: object
      properties:
        hris_profile_id:
          type: string
          format: uuid
          description: >-
            The worker HRIS profile id in the given organization. Available when
            the requester is a worker.
        organization_id:
          type: string
          format: uuid
          description: Id of the organization the profile belongs to.
        client_profile_id:
          type: string
          format: uuid
          description: Id of the client profile. Available when the requester is a client.
      required:
        - organization_id
      description: >-
        The time off profile of the requester of the time off request. Can be
        either a client or worker profile.
      title: >-
        TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsRequesterProfile
    TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItems:
      type: object
      properties:
        amount:
          type: number
          format: double
          description: >-
            Amount of time off taken. This is the total amount of time off
            taken. For example, if you take 2 days off, this will be 2. If you
            take 1 day off, this will be 1.
        reason:
          type: string
          description: >-
            Reason for taking time off. This is complementary information for
            the time-off description. Useful to provide sub categories for the
            same policy.
        status:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsStatus
          description: >-
            Status of the time off request. Can be REQUESTED, APPROVED,
            REJECTED, USED or CANCELED.
        is_paid:
          type: boolean
          description: Whether the time off is paid or unpaid.
        end_date:
          type: string
          format: date
          description: >-
            End date of the time off request. This is the date when the time off
            ends. For example, if you take 2 days off, this will be the end date
            of the second day.
        created_at:
          type: string
          format: date-time
          description: >-
            This is the date when the time off request was created in the
            database.
        start_date:
          type: string
          format: date
          description: >-
            Start date of the time off request. This is the date when the time
            off starts. For example, if you take 2 days off, this will be the
            start date of the first day.
        updated_at:
          type: string
          format: date-time
          description: >-
            This is the date when the time off request was last updated in the
            database.
        approved_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            This is the date when the time off request was approved. This will
            be null if the time off request is not approved yet.
        attachments:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsAttachmentsItems
          description: List of attachments associated with the time off request.
        description:
          type: string
          description: >-
            Description of the time off request. Some policies require that a
            description is provided.
        contract_oid:
          type:
            - string
            - 'null'
          description: >-
            Contract id. This is the id of the contract associated with the time
            off request.
        requested_at:
          type: string
          format: date
          description: This is the date when the time off request was made.
        half_end_date:
          type: boolean
          description: Whether the end date is a half day or not.
        time_off_type:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffType
          description: The type of time off taken.
        time_off_event:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffEvent
        half_start_date:
          type: boolean
          description: Whether the start date is a half day or not.
        deduction_amount:
          type:
            - number
            - 'null'
          format: double
          description: Deduction amount. Available for independent contractor's policies
        entitlement_unit:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsEntitlementUnit
          description: The unit in which the time off usage and entitlement are calculated.
        time_off_dailies:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsTimeOffDailiesItems
        time_off_type_id:
          type: string
          format: uuid
          description: >-
            Time off type id. This is the id of the time off type associated
            with the time off request.
        recipient_profile:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsRecipientProfile
          description: >-
            The time off profile of the recipient of the time off request. Must
            be a worker profile.
        requester_profile:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItemsRequesterProfile
          description: >-
            The time off profile of the requester of the time off request. Can
            be either a client or worker profile.
        time_off_percentage:
          type:
            - number
            - 'null'
          format: double
          description: This is the percentage of time off taken.
        is_end_date_estimated:
          type: boolean
          description: >-
            Whether the end date is estimated or not. This is used on event
            based policies such as Parental leave.
        other_type_description:
          type:
            - string
            - 'null'
          description: >-
            Description of the time off type. This is used when the policy is
            OTHER.
      required:
        - is_paid
        - end_date
        - created_at
        - start_date
        - updated_at
        - requested_at
        - half_end_date
        - half_start_date
        - entitlement_unit
        - time_off_type_id
      description: Created time off request
      title: TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItems
    time-off_createTimeOffRequest_Response_201:
      type: object
      properties:
        time_offs:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaTimeOffsItems
          description: >-
            The list of created time offs. Depending on the selected dates, a
            time off can be split into more than one request.
      required:
        - time_offs
      description: >-
        The list of created time offs. Depending on the selected dates, a time
        off can be split into more than one request.
      title: time-off_createTimeOffRequest_Response_201
    TimeOffsPostResponsesContentApplicationJsonSchemaErrors:
      type: object
      properties:
        message:
          type: string
          description: Error message describing what went wrong
      description: Error details
      title: TimeOffsPostResponsesContentApplicationJsonSchemaErrors
    TimeOffsPostResponsesContentApplicationJsonSchemaRequest:
      type: object
      properties:
        url:
          type: string
          description: Request URL path
        docs:
          type: string
          description: Documentation reference
        method:
          type: string
          description: HTTP method
        source:
          type: string
          description: Request source
        status:
          type: integer
          description: HTTP status code
        api_req_id:
          type: string
          description: Unique API request identifier
      description: Request metadata
      title: TimeOffsPostResponsesContentApplicationJsonSchemaRequest
    CreateTimeOffRequest-v2026-01-01RequestBadRequestError:
      type: object
      properties:
        errors:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaErrors
          description: Error details
        request:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaRequest
          description: Request metadata
      title: CreateTimeOffRequest-v2026-01-01RequestBadRequestError
    ApiErrorRequest:
      type: object
      properties:
        method:
          type: string
          description: The HTTP method of the failed request
        url:
          type: string
          description: The relative URL of the failed request
        status:
          type: number
          format: double
          description: The status code of the response
        api_req_id:
          type: string
          description: The request ID of the failed request
        docs:
          type: string
          description: >-
            A link to the official documentation for the requested endpoint
            resource
        source:
          type: string
          description: The source handler which produced the returned error
        code:
          type: number
          format: double
          description: The code of the source handler which produced the returned error
      title: ApiErrorRequest
    ApiError:
      type: object
      properties:
        message:
          type: string
          description: A description of the returned error
        path:
          type: string
          description: The JSON path where input validation failed
      title: ApiError
    ApiErrorContainer:
      type: object
      properties:
        request:
          $ref: '#/components/schemas/ApiErrorRequest'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
      title: ApiErrorContainer
    CreateTimeOffRequest-v2026-01-01RequestForbiddenError:
      type: object
      properties:
        errors:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaErrors
          description: Error details
        request:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaRequest
          description: Request metadata
      title: CreateTimeOffRequest-v2026-01-01RequestForbiddenError
    CreateTimeOffRequest-v2026-01-01RequestNotFoundError:
      type: object
      properties:
        errors:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaErrors
          description: Error details
        request:
          $ref: >-
            #/components/schemas/TimeOffsPostResponsesContentApplicationJsonSchemaRequest
          description: Request metadata
      title: CreateTimeOffRequest-v2026-01-01RequestNotFoundError
  securitySchemes:
    deelToken:
      type: http
      scheme: bearer
      description: >
        ## Authentication

        The Deel API uses bearer tokens to authenticate requests. All API calls
        must be made over HTTPS — calls over plain HTTP or without
        authentication will fail.


        ```curl

        curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
          -H 'Authorization: Bearer YOUR-TOKEN-HERE'
        ```


        [Learn more about authentication](/api/authentication)
    oauth2:
      type: http
      scheme: bearer
      description: >-
        Standard OAuth2 security scheme based on
        https://swagger.io/docs/specification/authentication/

```

## SDK Code Examples

```python
import requests

url = "https://api.letsdeel.com/rest/v2/time_offs"

payload = { "data": {
        "end_date": "2021-04-30",
        "start_date": "2021-04-01",
        "recipient_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
        "reason": "Vacation",
        "is_paid": True,
        "time_off_type_id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/v2/time_offs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":{"end_date":"2021-04-30","start_date":"2021-04-01","recipient_profile_id":"d290f1ee-6c54-4b01-90e6-d701748f0851","reason":"Vacation","is_paid":true,"time_off_type_id":"d290f1ee-6c54-4b01-90e6-d701748f0851"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/v2/time_offs"

	payload := strings.NewReader("{\n  \"data\": {\n    \"end_date\": \"2021-04-30\",\n    \"start_date\": \"2021-04-01\",\n    \"recipient_profile_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"reason\": \"Vacation\",\n    \"is_paid\": true,\n    \"time_off_type_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/v2/time_offs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"end_date\": \"2021-04-30\",\n    \"start_date\": \"2021-04-01\",\n    \"recipient_profile_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"reason\": \"Vacation\",\n    \"is_paid\": true,\n    \"time_off_type_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.letsdeel.com/rest/v2/time_offs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"end_date\": \"2021-04-30\",\n    \"start_date\": \"2021-04-01\",\n    \"recipient_profile_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"reason\": \"Vacation\",\n    \"is_paid\": true,\n    \"time_off_type_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.letsdeel.com/rest/v2/time_offs', [
  'body' => '{
  "data": {
    "end_date": "2021-04-30",
    "start_date": "2021-04-01",
    "recipient_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "reason": "Vacation",
    "is_paid": true,
    "time_off_type_id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/v2/time_offs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"end_date\": \"2021-04-30\",\n    \"start_date\": \"2021-04-01\",\n    \"recipient_profile_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"reason\": \"Vacation\",\n    \"is_paid\": true,\n    \"time_off_type_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    "end_date": "2021-04-30",
    "start_date": "2021-04-01",
    "recipient_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "reason": "Vacation",
    "is_paid": true,
    "time_off_type_id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/v2/time_offs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```