Skip to main content
POST
Create a leave type

Authorizations

X-API-KEY
string
header
required

Body

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

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.

Available options:
days,
half_days,
hours,
minutes_30,
minutes_15,
minutes_10,
minutes_5,
minutes_1
position
number
required
take_from_allowance
boolean
required
privacy_hide_leavetype
boolean
required
outlook_synchronization_show_as
enum<string>
required
Available options:
free,
tentative,
busy,
oof,
workingElsewhere,
unknown
outlook_synchronization_subject
string | null
required
icon
enum<string>
required
Available options:
NoIcon,
Umbrella,
Anchor,
Archive,
Award,
Briefcase,
Calendar,
Cast,
Clock,
Coffee,
Compass,
Battery,
Emoji,
Gift,
Frown,
Image,
Sun,
Home,
Zap,
Users,
TreePalm,
Plane,
Luggage,
Tent,
Mountain,
Bike,
Waves,
Snowflake,
Ship,
Map,
Camera,
Sunset,
Thermometer,
Pill,
Stethoscope,
HeartPulse,
Hospital,
Bandage,
Brain,
Syringe,
Bed,
Ambulance,
Eye,
Accessibility,
Activity,
Baby,
Heart,
HeartHandshake,
Dog,
Truck,
Milk,
HandHeart,
ToyBrick,
Cake,
Laptop,
Building2,
Presentation,
Car,
TrainFront,
RotateCcw,
Headset,
Phone,
HardHat,
Wrench,
Globe,
MapPin,
GraduationCap,
BookOpen,
School,
Languages,
Lightbulb,
PenLine,
PartyPopper,
Gem,
Flower2,
Landmark,
Vote,
Shield,
Church,
HandHelping,
Scale,
Siren,
Trophy,
Star,
Timer,
Hourglass,
CalendarOff,
Moon,
AlarmClock,
Sunrise,
CalendarDays,
CalendarHeart,
Megaphone,
CloudLightning,
Leaf,
Lock,
Ban,
CircleHelp
reason_mandatory
boolean
required
reason_hint_text
string | null
required
allowance_type_id
string | null
required

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
required
sync_option
enum<string>
required
Available options:
Disabled,
All,
OnlyApproved
ignore_public_holidays
boolean
required
reason_visibility_public
boolean
required
counts_as_leave
boolean
default:true
allow_representative_overlap
boolean
default:false
allow_request_changes
boolean
default:true

Whether pending and approved requests of this leave type can be changed.

request_shortening_needs_approval
boolean
default:false

Shortening an approved request needs approval from its approvers when this is on. Off by default: a shortened request applies at once and the days go back to the allowance. Extending or moving always needs approval.

translations
object[]

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

Response

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})$