Skip to main content
POST
/
api
/
schedule
/
absences.create
Create absence(s)
curl --request POST \
  --url https://api.example.com/api/schedule/absences.create \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource_id": "872815618512410358",
  "absence_type_id": "872815618512410358",
  "when": "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;DTSTART=20260101T120000;UNTIL=20260105T120000",
  "percentage": 100,
  "time_ranges": [
    "12:34:56/PT2H"
  ],
  "options": {
    "schedule_on_bank_holidays": true,
    "allow_partial": true
  },
  "repetition_id": 123,
  "remark": "<string>"
}
'
{
  "created": {},
  "repetition_id": 123,
  "created_count": 0,
  "failed_count": 0,
  "failed": []
}

Body

application/json
resource_id
string<snowflake>
required
Example:

"872815618512410358"

absence_type_id
string<snowflake>
required
Example:

"872815618512410358"

when
string
required

A single date (YYYY-MM-DD), a date interval (YYYY-MM-DD/YYYY-MM-DD), or an RRULE string. When using a date interval or RRULE, options.schedule_on_bank_holidays is required.

Example:

"RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;DTSTART=20260101T120000;UNTIL=20260105T120000"

percentage
number<percentage>
Example:

100

time_ranges
string<local-time-interval>[]
options
object
repetition_id
integer | null
remark
string | null

Response

201 - application/json

Absence(s) created. When options.allow_partial is true, some absences might not be created due to lock dates or permissions.

Result of creating absence(s).

created
object
required
repetition_id
integer | null
required
created_count
integer
default:0
required
failed_count
integer
default:0
required
failed
string[]
required