Base URL https://api.cube-hr.co.uk/api/v1
22 endpoints
Leave types, employee balances, requests, approvals, and carry-over management.
/leave/types
Get all leave types for the company. Returns an array (not paginated), ordered by sort_order then name.
Create a new leave type for the company.
/leave/types/{uuid}
Update an existing leave type.
Soft-delete a leave type. Deletion is blocked when any non-deleted leave request references it; deactivate the type instead.
/leave-types/{uuid}/carry-over
Set carry-over configuration for a leave type (max days, expiry policy).
/leave/run-carry-over
Trigger carry-over processing for a leave year. Moves unused balances to the new year respecting max carry-over rules.
/employees/{uuid}/leave/balances
Get all leave balances for a specific employee in a given year.
Create a leave balance record or adjust entitlement for an employee.
/leave/balances
Get leave balances for all employees in the company for a given year.
/leave/balances/over-allocated
Get employees whose leave balances have been over-allocated (booked > entitlement + carry-over).
/leave/balances/{uuid}/approve-override
Approve an over-allocation override for a balance record.
/leave/balances/{uuid}/adjust-entitlement
Adjust a leave balance entitlement (e.g. for pro-rata starters or mid-year changes).
/leave/calendar
Get leave requests in a date range suitable for calendar display.
/leave/requests
Get leave requests scoped by the user's access level. Paginated.
Submit a new leave request. Uses abbreviated field names: start and end (not start_date/end_date).
/leave/requests/ai/suggest
Get AI-powered suggestions for optimal leave dates based on team availability and business patterns.
/leave/requests/{uuid}
Get full details of a specific leave request.
/leave/requests/{uuid}/approve
Approve a pending leave request.
/leave/requests/{uuid}/decline
Decline a pending leave request.
/leave/requests/{uuid}/cancel
Employee cancels their own leave request. If cancel_requires_approval is enabled on the leave type, this sets status to cancel_pending.
/leave/requests/{uuid}/approve-cancellation
Manager approves an employee's cancellation request.
/leave/requests/{uuid}/decline-cancellation
Manager declines an employee's cancellation request. The leave remains approved.