> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bindbee.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# create-time-off

> Creates a TimeOff object with the given values.

This endpoint creates a Timeoff Entry in the connected HRIS via Bindbee's unified **Time Off** model.

## Provider-specific behavior

Different HRIS systems can have slightly different requirements and behaviors when creating timeoff entries. Use the accordions below to see details for each provider.

<AccordionGroup>
  <Accordion title="ADP">
    <p>
      When the underlying HRIS is <strong>ADP</strong>, a Timesheet Entry can be created using a payload like:
    </p>

    ```json theme={null}
    {
        "employee": "01929f6e-c6c1-74b4-8119-a7d9efc0c8b8",
        "amount": 8,
        "start_time": "2024-09-04T08:00:00Z",
        "end_time": "2024-09-04T16:00:00Z",
        "request_type": "VACATION"
    }
    ```
  </Accordion>

  <Accordion title="Workday">
    <p>
      Use the <a href="https://docs.bindbee.dev/hris/time-off/get-create-time-off-meta" target="_blank"><strong>Get Create Time Off Meta</strong></a> endpoint to retrieve the required schema and values.
    </p>
  </Accordion>

  <Accordion title="Dayforce">
    <p>
      Use the <a href="https://docs.bindbee.dev/hris/time-off/get-create-time-off-meta" target="_blank"><strong>Get Create Time Off Meta</strong></a> endpoint to retrieve the required schema and values.
    </p>
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml post /api/hris/v1/time-off
openapi: 3.1.0
info:
  title: Bindbee APIs
  version: 0.1.0
servers:
  - url: https://api.bindbee.dev
  - url: https://api-eu.bindbee.dev
security: []
paths:
  /api/hris/v1/time-off:
    post:
      tags:
        - Time Off
      summary: Create Time Off
      description: Creates a TimeOff object with the given values.
      operationId: create_time_off_api_hris_v1_time_off_post
      parameters:
        - name: x-idempotency-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Key to guarantee idempotent write execution.
            title: X-Idempotency-Key
          description: Key to guarantee idempotent write execution.
        - name: x-connector-token
          in: header
          required: true
          schema:
            type: string
            title: X-Connector-Token
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '401':
          description: Missing or invalid bearer authentication credentials.
          headers:
            WWW-Authenticate:
              description: Bearer authentication challenge.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            The credentials are valid but do not permit access to this resource,
            e.g. a connector token used on a different API category or a model
            whose writes are disabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded.
          headers:
            X-RateLimit-Limit:
              description: Maximum requests allowed in the current window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                Unix timestamp (seconds since epoch) at which the current
                rate-limit window resets.
              schema:
                type: integer
            Retry-After:
              description: Seconds to wait before retrying the request.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````