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

# Create

> Creates one absence, or multiple absences if `when` is a LocalDateInterval or an RRULE.



## OpenAPI

````yaml 26.06.25 post /api/schedule/absences.create
openapi: 3.1.0
info:
  title: tipee
  version: 26.06.25
servers: []
security:
  - basicAuth: []
tags:
  - name: Activity
    description: Activity
  - name: Balances
    description: Balances
  - name: Directory
    description: Directory
  - name: Schedule
    description: Schedule
  - name: Timeclock
    description: Timeclock
paths:
  /api/schedule/absences.create:
    post:
      tags:
        - Schedule
      summary: Create
      description: >-
        Creates one absence, or multiple absences if `when` is a
        LocalDateInterval or an RRULE.
      operationId: post_app_ui_api_schedule_schedulecommand_createabsence
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAbsenceCommand'
      responses:
        '201':
          description: >-
            Absence(s) created. When options.allow_partial is true, some
            absences might not be created due to lock dates or permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAbsenceResult'
components:
  schemas:
    CreateAbsenceCommand:
      required:
        - resource_id
        - absence_type_id
        - when
      properties:
        resource_id:
          $ref: '#/components/schemas/Snowflake'
        absence_type_id:
          $ref: '#/components/schemas/Snowflake'
        percentage:
          $ref: '#/components/schemas/Percentage'
        time_ranges:
          type: array
          items:
            $ref: '#/components/schemas/LocalTimeInterval'
        options:
          $ref: '#/components/schemas/CreateOptions'
        repetition_id:
          type:
            - integer
            - 'null'
        remark:
          type:
            - string
            - 'null'
        when:
          description: >-
            A single date (YYYY-MM-DD), a date interval (YYYY-MM-DD/YYYY-MM-DD),
            or an
            [RRULE](https://www.rfc-editor.org/rfc/rfc5545.html#section-3.3.10)
            string. When using a date interval or RRULE,
            options.schedule_on_bank_holidays is required.
          type: string
          example: >-
            RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;DTSTART=20260101T120000;UNTIL=20260105T120000
      type: object
    CreateAbsenceResult:
      description: Result of creating absence(s).
      required:
        - created
        - repetition_id
        - created_count
        - failed_count
        - failed
      properties:
        created:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        repetition_id:
          type:
            - integer
            - 'null'
        created_count:
          type: integer
          default: 0
        failed_count:
          type: integer
          default: 0
        failed:
          type: array
          items:
            type: string
          default: []
      type: object
    Snowflake:
      type: string
      format: snowflake
      example: '872815618512410358'
    Percentage:
      type: number
      format: percentage
      example: 100
    LocalTimeInterval:
      type: string
      format: local-time-interval
      example: 12:34:56/PT2H
    CreateOptions:
      properties:
        schedule_on_bank_holidays:
          type: boolean
        allow_partial:
          type: boolean
      type: object

````