[Cotlet](https://cotlet.dev/index.md) · [Integrations](https://cotlet.dev/integrations.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Use cases](https://cotlet.dev/use-cases.md) · [Security](https://cotlet.dev/security.md) · [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md) · [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [Contact](https://cotlet.dev/contact.md) · [Pricing](https://cotlet.dev/pricing.md) · [Sign up](https://cotlet.dev/signup)

# Approve or decline Deputy leave requests by your own rule

> Decide Deputy leave requests against your roster and notice rule, set the hours of each day and tell staff why. Runs daily, you keep the edge cases.

Source: https://cotlet.dev/integrations/deputy-api-mcp-server/approve-leave-requests

A leave request arrives by email or push notification, and the manager has to look at the roster, pick a day type for every day and write a comment before approving.

Cotlet does it in your own Deputy account with list\_leave\_requests, list\_shifts, approve\_leave\_request and decline\_leave\_request, called by your AI agent, an n8n workflow or a script.

[Sign up free](https://cotlet.dev/app/signup?app=deputy) [All Deputy tools](https://cotlet.dev/integrations/deputy-api-mcp-server.md)

Hosted · nothing to install or maintain

## Can Deputy do this on its own?

Deputy has a leave approval flow in its apps and an update on the Leave resource in its REST API (checked 20 Oct 2026). Neither applies a rule such as notice period or cover at the location. Deputy has no official MCP server, and an API script must work out the hours of each day itself.

## How you do it in Deputy today

1. Managers hear about a request by email, a push notification in the mobile app, or on their dashboard in the web app.
2. On mobile, the manager scrolls down the Home screen to Needs attention and taps Leave requests, then checks the details.
3. For a request of several days, the manager sets each day to Standard hours, Scheduled hours or Non-working day before Approve is possible.
4. The manager adds a comment and taps Approve or Decline. A comment is required to decline.
5. The leave type the employee picked is only a suggestion, so the manager can choose another leave type for each day.

## How to approve or decline Deputy leave requests by your own rule

Prompt

```
Go through pending leave requests. Approve annual leave for at least 14 days ahead when no more than one person at the location is off, decline the rest with a reason and tell me which ones.
```

1. 01  
### Read the pending requests  
list\_leave\_requests returns pending requests with the employee, dates, requested leave type and comment. The account must be a Location Manager or System Administrator to decide them; a Supervisor can only enter leave dates and times.
2. 02  
### Check cover on the roster  
For each request, list\_shifts reads the location's shifts on those dates. The agent counts who else is off or scheduled and applies the cover rule from your prompt.
3. 03  
### Choose a day type  
For an approval, the agent sets day\_type to standard\_hours, scheduled\_hours or non\_working\_day for the whole request. Deputy asks for this on a multi-day request, and approving only the date range creates no timesheets.
4. 04  
### Approve or decline with a reason  
approve\_leave\_request approves the matches. decline\_leave\_request sends the comment to the employee, which Deputy requires for a decline, so the agent writes it from your rule. Both wait for your OK per call by default.
5. 05  
### Leave the unclear ones  
A request that breaks the rule only slightly, or with no clear roster answer, stays pending with a note for you.

### What you get back

Example data

```
Pending leave requests: 6
Approved 4 (Tom Becker Nov 3 to Nov 4, standard hours; cover is fine)
Declined 1 (Ana Lopez Nov 10: two others off that day)
Left for you 1:
- Sam Okafor Dec 24 to Dec 26: holiday week, your call
```

### Other ways to ask

- Approve all sick leave for one day automatically and list the longer ones for me.
- Every Monday, show who is off this week at each location, and approve nothing.
- Decline requests that start in less than 14 days and write a polite reason.

## What Deputy allows, and what to know first

- Deputy requires a comment to decline a leave request, so a decline without a reason is not possible.
- For a past date, Deputy creates the timesheets as soon as leave is approved; for a future date, it creates them as each day passes.
- Deputy tracks leave in hours, not days, so every approved day needs a day type to know how many hours it stands for.
- Deputy lets a manager enter leave for someone else from the People page with Request & Approve, and a Supervisor can enter only the dates and times.

approve\_leave\_request and decline\_leave\_request ask for your OK by default. To run it daily without you, switch confirmation off for those tools in your dashboard.

Sources: [Deputy Help: Approving leave requests on the Deputy mobile app](https://help.deputy.com/hc/en-au/articles/4753122199439-Approving-leave-requests-on-the-Deputy-mobile-app) · [Deputy Help: Managers can enter leave requests on behalf of their team members](https://help.deputy.com/hc/en-au/articles/12393563546895-Managers-can-enter-leave-requests-on-behalf-of-their-team-members) · [Deputy Help: Leave Management FAQs](https://help.deputy.com/hc/en-au/articles/4663059378191-Leave-Management-FAQs) · [Deputy Developer: Adding a leave request for an employee](https://developer.deputy.com/docs/adding-a-leave-request-for-an-employee)

## Call approve\_leave\_request from a script

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."}'
```

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

MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is deputy\_write → approve\_leave\_request. Example data.

[Schedule it in n8n, Make, Zapier or cron](https://cotlet.dev/integrations/deputy-api-mcp-server.md#automations)

## Deputy tools this automation uses

__Cotlet Deputy tools used to approve or decline Deputy leave requests by your own rule__
| Tool | Parameters |
| ----------------------- | ------------------------------------------------ |
| list\_leave\_requests | location\_id, status |
| list\_shifts | location\_id, date\_from, date\_to, employee\_id |
| approve\_leave\_request | leave\_id, day\_type, leave\_type, comment |
| decline\_leave\_request | leave\_id, comment |

[All 12 Deputy tools with descriptions](https://cotlet.dev/integrations/deputy-api-mcp-server.md#tools)

## Frequently asked questions

### Is it safe to connect Deputy to Cotlet?

Yes. You sign in to Deputy yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Deputy once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

## More Deputy automations

- [Approve Deputy timesheets in bulk by your own rule](https://cotlet.dev/integrations/deputy-api-mcp-server/approve-timesheets-in-bulk.md)
- [Deputy API and MCP server: every tool](https://cotlet.dev/integrations/deputy-api-mcp-server.md)
- [All use cases](https://cotlet.dev/use-cases.md)

## Give your agent access to Deputy.

Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Deputy.

[Sign up free](https://cotlet.dev/app/signup?app=deputy)

---

Give your AI agents your signed-in browser.

**Product:** [Integrations](https://cotlet.dev/integrations.md) · [Use cases](https://cotlet.dev/use-cases.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Pricing](https://cotlet.dev/pricing.md) · [Security](https://cotlet.dev/security.md)

**Resources:** [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [GitHub](https://github.com/cotletdev/cotlet)

**Solutions:** [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md)

**Company:** [About](https://cotlet.dev/about.md) · [AI info: company facts](https://cotlet.dev/ai-info.md) · [Contact](https://cotlet.dev/contact.md)

**Legal:** [Terms of service](https://cotlet.dev/terms) · [Privacy policy](https://cotlet.dev/privacy) · [Refund policy](https://cotlet.dev/refunds) · [Acceptable use](https://cotlet.dev/acceptable-use) · [Cookie policy](https://cotlet.dev/cookies) · [DPA](https://cotlet.dev/dpa) · [Subprocessors](https://cotlet.dev/subprocessors)

**Elsewhere:** [Status page](https://status.cotlet.dev) · [Cotlet on GitHub](https://github.com/cotletdev) · [Cotlet on X](https://x.com/cotletdev) · [Cotlet on LinkedIn](https://www.linkedin.com/company/cotletdev) · [Cotlet on Product Hunt](https://www.producthunt.com/products/cotlet) · [Cotlet on Crunchbase](https://www.crunchbase.com/organization/cotlet) · [Cotlet on SaaSHub](https://www.saashub.com/cotlet)

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by any of the products listed on this site. Product names are trademarks of their respective owners.

## For AI agents: sign your user up

Is your user asking you to sign them up for Cotlet? You can do it for them, no account or key needed.

1. Read the fields and their allowed values: GET https://cotlet.dev/api/v1/access-requests
2. Ask the user for each value: email, apps, what you will do with them. If they leave the password to you, generate a strong one and show it to them.
3. Show the user what you will send, then POST it as JSON to https://cotlet.dev/api/v1/access-requests.

One call creates the account and sends the access request; we email the user when access is granted.
