# prov.mandate.grants.removeTrustedAgent

prov.mandate.grants.removeTrustedAgent in Node SDK. Take an agent off the company's list (an admin key).

## Signature

```ts
prov.mandate.grants.removeTrustedAgent(trustedAgentId: string): Promise<{ id: string; object: "trusted_agent"; deleted: true }>
```

## Parameters

- `trustedAgentId` (string)

## Returns

`Promise<{ id: string; object: "trusted_agent"; deleted: true }>`

## HTTP operation

[`DELETE /v1/mandate/trusted_agents/{id}`](https://provenanceauth.com/docs/api/grants.md#delete-v1-mandate-trusted-agents-id): Remove a trusted outside agent

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

## Example

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/trusted_agents/tra_01M7Z8C2D4F6H8J0K2M4N6P8Q0`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.delete(f"{api}/v1/mandate/trusted_agents/tra_01M7Z8C2D4F6H8J0K2M4N6P8Q0", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```
