Create a time off request (absence / holiday)
Scope: team:time-off.write https://api.alladdin.com/api/v2/employees/{employeeId}/time-offs
Creates a new time off request (absence, holiday, vacation, sick leave, etc.) for the specified employee.
Parameters
Path parameters
employeeId string required
Employee ID (24-character hexadecimal ObjectId)
Request body
object time_off_type_id string required
Time off type identifier (e.g. holiday, sick leave, vacation, parental leave)
start_date string<date> required
Start date (YYYY-MM-DD)
end_date string<date> required
End date (YYYY-MM-DD). Equal to start_date for single-day requests.
start_period string | null optional
Half-day granularity: morning, afternoon, full_day
Enum: morning afternoon full_day hourly `` reason string | null optional
Optional note or reason
start_hour string | null optional
Start time for HOURS-granularity types (HH:MM)
num_hours number | null optional
Duration in hours. Multiple of 0.5.
Request
import requests
url = "https://api.alladdin.com/api/v2/employees/507f1f77bcf86cd799439012/time-offs"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"time_off_type_id": "507f1f77bcf86cd799439013",
"start_date": "2026-06-01",
"end_date": "2026-06-05",
"start_period": "morning",
"reason": "string",
"start_hour": "09:00",
"num_hours": 4
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Response
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201 Absence / time off request created application/json object id string
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Employee not found application/json 422 Invalid time off data application/json 429 Rate limit exceeded application/json
