Approve a leave request
Approve a pending leave request and set the hours of each day.
POST https://cotlet.dev/api/v1/deputy/leaves/{leave_id}/request/approve
Approves one leave request. day_type sets every day: standard_hours, scheduled_hours or non_working_day, matching Deputy's Standard hours, Scheduled hours and Non-working day. leave_type changes the type the employee suggested. For past dates Deputy creates the timesheets at once, for future dates as each day passes. The employee is told. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| leave_id integer required | integer | Leave ID from list_leave_requests. |
| day_type enum required | enum | standard_hours, scheduled_hours or non_working_day, applied to every day of the request. |
| leave_type string | string | Leave type name as shown in Deputy. Default: the type the employee picked. |
| comment string | string | Comment the employee sees. |
Request
curl -X POST https://cotlet.dev/api/v1/deputy/leaves/311/request/approve \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"day_type":"standard_hours","comment":"Approved, enjoy the break."}' result = client.call("deputy", "approve_leave_request", {"leave_id":311,"day_type":"standard_hours","comment":"Approved, enjoy the break."}) const result = await cotlet.call('deputy', 'approve_leave_request', {"leave_id":311,"day_type":"standard_hours","comment":"Approved, enjoy the break."}); cotlet call deputy approve_leave_request --data '{"leave_id":311,"day_type":"standard_hours","comment":"Approved, enjoy the break."}' Example response
{
"leave_id": 311,
"employee": "Tom Becker",
"status": "approved",
"leave_type": "Annual leave",
"day_type": "standard_hours",
"days": [
"2026-11-03",
"2026-11-04"
],
"comment": "Approved, enjoy the break."
}