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

write Confirm

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

Parameters: approve_leave_request
NameTypeDescription
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
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."}'
Python
result = client.call("deputy", "approve_leave_request", {"leave_id":311,"day_type":"standard_hours","comment":"Approved, enjoy the break."})
Node.js
const result = await cotlet.call('deputy', 'approve_leave_request', {"leave_id":311,"day_type":"standard_hours","comment":"Approved, enjoy the break."});
CLI
cotlet call deputy approve_leave_request --data '{"leave_id":311,"day_type":"standard_hours","comment":"Approved, enjoy the break."}'

Example response

JSON

{
  "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."
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.