Skip to main content
POST
Create a leave type

Autorisierungen

X-API-KEY
string
header
erforderlich

Body

application/json
name
string
erforderlich
Maximum string length: 255
color
string
erforderlich
needs_approval
boolean
erforderlich
maximum_absent
boolean
erforderlich
leave_unit
enum<string>
erforderlich

When take_from_allowance is true, the unit follows the allowance: an hour or minute unit is saved as days for a days-based allowance, and days or half_days is saved as hours for an hours-based allowance.

Verfügbare Optionen:
days,
half_days,
hours,
minutes_30,
minutes_15,
minutes_10,
minutes_5,
minutes_1
position
number
erforderlich
take_from_allowance
boolean
erforderlich
privacy_hide_leavetype
boolean
erforderlich
outlook_synchronization_show_as
enum<string>
erforderlich
Verfügbare Optionen:
free,
tentative,
busy,
oof,
workingElsewhere,
unknown
outlook_synchronization_subject
string | null
erforderlich
icon
enum<string>
erforderlich
Verfügbare Optionen:
NoIcon,
Umbrella,
Anchor,
Archive,
Award,
Briefcase,
Calendar,
Cast,
Clock,
Coffee,
Compass,
Battery,
Emoji,
Gift,
Frown,
Image,
Sun,
Zap,
Home,
Users
reason_mandatory
boolean
erforderlich
reason_hint_text
string | null
erforderlich
allowance_type_id
string | null
erforderlich

The allowance to deduct from when take_from_allowance is true. Always pass it: if it is null or unknown, another allowance of the workspace is used instead. Ignored when take_from_allowance is false.

ignore_schedule
boolean
erforderlich
sync_option
enum<string>
erforderlich
Verfügbare Optionen:
Disabled,
All,
OnlyApproved
ignore_public_holidays
boolean
erforderlich
reason_visibility_public
boolean
erforderlich
counts_as_leave
boolean
Standard:true
allow_representative_overlap
boolean
Standard:false
translations
object[]

Optional per-language names, shown to members using that language.

Antwort

Successful response

The response is of type string<uuid>.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$