# Remove agent grant

`DELETE /v1/projects/{project}/agents/{agent}/grants/{grant}`, operation `agents.RemoveAgentGrant`

Revokes an access profile or secret grant from an agent and flushes its environment's credential cache immediately.

Allowed for either the agent's owner (agents.secretGrants.delete) or the target resource's IAM admin (setIamPolicy), so admins can revoke directly from a resource's Agents tab.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `project` | path | Yes | `string` | The project's ID. |
| `agent` | path | Yes | `string` | The agent's ID. |
| `grant` | path | Yes | `string (uuid)` | The grant's ID. |

## Responses

### 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `grants` | `AgentGrant[]` | Yes | Grants held by the agent, oldest first. |

### default

Error

Base URL: `https://api.kosem.ai`. See [API conventions](https://docs.kosem.ai/reference/api-conventions.md) for authentication, pagination and errors, and [https://docs.kosem.ai/openapi.yaml](https://docs.kosem.ai/openapi.yaml) for the full OpenAPI document.