> ## Documentation Index
> Fetch the complete documentation index at: https://onecli.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Approvals API: Approve or Deny Agent Requests

> Long-poll for the gateway's manual-approval requests and submit decisions with the OneCLI API. Keep a human in the loop for risky agent actions.

When a grant or rule marks a tool as needing approval, the gateway holds the agent's request until someone decides. These endpoints let your own tool or bot receive those requests and answer them.

Long-poll for pending requests, then approve to forward the request or deny to block it. For what triggers an approval, see [Rules](https://onecli.sh/docs/guides/rules.md) and [Agent access](https://onecli.sh/docs/guides/agent-access.md).

## Related guides

* [Rules: require approval for actions](https://onecli.sh/docs/guides/rules.md)
* [Agent access: allow and ask tool lists](https://onecli.sh/docs/guides/agent-access.md)

## Endpoints

| Endpoint | Method and path | What it does |
| - | - | - |
| [List pending approvals](https://onecli.sh/docs/api-reference/approvals/list-pending-approvals.md) | `GET /approvals/pending` | Long-poll for manual-approval requests waiting in your workspace. |
| [Submit an approval decision](https://onecli.sh/docs/api-reference/approvals/submit-an-approval-decision.md) | `POST /approvals/{id}/decision` | Approve or deny a held manual-approval request. |

## Next steps

* [API overview](https://onecli.sh/docs/api-reference.md): base URLs, authentication, and pagination
* [Errors](https://onecli.sh/docs/api-reference/errors.md): status codes and the error format
* [Editions](https://onecli.sh/docs/api-reference/editions.md): which endpoints each edition serves


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.