API Reference
Build powerful integrations with the LeaveFlow REST API. Automate leave management and sync with your existing tools.
Authentication
All API requests require authentication using an API key. Include your key in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.leaveflow.com/api/v1/employeesEndpoints
GET
/api/v1/employeesList all employees in your organization
Response
{
"data": [
{
"id": "emp_123",
"name": "John Doe",
"email": "john@company.com",
"role": "employee",
"pto_balance": 12
}
],
"pagination": {
"page": 1,
"total": 45
}
}POST
/api/v1/leave-requestsCreate a new leave request
Response
{
"data": {
"id": "lr_456",
"employee_id": "emp_123",
"start_date": "2026-01-20",
"end_date": "2026-01-22",
"type": "vacation",
"status": "pending"
}
}GET
/api/v1/attendance/todayGet today's attendance for all employees
Response
{
"date": "2026-01-12",
"summary": {
"present": 42,
"on_leave": 8,
"absent": 3
},
"employees": [...]
}GET
/api/v1/holidaysList all holidays for the current year
Response
{
"data": [
{
"id": "hol_789",
"name": "New Year's Day",
"date": "2026-01-01",
"type": "national"
}
]
}PATCH
/api/v1/leave-requests/:idUpdate a leave request (approve/reject)
Response
{
"data": {
"id": "lr_456",
"status": "approved",
"approved_by": "emp_manager",
"approved_at": "2026-01-12T10:30:00Z"
}
}Rate Limits
API requests are limited to 1,000 requests per minute per API key. If you need higher limits, contact our enterprise sales team.