# Agents

Registered agents, with suspension, the account-wide pause and per-agent stats.

Related guide: [Execution binding](https://provenanceauth.com/docs/mandate/guides/execution-binding.md)

## Endpoints

- `POST /v1/mandate/agents`: [Register an agent](#post-v1-mandate-agents)
- `GET /v1/mandate/agents/{id}`: [Retrieve an agent](#get-v1-mandate-agents-id)
- `GET /v1/mandate/agents/{id}/stats`: [Get an agent's stats](#get-v1-mandate-agents-id-stats)
- `GET /v1/mandate/agents/{id}/defaults`: [Get an agent's defaults](#get-v1-mandate-agents-id-defaults)
- `GET /v1/mandate/settings/agent_pause`: [Get the agent pause](#get-v1-mandate-settings-agent-pause)
- `PATCH /v1/mandate/agents/{id}`: [Update an agent](#patch-v1-mandate-agents-id)
- `PUT /v1/mandate/agents/{id}/defaults`: [Set an agent's defaults](#put-v1-mandate-agents-id-defaults)
- `PUT /v1/mandate/agents/{id}/connect_url`: [Set an agent's Connect URL](#put-v1-mandate-agents-id-connect-url)
- `GET /v1/mandate/agents`: [List agents](#get-v1-mandate-agents)
- `DELETE /v1/mandate/agents/{id}`: [Delete an agent](#delete-v1-mandate-agents-id)
- `POST /v1/mandate/agents/{id}/suspend`: [Suspend an agent](#post-v1-mandate-agents-id-suspend)
- `POST /v1/mandate/agents/{id}/unsuspend`: [Unsuspend an agent](#post-v1-mandate-agents-id-unsuspend)
- `POST /v1/mandate/agents/pause_all`: [Pause every agent](#post-v1-mandate-agents-pause-all)
- `POST /v1/mandate/agents/resume_all`: [Resume every agent](#post-v1-mandate-agents-resume-all)
- `PATCH /v1/mandate/agents/{id}/reputation`: [Show your agent's record](#patch-v1-mandate-agents-id-reputation)

## The agent object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Unique identifier for the object. |
| `object` | enum | yes | The type of object. One of `agent`. |
| `name` | string | no | A name you choose. |
| `description` | string \| null | no | A longer description. |
| `status` | string | no | The object's current status. |
| `category` | string \| null | no | What kind of agent it is (search_crawler, ai_training_crawler, ai_assistant_fetch, shopping_agent, monitoring or other_agent). |
| `defaults` | object | no | Present once you set defaults for the agent (`PUT /v1/mandate/agents/{id}/defaults`): `ask_above`, `over_limit` and `over_usual`, each present only when set. |
| `defaults.ask_above` | object | no | `{ percent_of_budget }` or `{ amount }`: a purchase over it asks a person. |
| `defaults.over_limit` | object | no | `{ percent }` or `{ amount }`: how far past a limit a person is still asked. |
| `defaults.over_usual` | object | no | `{ percent }`: how far over the person's usual spend in a category a purchase asks a person. |
| `selling` | boolean | no | Present on a seller agent: it signs offers other agents accept. |
| `seller_origin` | string \| null | no | Present on a seller agent: the origin that publishes /.well-known/provenance-agent.json. |
| `domain_verified` | boolean | no | Present on a seller agent: whether a check within 48 hours found it in that file. |
| `seller_checked_at` | string \| null | no | Present on a seller agent. When the origin was last checked. |
| `seller_check_status` | string \| null | no | Present on a seller agent: verified, failed or unreachable. |
| `takeover_risk` | enum | no | The agent's takeover verdict; `learning` for its first 7 days. One of `none`, `learning`, `elevated`, `high`. |
| `takeover_reasons` | array of strings | no | The reason codes behind an open verdict. |
| `created_at` | string | no | When it was created. |
| `last_seen_at` | any \| null | no | When it was last used; null if never. |
| `last_integration` | string | no | The framework integration the agent's last call declared in its `User-Agent` (`mcp`, `ai_sdk`, `langchain`, `langchain_py`, `claude_agent_sdk`, `claude_agent_sdk_py`, `openai_agents`, `openai_agents_py`, `adk_py` or `crewai_py`). Present once a call has declared one; the client declares it, so treat it as a label. |
| `deleted` | boolean | no | Always true for a deleted object. |

### Example

```json
{
  "id": "agt_01M6VQBCJG6NR05PCX06VBCKS5",
  "object": "agent",
  "name": "invoice-bot",
  "description": "Pays approved supplier invoices",
  "status": "active",
  "category": null,
  "created_at": "2026-11-07T19:21:46.320Z",
  "last_seen_at": null,
  "takeover_risk": "learning",
  "takeover_reasons": []
}
```

## Events

Sent to your [webhook endpoints](https://provenanceauth.com/docs/integrate/webhooks.md) when they subscribe:

- `mandate.agent_pause.started`
- `mandate.agent_pause.ended`

## Register an agent

`POST /v1/mandate/agents`

Registers an agent, so its tokens, decisions and alerts carry its ID and it can be suspended. Registration is optional.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | no | Retry a create safely: the same key + request returns the stored response (24 h, per caller). |
| `name` | body | string | yes | A name you choose. |
| `description` | body | string | no | A longer description. |
| `category` | body | enum | no | What kind of agent this is, shown to sites in verdicts and in the agent's card. One of `search_crawler`, `ai_training_crawler`, `ai_assistant_fetch`, `shopping_agent`, `monitoring`, `other_agent`. |

### Returns

The agent. See [the agent object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "invoice-bot",
    "description": "Pays approved supplier invoices"
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "invoice-bot",
    "description": "Pays approved supplier invoices"
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "invoice-bot",
    "description": "Pays approved supplier invoices"
}).json()
```

### Response 201

```json
{
  "id": "agt_01M6VQBCJG6NR05PCX06VBCKS5",
  "object": "agent",
  "name": "invoice-bot",
  "description": "Pays approved supplier invoices",
  "status": "active",
  "category": null,
  "created_at": "2026-11-07T19:21:46.320Z",
  "last_seen_at": null,
  "takeover_risk": "learning",
  "takeover_reasons": []
}
```

## Retrieve an agent

`GET /v1/mandate/agents/{id}`

Returns a registered agent.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The object's ID. |

### Returns

The agent. See [the agent object](#object).

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "invoice-bot" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "invoice-bot" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "invoice-bot"
}).json()
agent_id = step1["id"]
data = httpx.get(f"{api}/v1/mandate/agents/{agent_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "agt_01M6VQBCJGVNN5HQRH7AXQVCXH",
  "object": "agent",
  "name": "invoice-bot",
  "description": null,
  "status": "active",
  "category": null,
  "created_at": "2026-11-07T19:21:46.320Z",
  "last_seen_at": null,
  "takeover_risk": "learning",
  "takeover_reasons": []
}
```

## Get an agent's stats

`GET /v1/mandate/agents/{id}/stats`

Returns an agent's decisions, deny rate and deny reasons over a time window, from the decision ledger.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The object's ID. |
| `created_gte` | query | string | no | The start of the time window, as an ISO 8601 time. |
| `created_lte` | query | string | no | The end of the time window, as an ISO 8601 time. |

### Returns

The agent's decisions in the window, by result, with the deny rate.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "invoice-bot" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/stats" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "invoice-bot" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/stats`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "invoice-bot"
}).json()
agent_id = step1["id"]
data = httpx.get(f"{api}/v1/mandate/agents/{agent_id}/stats", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "agent_stats",
  "agent_id": "agt_01M6VQBCJQSPX0ASG1TKSEMAJS",
  "name": "invoice-bot",
  "status": "active",
  "last_seen_at": null,
  "total_decisions": 0,
  "by_result": {
    "valid": 0,
    "denied": 0,
    "pending": 0
  },
  "deny_rate": 0,
  "deny_reasons": {}
}
```

## Get an agent's defaults

`GET /v1/mandate/agents/{id}/defaults`

Returns what you set for this agent: the line over which a purchase asks a person (`ask_above`) and how far past a limit a person is still asked (`over_limit`). Every key is present, null when not set. `workspace_default` is what applies when `over_limit` is null.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The object's ID. |

### Returns

The agent's defaults.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Rooms" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -s -X PUT "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/defaults" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ask_above": {
      "percent_of_budget": 20
    },
    "over_limit": {
      "percent": 20
    },
    "over_usual": {
      "percent": 50
    }
  }' > /dev/null
curl "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/defaults" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "Rooms" }),
})).json();
const agentId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/defaults`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "ask_above": {
      "percent_of_budget": 20
    },
    "over_limit": {
      "percent": 20
    },
    "over_usual": {
      "percent": 50
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/defaults`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Rooms"
}).json()
agent_id = step1["id"]
step2 = httpx.put(f"{api}/v1/mandate/agents/{agent_id}/defaults", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "ask_above": {
        "percent_of_budget": 20
    },
    "over_limit": {
        "percent": 20
    },
    "over_usual": {
        "percent": 50
    }
}).json()
data = httpx.get(f"{api}/v1/mandate/agents/{agent_id}/defaults", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "agent_defaults",
  "agent_id": "agt_01M84S05E1MR4PZA7BEMNS6X95",
  "ask_above": {
    "percent_of_budget": 20
  },
  "over_limit": {
    "percent": 20
  },
  "over_usual": {
    "percent": 50
  },
  "workspace_default": {
    "over_limit": {
      "percent": 20
    }
  },
  "usual_spend": {
    "window_days": 90,
    "min_purchases": 5
  },
  "updated_at": "2026-11-23T17:59:27.430Z"
}
```

## Get the agent pause

`GET /v1/mandate/settings/agent_pause`

Returns whether every agent on the account is paused, who paused and why. An agent can check this before it starts work; while paused, every authorize and decision answers `agents_paused`.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

No parameters.

### Returns

The pause.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/settings/agent_pause" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

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

**Python**

```python
import os
import httpx

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

### Response 200

```json
{
  "object": "agent_pause",
  "paused": false,
  "paused_at": null,
  "paused_by": null,
  "paused_by_email": null,
  "reason": null,
  "runs_halted": 0
}
```

## Update an agent

`PATCH /v1/mandate/agents/{id}`

Changes an agent's name or description.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The object's ID. |
| `name` | body | string | no | A name you choose. |
| `description` | body | string \| null | no | A longer description. |
| `category` | body | enum | no | The agent's category. One of `search_crawler`, `ai_training_crawler`, `ai_assistant_fetch`, `shopping_agent`, `monitoring`, `other_agent`. |
| `selling` | body | boolean | no | Mark it a seller agent (it needs an active Identify signing key and a seller_origin). |
| `seller_origin` | body | string \| null | no | The https origin that publishes /.well-known/provenance-agent.json. Changing it clears the last check. |
| `responder_mcp` | body | boolean | no | Turn the responder tools on the MCP server on or off for this agent (an owner or admin; on needs an active Identify signing key, since its proposals are signed with it). |

### Returns

The updated agent. See [the agent object](#object).

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "invoice-bot" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -X PATCH "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "description": "Pays approved supplier invoices up to $5,000" }'
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "invoice-bot" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}`, {
  method: "PATCH",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "description": "Pays approved supplier invoices up to $5,000" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "invoice-bot"
}).json()
agent_id = step1["id"]
data = httpx.patch(f"{api}/v1/mandate/agents/{agent_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "description": "Pays approved supplier invoices up to $5,000"
}).json()
```

### Response 200

```json
{
  "id": "agt_01M6VQBCJJ8WWPEBP22MA5KF7C",
  "object": "agent",
  "name": "invoice-bot",
  "description": "Pays approved supplier invoices up to $5,000",
  "status": "active",
  "category": null,
  "created_at": "2026-11-07T19:21:46.322Z",
  "last_seen_at": null,
  "takeover_risk": "learning",
  "takeover_reasons": []
}
```

## Set an agent's defaults

`PUT /v1/mandate/agents/{id}/defaults`

Replaces the agent's defaults (a key left out or null is cleared). They apply to every grant the agent holds, after the grant's own settings. `ask_above` is a line that asks a person; `over_limit` is the margin past a limit within which a person is asked; `over_usual` asks about a purchase that far over the person's usual spend in its category, once they have five there.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The object's ID. |
| `ask_above` | body | object \| any \| null | no | `{ percent_of_budget }` (over 0, up to 100) or `{ amount }`; null clears it. |
| `ask_above.percent_of_budget` | body | number | no | The share of the grant's budget as a percentage. |
| `ask_above.amount` | body | number | no | An amount in the grant's currency. |
| `over_limit` | body | object \| any \| null | no | `{ percent }` (0 to 1000) or `{ amount }`; null clears it. |
| `over_limit.percent` | body | number | no | The margin as a percentage of the limit. |
| `over_limit.amount` | body | number | no | The margin as an amount in the grant's currency. |
| `over_usual` | body | object \| any \| null | no | How far over the person's usual spend in a category to ask, in percent; null to turn it off. A percentage only. |
| `over_usual.percent` | body | number | no | How far over the usual spend, in percent. |

### Returns

The defaults as saved.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Rooms" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -X PUT "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/defaults" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ask_above": {
      "percent_of_budget": 20
    },
    "over_limit": {
      "percent": 20
    },
    "over_usual": {
      "percent": 50
    }
  }'
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "Rooms" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/defaults`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "ask_above": {
      "percent_of_budget": 20
    },
    "over_limit": {
      "percent": 20
    },
    "over_usual": {
      "percent": 50
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Rooms"
}).json()
agent_id = step1["id"]
data = httpx.put(f"{api}/v1/mandate/agents/{agent_id}/defaults", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "ask_above": {
        "percent_of_budget": 20
    },
    "over_limit": {
        "percent": 20
    },
    "over_usual": {
        "percent": 50
    }
}).json()
```

### Response 200

```json
{
  "object": "agent_defaults",
  "agent_id": "agt_01M84S05EB3EVTGT8R71BKYYXW",
  "ask_above": {
    "percent_of_budget": 20
  },
  "over_limit": {
    "percent": 20
  },
  "over_usual": {
    "percent": 50
  },
  "workspace_default": {
    "over_limit": {
      "percent": 20
    }
  },
  "usual_spend": {
    "window_days": 90,
    "min_purchases": 5
  },
  "updated_at": "2026-11-23T17:59:27.436Z"
}
```

## Set an agent's Connect URL

`PUT /v1/mandate/agents/{id}/connect_url`

Where a person who picks this agent in Provenance continues, with `provenance_connect` added. It must be https. `null` removes it, and the home then says to ask the agent to connect.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The agent's ID. |
| `connect_url` | body | string \| null | yes | An https URL, or null. |

### Returns

The Connect URL.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X PUT "$PROVENANCE_API/v1/mandate/agents/agt_01M5ZK3Q8D7C4E2B9A6F5G1H0J/connect_url" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connect_url": "https://cartwise.example/connect" }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/agt_01M5ZK3Q8D7C4E2B9A6F5G1H0J/connect_url`, {
  method: "PUT",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ "connect_url": "https://cartwise.example/connect" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.put(f"{api}/v1/mandate/agents/agt_01M5ZK3Q8D7C4E2B9A6F5G1H0J/connect_url", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "connect_url": "https://cartwise.example/connect"
}).json()
```

### Response 200

```json
{
  "id": "agt_01M5ZK3Q8D7C4E2B9A6F5G1H0J",
  "object": "agent_connect_url",
  "connect_url": "https://cartwise.example/connect"
}
```

## List agents

`GET /v1/mandate/agents`

Lists the agents registered on your account.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `q` | query | string | no | Search text. Matches when the agent's name, ID or description contains it, ignoring case. At most 200 characters. |
| `status` | query | array of enums | no | Only agents in these statuses. One value, or several separated by commas. |

### Returns

The account's agents.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

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

**Python**

```python
import os
import httpx

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

### Response 200

```json
{
  "object": "list",
  "data": [],
  "has_more": false,
  "next_cursor": null
}
```

## Delete an agent

`DELETE /v1/mandate/agents/{id}`

Deletes a registered agent. Its past decisions keep its ID.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The object's ID. |

### Returns

The deleted object. See [the agent object](#object).

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "invoice-bot" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "invoice-bot" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "invoice-bot"
}).json()
agent_id = step1["id"]
data = httpx.delete(f"{api}/v1/mandate/agents/{agent_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "agt_01M6VQBCJKGYPEP46CYB49HPVM",
  "object": "agent",
  "deleted": true
}
```

## Suspend an agent

`POST /v1/mandate/agents/{id}/suspend`

Suspends an agent. It can't authorize new actions, and verifying its existing tokens fails with agent_suspended.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | no | Retry a create safely: the same key + request returns the stored response (24 h, per caller). |
| `id` | path | string | yes | The object's ID. |

### Returns

The agent, now suspended. See [the agent object](#object).

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "invoice-bot" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/suspend" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "invoice-bot" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/suspend`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "invoice-bot"
}).json()
agent_id = step1["id"]
data = httpx.post(f"{api}/v1/mandate/agents/{agent_id}/suspend", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "agt_01M6VQBCJMTSD15FZRHKJZDWMM",
  "object": "agent",
  "name": "invoice-bot",
  "description": null,
  "status": "suspended",
  "category": null,
  "created_at": "2026-11-07T19:21:46.324Z",
  "last_seen_at": null,
  "takeover_risk": "learning",
  "takeover_reasons": []
}
```

## Unsuspend an agent

`POST /v1/mandate/agents/{id}/unsuspend`

Reactivates a suspended agent.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | no | Retry a create safely: the same key + request returns the stored response (24 h, per caller). |
| `id` | path | string | yes | The object's ID. |

### Returns

The agent, active again. See [the agent object](#object).

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "invoice-bot" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/suspend" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
curl -X POST "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/unsuspend" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "invoice-bot" }),
})).json();
const agentId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/suspend`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/unsuspend`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "invoice-bot"
}).json()
agent_id = step1["id"]
step2 = httpx.post(f"{api}/v1/mandate/agents/{agent_id}/suspend", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
data = httpx.post(f"{api}/v1/mandate/agents/{agent_id}/unsuspend", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "agt_01M6VQBCJNP8YZTENX9JNHENJ6",
  "object": "agent",
  "name": "invoice-bot",
  "description": null,
  "status": "active",
  "category": null,
  "created_at": "2026-11-07T19:21:46.325Z",
  "last_seen_at": null,
  "takeover_risk": "learning",
  "takeover_reasons": []
}
```

## Pause every agent

`POST /v1/mandate/agents/pause_all`

Pauses every agent on the account for an incident: new intents are refused (403 `agents_paused`), decisions on existing tokens are denied and call checks are refused. `halt_runs` also halts active runs. Owner or admin, from a console session, with a recent second-factor check. Sends `mandate.agent_pause.started`.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `halt_runs` | body | boolean | no | Also halt every active run (default false). |
| `reason` | body | string | no | A note for the banner, the security event and the webhook. |

### Returns

The pause.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`csrf_invalid`](https://provenanceauth.com/docs/platform/errors.md#csrf_invalid)
- [`dashboard_session_required`](https://provenanceauth.com/docs/platform/errors.md#dashboard_session_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`recent_two_factor_required`](https://provenanceauth.com/docs/platform/errors.md#recent_two_factor_required)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/mandate/agents/pause_all" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "halt_runs": true, "reason": "Refunds going to an unknown payee" }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/pause_all`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ "halt_runs": true, "reason": "Refunds going to an unknown payee" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/agents/pause_all", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "halt_runs": True,
    "reason": "Refunds going to an unknown payee"
}).json()
```

### Response 200

```json
{
  "object": "agent_pause",
  "paused": true,
  "paused_at": "2026-11-08T16:04:22.381Z",
  "paused_by": "usr_01M5R0C0555A43E2PW7SB25YVG",
  "paused_by_email": "maya@pellowmarsh.example",
  "reason": "Refunds going to an unknown payee",
  "runs_halted": 2,
  "already": false
}
```

## Resume every agent

`POST /v1/mandate/agents/resume_all`

Lifts the account-wide pause, so agents can act again. Runs halted with the pause stay halted and their revoked grants stay revoked; agents suspended one by one stay suspended. Owner or admin, from a signed-in console session, with a second-factor check from the last 10 minutes. Sends `mandate.agent_pause.ended` and records a security event. Resuming an account that isn't paused changes nothing.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

No parameters.

### Returns

The pause, lifted.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/mandate/agents/resume_all" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/resume_all`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/agents/resume_all", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
```

### Response 200

```json
{
  "object": "agent_pause",
  "paused": false,
  "paused_at": null,
  "paused_by": null,
  "paused_by_email": null,
  "reason": null,
  "runs_halted": 0,
  "already": false
}
```

## Show your agent's record

`PATCH /v1/mandate/agents/{id}/reputation`

Show our record: with `show_record: true`, the agent's public card carries its network record, with the same minimums merchants get.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Your agent's ID. |
| `show_record` | body | boolean | no | Show the record on the public card. |
| `listed` | body | boolean | no | List the agent in the public agent directory (default true). |

### Returns

The setting.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Cartwise" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -X PATCH "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/reputation" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "show_record": true }'
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "Cartwise" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/reputation`, {
  method: "PATCH",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "show_record": true }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Cartwise"
}).json()
agent_id = step1["id"]
data = httpx.patch(f"{api}/v1/mandate/agents/{agent_id}/reputation", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "show_record": True
}).json()
```

### Response 200

```json
{
  "object": "agent_reputation",
  "agent_id": "agt_01M6VQDE8X0VPCWT60X0FDNAJY",
  "show_record": true,
  "listed": true
}
```
