Submit leave request
POST/hr/leave
Submits a new leave request for the authenticated employee. The request requires a leave type, start date, and end date. It enters 'pending' status and awaits manager approval.
Request
Request body
Content type application/json (required).
| Field | Type | Required | Description |
|---|---|---|---|
leave_type_id | integer | Yes | ID of the leave type (e.g. Annual, Sick, Maternity). |
start_date | string (date) | Yes | First day of the requested leave period. |
end_date | string (date) | Yes | Last day of the requested leave period (inclusive). |
notes | string | No | Optional reason or notes for the leave request. |
Example
{
"leave_type_id": 1,
"start_date": "2026-05-12",
"end_date": "2026-05-16",
"notes": "Annual family vacation."
}
Responses
302 Redirect after successful submission
422 Validation error
Example request
curl -X POST "https://{tenant}.faciotech.net/api/v1/hr/leave" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"leave_type_id": 1, "start_date": "2026-05-12", "end_date": "2026-05-16", "notes": "Annual family vacation."}'