# Network

Network mandates: one permission a person gives an agent, honoured at every store that accepts Provenance. Stores accept each order online.

Related guide: [Network grants](https://provenanceauth.com/docs/mandate/concepts/network-grants.md)

## Endpoints

- `POST /v1/authorize/stores`: [Register a store origin](#post-v1-authorize-stores)
- `POST /v1/mandate/connect_codes`: [Create a connect code](#post-v1-mandate-connect-codes)
- `POST /v1/mandate/network_grants/{id}/delegate`: [Add one subagent](#post-v1-mandate-network-grants-id-delegate)
- `GET /v1/mandate/agents/{id}/record`: [Get your agent's record](#get-v1-mandate-agents-id-record)
- `GET /v1/mandate/grant_requests/{id}`: [Get a network mandate request](#get-v1-mandate-grant-requests-id)
- `GET /v1/mandate/network_grants/{id}`: [Get a network mandate](#get-v1-mandate-network-grants-id)
- `GET /v1/mandate/delegation_plans/{id}`: [Get a plan of subagents](#get-v1-mandate-delegation-plans-id)
- `GET /v1/mandate/settings/limit_notices`: [Get the near-limit notice channels](#get-v1-mandate-settings-limit-notices)
- `GET /v1/mandate/agent_notes`: [Read people's notes](#get-v1-mandate-agent-notes)
- `PATCH /v1/authorize/stores/{id}`: [Update a store origin](#patch-v1-authorize-stores-id)
- `PUT /v1/mandate/settings/limit_notices`: [Set the near-limit notice channels](#put-v1-mandate-settings-limit-notices)
- `GET /v1/authorize/agent_reports`: [List your reports](#get-v1-authorize-agent-reports)
- `GET /v1/authorize/stores`: [List your store origins](#get-v1-authorize-stores)
- `GET /v1/public/stores`: [List the store directory](#get-v1-public-stores)
- `GET /v1/public/agents`: [List the agent directory](#get-v1-public-agents)
- `GET /v1/mandate/network_grants`: [List your network mandates](#get-v1-mandate-network-grants)
- `DELETE /v1/authorize/stores/{id}`: [Remove a store origin](#delete-v1-authorize-stores-id)
- `POST /v1/authorize/agent_reports`: [Report an order](#post-v1-authorize-agent-reports)
- `DELETE /v1/authorize/agent_reports/{id}`: [Withdraw a report](#delete-v1-authorize-agent-reports-id)
- `POST /v1/mandate/agents/{id}/reports/{report_id}/dispute`: [Dispute a report](#post-v1-mandate-agents-id-reports-report-id-dispute)
- `POST /v1/authorize/stores/{id}/check`: [Check a store's proof now](#post-v1-authorize-stores-id-check)
- `GET /v1/public/stores/check`: [Check a store listing](#get-v1-public-stores-check)
- `POST /v1/mandate/connect_intents/redeem`: [Redeem a connect token](#post-v1-mandate-connect-intents-redeem)
- `POST /v1/mandate/connect_codes/token`: [Poll a connect code](#post-v1-mandate-connect-codes-token)
- `POST /v1/mandate/grant_requests`: [Ask a person for a network mandate](#post-v1-mandate-grant-requests)
- `POST /v1/mandate/network_grants/{id}/revoke`: [Revoke a network mandate](#post-v1-mandate-network-grants-id-revoke)
- `POST /v1/mandate/network_grants/{id}/delegation_plans`: [Propose a plan of subagents](#post-v1-mandate-network-grants-id-delegation-plans)
- `POST /v1/mandate/delegation_plans/{id}/revisions`: [Revise a plan of subagents](#post-v1-mandate-delegation-plans-id-revisions)
- `POST /v1/mandate/delegation_plans/{id}/withdraw`: [Withdraw a proposed plan](#post-v1-mandate-delegation-plans-id-withdraw)
- `POST /v1/mandate/approvals/{id}/answers`: [Answer a person's question](#post-v1-mandate-approvals-id-answers)
- `POST /v1/mandate/network_orders`: [Buy under a network mandate](#post-v1-mandate-network-orders)
- `POST /v1/authorize/network_orders/confirm`: [Confirm a network order](#post-v1-authorize-network-orders-confirm)
- `POST /v1/authorize/network_orders/cancel`: [Cancel a network order](#post-v1-authorize-network-orders-cancel)

## The delegation plan result object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `plan` | object | yes | A delegation plan (`dpl_…`): the subagents an agent hands part of a person's grant to, reviewed by the person. Versions count per grant; the id stays across versions. |
| `plan.id` | string | yes | `dpl_` + ULID. |
| `plan.object` | enum | yes | The type of object. One of `delegation_plan`. |
| `plan.version` | integer | yes | The plan version (versions count per grant). |
| `plan.status` | enum | yes | Where it stands. One of `proposed`, `accepted`, `declined`, `expired`, `withdrawn`, `superseded`. |
| `plan.network_grant_id` | string | yes | The grant the subagents are handed from. |
| `plan.task` | string | yes | The task in one line, shown as the plan's head. |
| `plan.proposed_by_agent_id` | string | no | The agent that proposed the plan. |
| `plan.edited_by` | enum | no | `person` when the person saved changes as this version. One of `agent`, `person`. |
| `plan.helpers` | array of objects | yes | The helpers, each a registered, verified agent. |
| `plan.helpers.key` | string | no | The helper's key, stable across versions. |
| `plan.helpers.agent` | object | no | The agent. |
| `plan.helpers.agent.id` | string | no | The ID. |
| `plan.helpers.agent.name` | string | no | The display name. |
| `plan.helpers.agent.maker` | object | no | The agent's maker, always named. |
| `plan.helpers.agent.maker.id` | string \| null | no | The ID. |
| `plan.helpers.agent.maker.name` | string \| null | no | The display name. |
| `plan.helpers.agent.verified` | boolean | no | A registered agent with an active signing key. |
| `plan.helpers.purpose` | string | no | What it is for. |
| `plan.helpers.budget` | object | no | A subagent's budget under a person's grant: its amount and its two settings. |
| `plan.helpers.budget.amount` | number \| null | no | In major units of the grant's currency. |
| `plan.helpers.budget.allocation` | enum | no | `reserved` (set aside from the parent) or `shared` (drawn from what the parent has left). One of `reserved`, `shared`. |
| `plan.helpers.budget.at_limit` | enum | no | `stop`, `ask` (up to `ask_up_to`) or `continue`. One of `stop`, `ask`, `continue`. |
| `plan.helpers.budget.ask_up_to` | object \| null | no | With `ask`: `{ percent }` or `{ amount }` past the amount; null asks at any amount the parent has room for. |
| `plan.helpers.budget.ask_up_to.percent` | number | no | The margin in percent of the amount. |
| `plan.helpers.budget.ask_up_to.amount` | number | no | The margin as a fixed amount. |
| `plan.helpers.limits` | object \| null | no | Its limits, each narrower than the grant's (null: the grant's). |
| `plan.helpers.active` | object \| null | no | Its dates inside the grant's (null: the grant's). |
| `plan.helpers.network_grant_id` | string \| null | no | The subagent's grant once the version is accepted. |
| `plan.budget` | object | no | The total of the helpers' budgets against the grant's budget. |
| `plan.budget.total` | number | no | What the helpers' budgets add up to. |
| `plan.budget.of` | number \| null | no | The grant's budget (null: none). |
| `plan.budget.currency` | string | no | ISO 4217. |
| `plan.available_helpers` | array of objects \| null | no | Registered agents the person may add from the review page. |
| `plan.requests_raise` | object \| null | no | More than the grant the plan asks for (null: none). |
| `plan.review` | object | no | How and until when the person reviews it. |
| `plan.review.mode` | enum | no | How the person reviews this agent's plans. One of `prompt`, `auto_accept`, `digest`, `first_time`. |
| `plan.review.url` | string \| null | no | The review page while the version is proposed. |
| `plan.review.expires_at` | timestamp | no | A proposed version expires unanswered then; it is never accepted by silence. |
| `plan.decided_at` | timestamp \| null | no | When the version was decided. |
| `plan.decided_via` | enum | no | Where it was decided: the people home, the app, a link, at once, or in the digest. One of `home`, `app`, `link`, `auto`, `digest`. |
| `plan.created_at` | timestamp | no | When the version was made. |
| `status` | enum | no | Where it stands. One of `accepted`, `proposed`. |
| `review` | object | no | On 202: the signed link to send the person ("Change the plan") and when the proposal expires. |
| `review.url` | string | no | The link to send the person. |
| `review.expires_at` | timestamp | no | When a proposed version expires unanswered. |
| `children` | array of objects | no | The helpers below it. |
| `children.object` | enum | no | The type of object. One of `network_grant`. |
| `children.network_grant_id` | string | no | The subagent's grant (`ngr_…`). |
| `children.parent_id` | string | no | The grant it was handed from. |
| `children.agent_id` | string | no | The registered agent. |
| `children.plan_id` | string | no | The plan it was minted from. |
| `children.plan_version` | integer | no | The plan version it was minted or changed by. |
| `children.plan_helper_key` | string | no | The helper's key in the plan. |
| `children.purpose` | string \| null | no | What it is for. |
| `children.budget` | object | no | The helper's budget. |
| `children.constraints` | object | no | A network mandate's limits. The person's rules apply on top. |
| `children.constraints.max_amount` | number \| null | no | Per-order limit, in major units. |
| `children.constraints.budget_amount` | number \| null | no | Budget per `budget_window`, in major units. |
| `children.constraints.budget_window` | enum | no | The budget window, counted in UTC. One of `day`, `week`, `month`. |
| `children.constraints.currency` | string | yes | ISO 4217; an order in another currency is refused. |
| `children.constraints.allowed_stores` | array of strings \| null | no | Store origins it may buy at without asking; null for any store. |
| `children.constraints.blocked_stores` | array of strings | no | Store origins it must never buy at. |
| `children.constraints.allowed_categories` | array of enums | no | Store categories it may buy at without asking (the store directory's list); empty for any. |
| `children.constraints.heartbeat` | object \| null | no | Check-ins (`interval`: weekly, biweekly or monthly; `grace_hours`); it stops if the person doesn't confirm. |
| `children.constraints.expires_at` | timestamp | yes | At most a year out. |
| `children.constraints.purpose` | string | no | What the permission is for, in plain text ("Restock printer paper for the office"). Set by the request and shown on the grant screen; the person sets the limits, not the purpose. Present when set. |
| `children.constraints.accept_within` | object | no | How far an outside agent's offer may differ from a brief before the person is asked (`constraints.accept_within` on a grant). Every field is optional; a child grant inherits what it leaves out and can't loosen a field, nor set one its parent leaves out (past the strictest value). With none anywhere in the chain, only an offer no worse in every way is accepted alone. Never on the grant token. |
| `children.constraints.accept_within.price_up_pct` | number | no | The most the price may rise, as a percentage of the brief's price line. |
| `children.constraints.accept_within.price_up_amount` | number | no | The most the price may rise, in the grant's currency (major units). Both price fields must pass when both are set. |
| `children.constraints.accept_within.date_earlier_minutes` | integer | no | How much earlier a date may move. |
| `children.constraints.accept_within.date_later_minutes` | integer | no | How much later a date may move. |
| `children.constraints.accept_within.substitutes` | enum | no | Whether a substitute item in the brief line's category may be accepted. One of `none`, `same_category`. |
| `children.constraints.accept_within.quantity_short` | enum | no | Whether an offer of part of the quantity may be accepted. One of `none`, `partial`. |
| `children.constraints.accept_within.terms_worse` | boolean | no | Whether worse terms (not refundable, an earlier cancellation deadline, a change fee, later delivery) may be accepted. |
| `children.constraints.accept_within.other_seller` | boolean | no | Whether a seller other than the brief's counterparties may be accepted. |
| `children.constraints.accept_within.on_timeout` | enum | no | What happens when the person doesn't answer an ask (default `decline`). Asks arrive in a later slice. One of `decline`, `accept_within_tolerances`. |
| `children.constraints.payment_card` | object \| null | no | The card this grant pays with (`personal_card_id`), checked only where Provenance decides the payment. Present when set; never in a token. |
| `children.constraints.payment_card.personal_card_id` | string | no | The person's card (`pcard_…`). |
| `children.created` | boolean | no | False when an existing subagent grant changed instead. |
| `children.network_mandate` | string \| null | no | The subagent's grant token when your account holds it; another maker gets it on its own `mandate.network_grant.delegated`. |

### Example

```json
{
  "plan": {
    "id": "dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1",
    "object": "delegation_plan",
    "version": 1,
    "status": "accepted",
    "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
    "task": "Lisbon trip, Dec 9 to 13",
    "proposed_by_agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R7",
    "edited_by": "agent",
    "helpers": [
      {
        "key": "flights",
        "agent": {
          "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
          "name": "Flights",
          "maker": {
            "id": "acct_scout",
            "name": "scout.example"
          },
          "verified": true
        },
        "purpose": "Book the flights",
        "budget": {
          "amount": 1100,
          "allocation": "reserved",
          "at_limit": "stop",
          "ask_up_to": null
        },
        "limits": null,
        "active": null,
        "network_grant_id": null
      },
      {
        "key": "rooms",
        "agent": {
          "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R2",
          "name": "Rooms",
          "maker": {
            "id": "acct_scout",
            "name": "scout.example"
          },
          "verified": true
        },
        "purpose": "Book the hotel",
        "budget": {
          "amount": 900,
          "allocation": "shared",
          "at_limit": "ask",
          "ask_up_to": {
            "percent": 10
          }
        },
        "limits": {
          "allowed_stores": [
            "https://casamarlinde.example"
          ],
          "allowed_categories": [
            "travel"
          ]
        },
        "active": null,
        "network_grant_id": null
      }
    ],
    "budget": {
      "total": 2000,
      "of": 2400,
      "currency": "USD"
    },
    "available_helpers": null,
    "requests_raise": null,
    "review": {
      "mode": "auto_accept",
      "expires_at": "2026-11-27T19:00:00.000Z",
      "url": "https://app.provenanceauth.com/me/plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1"
    },
    "decided_at": "2026-11-26T19:00:00.000Z",
    "decided_via": "auto",
    "created_at": "2026-11-26T19:00:00.000Z"
  },
  "status": "accepted",
  "children": []
}
```

## Events

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

- `mandate.network_grant.granted`
- `mandate.network_grant.updated`
- `mandate.network_grant.revoked`
- `mandate.network_grant.renewed`
- `mandate.network_grant.limit_near`
- `mandate.network_grant.delegated`
- `mandate.network_grant.stopped`
- `mandate.delegation_plan.proposed`
- `mandate.delegation_plan.accepted`
- `mandate.delegation_plan.changed`
- `mandate.delegation_plan.declined`
- `mandate.delegation_plan.expired`
- `mandate.agent_note.created`
- `authorize.network_report.filed`

## Register a store origin

`POST /v1/authorize/stores`

Registers an origin for the store directory. Publish the returned proof; the origin is listed once the proof checks out and you use Provenance there.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `origin` | body | string | yes | The https origin, such as https://shop.example. |

### Returns

The store origin.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`network_store_taken`](https://provenanceauth.com/docs/platform/errors.md#network_store_taken)
- [`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/authorize/stores" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "origin": "https://shop.quillstack.example" }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/stores`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "origin": "https://shop.quillstack.example" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/stores", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "origin": "https://shop.quillstack.example"
}).json()
```

### Response 201

```json
{
  "id": "nst_01M6VQDE8Z6NF9ZG6D1TFDAY87",
  "object": "network_store",
  "origin": "https://shop.quillstack.example",
  "listing": "pending",
  "listed": false,
  "unlisted": false,
  "proof": {
    "method": null,
    "status": "pending",
    "checked_at": null,
    "verified_at": null,
    "well_known_url": "https://shop.quillstack.example/.well-known/provenance-store.json",
    "well_known_body": {
      "store_id": "nst_01M6VQDE8Z6NF9ZG6D1TFDAY87"
    },
    "dns_name": "_provenance.shop.quillstack.example",
    "dns_value": "provenance-store=nst_01M6VQDE8Z6NF9ZG6D1TFDAY87"
  },
  "categories": [],
  "accepts": [],
  "last_activity_at": null,
  "first_listed_at": null,
  "created_at": "2026-11-07T19:22:53.599Z"
}
```

## Create a connect code

`POST /v1/mandate/connect_codes`

A code your agent shows its person (RFC 8628). They enter it in Provenance at `verification_url` and set the limits; poll `/v1/mandate/connect_codes/token` with `device_code` every `interval` seconds. Codes are 8 letters, single-use, and last 10 minutes. With a screen, also show `verification_url_complete` as a QR code.

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). |
| `agent_id` | body | string | yes | Your registered agent. |
| `proposed` | body | object | yes | A network mandate's limits. The person's rules apply on top. |
| `proposed.max_amount` | body | number \| null | no | Per-order limit, in major units. |
| `proposed.budget_amount` | body | number \| null | no | Budget per `budget_window`, in major units. |
| `proposed.budget_window` | body | enum | no | The budget window, counted in UTC. One of `day`, `week`, `month`. |
| `proposed.currency` | body | string | yes | ISO 4217; an order in another currency is refused. |
| `proposed.allowed_stores` | body | array of strings \| null | no | Store origins it may buy at without asking; null for any store. |
| `proposed.blocked_stores` | body | array of strings | no | Store origins it must never buy at. |
| `proposed.allowed_categories` | body | array of enums | no | Store categories it may buy at without asking (the store directory's list); empty for any. |
| `proposed.heartbeat` | body | object \| null | no | Check-ins (`interval`: weekly, biweekly or monthly; `grace_hours`); it stops if the person doesn't confirm. |
| `proposed.expires_at` | body | timestamp | yes | At most a year out. |
| `proposed.purpose` | body | string | no | What the permission is for, in plain text ("Restock printer paper for the office"). Set by the request and shown on the grant screen; the person sets the limits, not the purpose. Present when set. |
| `proposed.accept_within` | body | object | no | How far an outside agent's offer may differ from a brief before the person is asked (`constraints.accept_within` on a grant). Every field is optional; a child grant inherits what it leaves out and can't loosen a field, nor set one its parent leaves out (past the strictest value). With none anywhere in the chain, only an offer no worse in every way is accepted alone. Never on the grant token. |
| `proposed.accept_within.price_up_pct` | body | number | no | The most the price may rise, as a percentage of the brief's price line. |
| `proposed.accept_within.price_up_amount` | body | number | no | The most the price may rise, in the grant's currency (major units). Both price fields must pass when both are set. |
| `proposed.accept_within.date_earlier_minutes` | body | integer | no | How much earlier a date may move. |
| `proposed.accept_within.date_later_minutes` | body | integer | no | How much later a date may move. |
| `proposed.accept_within.substitutes` | body | enum | no | Whether a substitute item in the brief line's category may be accepted. One of `none`, `same_category`. |
| `proposed.accept_within.quantity_short` | body | enum | no | Whether an offer of part of the quantity may be accepted. One of `none`, `partial`. |
| `proposed.accept_within.terms_worse` | body | boolean | no | Whether worse terms (not refundable, an earlier cancellation deadline, a change fee, later delivery) may be accepted. |
| `proposed.accept_within.other_seller` | body | boolean | no | Whether a seller other than the brief's counterparties may be accepted. |
| `proposed.accept_within.on_timeout` | body | enum | no | What happens when the person doesn't answer an ask (default `decline`). Asks arrive in a later slice. One of `decline`, `accept_within_tolerances`. |
| `proposed.payment_card` | body | object \| null | no | The card this grant pays with (`personal_card_id`), checked only where Provenance decides the payment. Present when set; never in a token. |
| `proposed.payment_card.personal_card_id` | body | string | no | The person's card (`pcard_…`). |

### Returns

The code to show, and the device code to keep.

### 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 POST "$PROVENANCE_API/v1/mandate/connect_codes" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agt_01M5ZK3Q8D7C4E2B9A6F5G1H0J",
    "proposed": {
      "max_amount": 50,
      "budget_amount": 200,
      "budget_window": "month",
      "currency": "USD",
      "expires_at": "2027-06-30T00:00:00Z"
    }
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/connect_codes`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "agent_id": "agt_01M5ZK3Q8D7C4E2B9A6F5G1H0J",
    "proposed": {
      "max_amount": 50,
      "budget_amount": 200,
      "budget_window": "month",
      "currency": "USD",
      "expires_at": "2027-06-30T00:00:00Z"
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/connect_codes", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "agent_id": "agt_01M5ZK3Q8D7C4E2B9A6F5G1H0J",
    "proposed": {
        "max_amount": 50,
        "budget_amount": 200,
        "budget_window": "month",
        "currency": "USD",
        "expires_at": "2027-06-30T00:00:00Z"
    }
}).json()
```

### Response 201

```json
{
  "object": "connect_code",
  "id": "ncc_01M67Q5A8D7C4E2B9A6F5G1H0P",
  "user_code": "QSXT-BKLM",
  "device_code": "dvc_Wq3n8Vx2mB7tK9wR4yC1zD5fG6hJ0kLpS",
  "verification_url": "https://app.provenanceauth.com/me/connect/code",
  "verification_url_complete": "https://app.provenanceauth.com/me/connect/code?code=QSXT-BKLM",
  "expires_in": 600,
  "interval": 5,
  "expires_at": "2026-10-31T18:12:00.000Z"
}
```

## Add one subagent

`POST /v1/mandate/network_grants/{id}/delegate`

The one-subagent shortcut: proposes the live plan with this subagent added (or replaced, by `key`), or a one-subagent plan when none is live. Same responses as proposing a plan.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The person's network grant (`ngr_…`) the subagents are handed from: the agent's own, or a subagent grant below it. |
| `task` | body | string | no | The plan's head (defaults to the live plan's). |
| `helper` | body | object | yes | One subagent in a plan under a person's grant: a registered, verified agent, its purpose and its budget, each limit narrower than the grant. |
| `helper.key` | body | string | yes | Stable across versions ("flights"), so a revision says what changed. |
| `helper.agent_id` | body | string | yes | A registered agent with an active signing key; another maker's agent is named to the person with its maker. |
| `helper.purpose` | body | string | yes | What the subagent is for ("Book the flights"). |
| `helper.budget` | body | object | yes | The helper's budget and its two settings. |
| `helper.budget.amount` | body | number | yes | In major units of the grant's currency. |
| `helper.budget.allocation` | body | enum | no | `reserved`: set aside from the grant; other subagents can't spend it. `shared` (the default): drawn from what the grant has left. One of `reserved`, `shared`. |
| `helper.budget.at_limit` | body | enum | no | At the amount: `stop` refuses, `ask` asks the person up to `ask_up_to` past it, `continue` goes past without asking while the grant above has room. Default `ask` for `shared`, `stop` for `reserved`. One of `stop`, `ask`, `continue`. |
| `helper.budget.ask_up_to` | body | object \| null | no | With `ask` only: `{ percent }` (20 by default when left out) or `{ amount }` past the amount; null asks at any amount the grant has room for. |
| `helper.budget.ask_up_to.percent` | body | number | no | The margin in percent of the amount. |
| `helper.budget.ask_up_to.amount` | body | number | no | The margin as a fixed amount. |
| `helper.limits` | body | object \| null | no | Its limits, each narrower than the grant's (null: the grant's). |
| `helper.limits.max_amount` | body | number \| null | no | Per-order cap, at most the grant's. |
| `helper.limits.allowed_stores` | body | array of strings \| null | no | Within the grant's stores. A merchant lock: at any other store the subagent is refused (`outside_merchant_lock`), never asked. |
| `helper.limits.allowed_categories` | body | array of strings | no | Within the grant's categories. |
| `helper.limits.accept_within` | body | object | no | How far an outside agent's offer may differ from a brief before the person is asked (`constraints.accept_within` on a grant). Every field is optional; a child grant inherits what it leaves out and can't loosen a field, nor set one its parent leaves out (past the strictest value). With none anywhere in the chain, only an offer no worse in every way is accepted alone. Never on the grant token. |
| `helper.limits.accept_within.price_up_pct` | body | number | no | The most the price may rise, as a percentage of the brief's price line. |
| `helper.limits.accept_within.price_up_amount` | body | number | no | The most the price may rise, in the grant's currency (major units). Both price fields must pass when both are set. |
| `helper.limits.accept_within.date_earlier_minutes` | body | integer | no | How much earlier a date may move. |
| `helper.limits.accept_within.date_later_minutes` | body | integer | no | How much later a date may move. |
| `helper.limits.accept_within.substitutes` | body | enum | no | Whether a substitute item in the brief line's category may be accepted. One of `none`, `same_category`. |
| `helper.limits.accept_within.quantity_short` | body | enum | no | Whether an offer of part of the quantity may be accepted. One of `none`, `partial`. |
| `helper.limits.accept_within.terms_worse` | body | boolean | no | Whether worse terms (not refundable, an earlier cancellation deadline, a change fee, later delivery) may be accepted. |
| `helper.limits.accept_within.other_seller` | body | boolean | no | Whether a seller other than the brief's counterparties may be accepted. |
| `helper.limits.accept_within.on_timeout` | body | enum | no | What happens when the person doesn't answer an ask (default `decline`). Asks arrive in a later slice. One of `decline`, `accept_within_tolerances`. |
| `helper.active` | body | object \| null | no | The subagent's dates, inside the grant's. |
| `helper.active.from` | body | timestamp \| null | no | The first day. |
| `helper.active.until` | body | timestamp \| null | no | The last day. |

### Returns

Accepted at once under the person's review setting, with the subagent grants minted. See [the delegation plan result object](#object).

### Errors

- [`delegation_not_allowed`](https://provenanceauth.com/docs/platform/errors.md#delegation_not_allowed)
- [`delegation_exceeds_parent`](https://provenanceauth.com/docs/platform/errors.md#delegation_exceeds_parent)
- [`helper_not_verified`](https://provenanceauth.com/docs/platform/errors.md#helper_not_verified)
- [`external_helper_not_allowed`](https://provenanceauth.com/docs/platform/errors.md#external_helper_not_allowed)
- [`purpose_required`](https://provenanceauth.com/docs/platform/errors.md#purpose_required)
- [`delegation_depth_exceeded`](https://provenanceauth.com/docs/platform/errors.md#delegation_depth_exceeded)
- [`delegation_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#delegation_limit_reached)
- [`network_grant_inactive`](https://provenanceauth.com/docs/platform/errors.md#network_grant_inactive)
- [`chain_unavailable`](https://provenanceauth.com/docs/platform/errors.md#chain_unavailable)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`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/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5/delegate" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "helper": {
      "key": "dinner",
      "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0D3",
      "purpose": "Book dinner on the 11th",
      "budget": {
        "amount": 150,
        "allocation": "reserved",
        "at_limit": "stop"
      },
      "active": {
        "from": "2026-12-11T00:00:00Z",
        "until": "2026-12-12T00:00:00Z"
      }
    }
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5/delegate`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "helper": {
      "key": "dinner",
      "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0D3",
      "purpose": "Book dinner on the 11th",
      "budget": {
        "amount": 150,
        "allocation": "reserved",
        "at_limit": "stop"
      },
      "active": {
        "from": "2026-12-11T00:00:00Z",
        "until": "2026-12-12T00:00:00Z"
      }
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5/delegate", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "helper": {
        "key": "dinner",
        "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0D3",
        "purpose": "Book dinner on the 11th",
        "budget": {
            "amount": 150,
            "allocation": "reserved",
            "at_limit": "stop"
        },
        "active": {
            "from": "2026-12-11T00:00:00Z",
            "until": "2026-12-12T00:00:00Z"
        }
    }
}).json()
```

### Response 201

```json
{
  "plan": {
    "id": "dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1",
    "object": "delegation_plan",
    "version": 1,
    "status": "accepted",
    "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
    "task": "Lisbon trip, Dec 9 to 13",
    "proposed_by_agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R7",
    "edited_by": "agent",
    "helpers": [
      {
        "key": "flights",
        "agent": {
          "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
          "name": "Flights",
          "maker": {
            "id": "acct_scout",
            "name": "scout.example"
          },
          "verified": true
        },
        "purpose": "Book the flights",
        "budget": {
          "amount": 1100,
          "allocation": "reserved",
          "at_limit": "stop",
          "ask_up_to": null
        },
        "limits": null,
        "active": null,
        "network_grant_id": null
      },
      {
        "key": "rooms",
        "agent": {
          "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R2",
          "name": "Rooms",
          "maker": {
            "id": "acct_scout",
            "name": "scout.example"
          },
          "verified": true
        },
        "purpose": "Book the hotel",
        "budget": {
          "amount": 900,
          "allocation": "shared",
          "at_limit": "ask",
          "ask_up_to": {
            "percent": 10
          }
        },
        "limits": {
          "allowed_stores": [
            "https://casamarlinde.example"
          ],
          "allowed_categories": [
            "travel"
          ]
        },
        "active": null,
        "network_grant_id": null
      }
    ],
    "budget": {
      "total": 2000,
      "of": 2400,
      "currency": "USD"
    },
    "available_helpers": null,
    "requests_raise": null,
    "review": {
      "mode": "auto_accept",
      "expires_at": "2026-11-27T19:00:00.000Z",
      "url": "https://app.provenanceauth.com/me/plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1"
    },
    "decided_at": "2026-11-26T19:00:00.000Z",
    "decided_via": "auto",
    "created_at": "2026-11-26T19:00:00.000Z"
  },
  "status": "accepted",
  "children": []
}
```

## Get your agent's record

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

Your agent's network signals as merchants see them, with the counts behind them by week and the reports about it. No company names.

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

### Parameters

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

### Returns

The agent's record.

### 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": "Cartwise" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/record" \
  -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": "Cartwise" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/record`, {
  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": "Cartwise"
}).json()
agent_id = step1["id"]
data = httpx.get(f"{api}/v1/mandate/agents/{agent_id}/record", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "agent_record",
  "agent_id": "agt_01M6VQDE8R31W5QE6V4XZD307Y",
  "show_record": false,
  "listed": true,
  "network_signals": {
    "object": "network_signals",
    "contributing": true,
    "agent": {
      "agent_id": "agt_01M6VQDE8R31W5QE6V4XZD307Y",
      "verified": false,
      "months_active": null,
      "companies_count_bucket": null,
      "requests_30d_bucket": null,
      "approval_rate": null,
      "unrecognized_rate": null,
      "off_task_rate": null,
      "fraud_report_rate": null,
      "network_mandates_active_bucket": null,
      "sufficient_data": false
    }
  },
  "weeks": [],
  "reports": []
}
```

## Get a network mandate request

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

The request's status; once granted, `network_mandate` holds the token.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The request's ID (`nmr_…`). |

### Returns

The request.

### Errors

- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_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 -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "cartwise", "category": "shopping_agent" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/identify/agents/$AGENT_ID/signing_keys" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jwk": {
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY"
    }
  }' > /dev/null
curl -s -X POST "$PROVENANCE_API/v1/mandate/grant_requests" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"agent_id\": \"$AGENT_ID\",
    \"proposed\": {
      \"max_amount\": 50,
      \"currency\": \"USD\",
      \"expires_at\": \"2027-06-30T00:00:00Z\"
    }
  }" > step.json
export REQUEST_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/mandate/grant_requests/$REQUEST_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": "cartwise", "category": "shopping_agent" }),
})).json();
const agentId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/agents/${agentId}/signing_keys`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "jwk": {
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY"
    }
  }),
})).json();
const step3 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/grant_requests`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "agent_id": agentId,
    "proposed": {
      "max_amount": 50,
      "currency": "USD",
      "expires_at": "2027-06-30T00:00:00Z"
    }
  }),
})).json();
const requestId = step3.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/grant_requests/${requestId}`, {
  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": "cartwise",
    "category": "shopping_agent"
}).json()
agent_id = step1["id"]
step2 = httpx.post(f"{api}/v1/identify/agents/{agent_id}/signing_keys", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "jwk": {
        "kty": "OKP",
        "crv": "Ed25519",
        "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY"
    }
}).json()
step3 = httpx.post(f"{api}/v1/mandate/grant_requests", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "agent_id": agent_id,
    "proposed": {
        "max_amount": 50,
        "currency": "USD",
        "expires_at": "2027-06-30T00:00:00Z"
    }
}).json()
request_id = step3["id"]
data = httpx.get(f"{api}/v1/mandate/grant_requests/{request_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "ngrq_01M6VQDE8AS5NTKJ7DVWA5AR16",
  "object": "network_grant_request",
  "status": "pending",
  "agent_id": "agt_01M6VQDE89891M6XGSNBJYN6RG",
  "proposed": {
    "max_amount": 50,
    "budget_amount": null,
    "budget_window": null,
    "currency": "USD",
    "allowed_stores": null,
    "blocked_stores": [],
    "allowed_categories": [],
    "heartbeat": null,
    "expires_at": "2027-06-30T00:00:00.000Z"
  },
  "return_url": null,
  "network_grant_id": null,
  "created_at": "2026-11-07T19:22:53.578Z",
  "decided_at": null,
  "expires_at": "2026-11-08T19:22:53.578Z"
}
```

## Get a network mandate

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

One network mandate your agent holds.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The mandate's ID (`nmd_…`). |

### Returns

The network mandate.

### Errors

- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_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 "$PROVENANCE_API/v1/mandate/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5`, {
  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/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
  "object": "network_grant",
  "status": "active",
  "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R7",
  "subject": "psub_4kq7vT2m9xW3sYd8cFjLh6gA",
  "constraints": {
    "max_amount": 40,
    "budget_amount": 150,
    "budget_window": "month",
    "currency": "USD",
    "allowed_stores": null,
    "blocked_stores": [],
    "allowed_categories": [],
    "heartbeat": null,
    "expires_at": "2027-06-30T00:00:00.000Z"
  },
  "spent_this_window": 38,
  "created_at": "2026-10-26T19:00:00.000Z",
  "updated_at": "2026-10-26T19:30:00.000Z",
  "revoked_at": null
}
```

## Get a plan of subagents

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

The plan's latest version (or `version`), with each subagent's grant id once accepted. A proposed version past its time reads as `expired`.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The plan (`dpl_…`). |
| `version` | query | integer | no | One version (versions count per grant). |

### Returns

The plan.

### Errors

- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`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/delegation_plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/delegation_plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1`, {
  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/delegation_plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1",
  "object": "delegation_plan",
  "version": 1,
  "status": "accepted",
  "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
  "task": "Lisbon trip, Dec 9 to 13",
  "proposed_by_agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R7",
  "edited_by": "agent",
  "helpers": [
    {
      "key": "flights",
      "agent": {
        "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
        "name": "Flights",
        "maker": {
          "id": "acct_scout",
          "name": "scout.example"
        },
        "verified": true
      },
      "purpose": "Book the flights",
      "budget": {
        "amount": 1100,
        "allocation": "reserved",
        "at_limit": "stop",
        "ask_up_to": null
      },
      "limits": null,
      "active": null,
      "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0F9"
    },
    {
      "key": "rooms",
      "agent": {
        "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R2",
        "name": "Rooms",
        "maker": {
          "id": "acct_scout",
          "name": "scout.example"
        },
        "verified": true
      },
      "purpose": "Book the hotel",
      "budget": {
        "amount": 900,
        "allocation": "shared",
        "at_limit": "ask",
        "ask_up_to": {
          "percent": 10
        }
      },
      "limits": {
        "allowed_stores": [
          "https://casamarlinde.example"
        ],
        "allowed_categories": [
          "travel"
        ]
      },
      "active": null,
      "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R9"
    }
  ],
  "budget": {
    "total": 2000,
    "of": 2400,
    "currency": "USD"
  },
  "available_helpers": null,
  "requests_raise": null,
  "review": {
    "mode": "prompt",
    "expires_at": "2026-11-27T19:00:00.000Z",
    "url": null
  },
  "decided_at": "2026-11-26T19:05:00.000Z",
  "decided_via": "home",
  "created_at": "2026-11-26T19:00:00.000Z"
}
```

## Get the near-limit notice channels

`GET /v1/mandate/settings/limit_notices`

Returns the channels your agents' near-limit notices go on: push, text and email, all on by default. A notice goes once per window when a person's weekly or monthly budget reaches their near-limit percent, on each channel left on that the person has set up.

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

### Parameters

No parameters.

### Returns

The settings.

### 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/limit_notices" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/settings/limit_notices`, {
  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/limit_notices", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "limit_notice_settings",
  "channels": {
    "push": true,
    "text": true,
    "email": true
  }
}
```

## Read people's notes

`GET /v1/mandate/agent_notes`

Notes and questions people sent your agents, oldest first. Reading delivers them: each comes back once. A note for one session waits for that session's next authorize instead.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agent_id` | query | string | no | Only this agent's notes. |

### Returns

The notes.

### Errors

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

### Request

**curl**

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

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agent_notes`, {
  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/agent_notes", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

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

## Update a store origin

`PATCH /v1/authorize/stores/{id}`

Sets up to five categories, or `listed: false` to take the store out of the directory within an hour.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The origin's ID (`nst_…`). |
| `categories` | body | array of enums | no | The store's categories. |
| `listed` | body | boolean | no | False: "Don't list my store". |

### Returns

The store origin.

### 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/authorize/stores" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "origin": "https://books.quillstack.example" }' > step.json
export STORE_ID=$(jq -r '.id' step.json)
curl -X PATCH "$PROVENANCE_API/v1/authorize/stores/$STORE_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "categories": ["office_supplies", "books_media"] }'
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/stores`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "origin": "https://books.quillstack.example" }),
})).json();
const storeId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/stores/${storeId}`, {
  method: "PATCH",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "categories": ["office_supplies", "books_media"] }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/authorize/stores", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "origin": "https://books.quillstack.example"
}).json()
store_id = step1["id"]
data = httpx.patch(f"{api}/v1/authorize/stores/{store_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "categories": [
        "office_supplies",
        "books_media"
    ]
}).json()
```

### Response 200

```json
{
  "id": "nst_01M6VQDE90XK9YRRQ74FTMVPDW",
  "object": "network_store",
  "origin": "https://books.quillstack.example",
  "listing": "pending",
  "listed": false,
  "unlisted": false,
  "proof": {
    "method": null,
    "status": "pending",
    "checked_at": null,
    "verified_at": null,
    "well_known_url": "https://books.quillstack.example/.well-known/provenance-store.json",
    "well_known_body": {
      "store_id": "nst_01M6VQDE90XK9YRRQ74FTMVPDW"
    },
    "dns_name": "_provenance.books.quillstack.example",
    "dns_value": "provenance-store=nst_01M6VQDE90XK9YRRQ74FTMVPDW"
  },
  "categories": [
    "books_media",
    "office_supplies"
  ],
  "accepts": [],
  "last_activity_at": null,
  "first_listed_at": null,
  "created_at": "2026-11-07T19:22:53.600Z"
}
```

## Set the near-limit notice channels

`PUT /v1/mandate/settings/limit_notices`

Turns push, text or email on or off for your agents' near-limit notices (a field left out keeps its value). Texts are billed to you at the text price; a Free account sends no texts. A grant request's `limit_notice_channels` overrides this for that grant. Needs an admin key or an owner or admin session.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `channels` | body | object | yes | The channels to change; a field left out keeps its value. |
| `channels.push` | body | boolean | no | The app first, then web push. |
| `channels.text` | body | boolean | no | A text to the person's verified phone. |
| `channels.email` | body | boolean | no | An email to the person's verified email. |

### Returns

The settings.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`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 PUT "$PROVENANCE_API/v1/mandate/settings/limit_notices" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "channels": { "text": false } }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/settings/limit_notices`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "channels": { "text": false } }),
})).json();
```

**Python**

```python
import os
import httpx

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

### Response 200

```json
{
  "object": "limit_notice_settings",
  "channels": {
    "push": true,
    "text": false,
    "email": true
  }
}
```

## List your reports

`GET /v1/authorize/agent_reports`

The reports your account filed, with your notes, and those a person filed with Not me in the Provenance app (`filed_by: person`, also sent as `authorize.network_report.filed`).

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of reports.

### 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/authorize/agent_reports" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/agent_reports`, {
  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/authorize/agent_reports", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "id": "nrp_01M6VQDE8NFF3P518B9N9438ZB",
      "object": "network_report",
      "kind": "unrecognized_charge",
      "status": "active",
      "intent_jti": "8f5f6828-813c-4494-8b64-c32b35c07827",
      "occurred_at": "2026-10-26T19:00:00.000Z",
      "note": "The cardholder called about this order.",
      "dispute_status": null,
      "created_at": "2026-11-07T19:22:53.589Z",
      "withdrawn_at": null,
      "withdrawable_until": "2026-12-07T19:22:53.589Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List your store origins

`GET /v1/authorize/stores`

The store origins your account registered for the store directory, with each one's listing state and proof.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `q` | query | string | no | Search text. Matches when the origin or the store's ID contains it, ignoring case. At most 200 characters. |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of store origins.

### 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/authorize/stores" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/stores`, {
  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/authorize/stores", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

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

## List the store directory

`GET /v1/public/stores`

Stores with a verified origin and Provenance use in the last 30 days. No API key needed; cached for 5 minutes.

Auth: none. No API key needed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `category` | query | enum | no | Only stores in this category. |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of listed stores.

### Errors

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

### Request

**curl**

```bash
curl "$PROVENANCE_API/v1/public/stores"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/public/stores`)).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/public/stores").json()
```

### Response 200

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

## List the agent directory

`GET /v1/public/agents`

Verified agents (an active signing key), unless the maker opted out. The record appears only with Show our record. No API key needed; cached for 5 minutes.

Auth: none. No API key needed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of listed agents.

### Errors

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

### Request

**curl**

```bash
curl "$PROVENANCE_API/v1/public/agents"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/public/agents`)).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/public/agents").json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "directory_agent",
      "id": "agt_01JDSAMPLE0TIDEPOOL0SALES00",
      "name": "Tidepool Sales",
      "category": null,
      "maker": "Saltmarsh Data",
      "signing_key": "active",
      "since": "2026-11-07T19:21:45.887Z"
    },
    {
      "object": "directory_agent",
      "id": "agt_01M6VQDE5HSNE700XZKGYFBEQ9",
      "name": "pantry-pal",
      "category": "shopping_agent",
      "maker": null,
      "signing_key": "active",
      "since": "2026-11-07T19:22:53.489Z"
    },
    {
      "object": "directory_agent",
      "id": "agt_01M6VQDE5P0EHHA9GN5ZCN215B",
      "name": "pantry-pal",
      "category": "shopping_agent",
      "maker": null,
      "signing_key": "active",
      "since": "2026-11-07T19:22:53.494Z"
    },
    "… 4 more"
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List your network mandates

`GET /v1/mandate/network_grants`

The network mandates your agents hold, with status and this window's spend. People appear only by a pairwise `subject`.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of network mandates.

### Errors

- [`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/network_grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/network_grants`, {
  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/network_grants", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

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

## Remove a store origin

`DELETE /v1/authorize/stores/{id}`

Removes the origin and its directory entry.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The origin's ID (`nst_…`). |

### Returns

The deleted origin.

### 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/authorize/stores" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "origin": "https://old.quillstack.example" }' > step.json
export STORE_ID=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/authorize/stores/$STORE_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/stores`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "origin": "https://old.quillstack.example" }),
})).json();
const storeId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/stores/${storeId}`, {
  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/authorize/stores", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "origin": "https://old.quillstack.example"
}).json()
store_id = step1["id"]
data = httpx.delete(f"{api}/v1/authorize/stores/{store_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "nst_01M6VQDE91BETEBH2WJTCD1QTC",
  "object": "network_store",
  "deleted": true
}
```

## Report an order

`POST /v1/authorize/agent_reports`

Report fraud, an unrecognized charge or an agent that misbehaved, on an order your account verified or accepted. One report per order and kind. It counts toward the passkey and the agent; your note stays private.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `intent_jti` | body | string | no | The order's token `jti`. Pass this or `decision_id`. |
| `decision_id` | body | string | no | A decision on your ledger. Pass this or `intent_jti`. |
| `kind` | body | enum | yes | What happened. One of `fraud`, `unrecognized_charge`, `agent_misbehaved`. |
| `occurred_at` | body | timestamp | yes | When it happened. |
| `note` | body | string | no | A private note for your team. |

### Returns

The report.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`network_report_duplicate`](https://provenanceauth.com/docs/platform/errors.md#network_report_duplicate)
- [`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 -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 -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"action_description\": \"Buy 2 linen notebooks: \$38.00 at Larkspur Paper\",
    \"action_payload\": {
      \"amount\": 38,
      \"currency\": \"USD\"
    },
    \"agent_session_id\": \"sess_report_1\",
    \"device_id\": \"dev_00000000000000000000000000000001\",
    \"agent_id\": \"$AGENT_ID\"
  }" > /dev/null
curl -s "$PROVENANCE_API/v1/mandate/assessments?session=sess_report_1&limit=1" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DECISION_ID=$(jq -r '.data[0].id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/agent_reports" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"decision_id\": \"$DECISION_ID\",
    \"kind\": \"unrecognized_charge\",
    \"occurred_at\": \"2026-10-26T19:00:00.000Z\",
    \"note\": \"The cardholder called about this order.\"
  }"
```

**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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_description": "Buy 2 linen notebooks: $38.00 at Larkspur Paper",
    "action_payload": {
      "amount": 38,
      "currency": "USD"
    },
    "agent_session_id": "sess_report_1",
    "device_id": "dev_00000000000000000000000000000001",
    "agent_id": agentId
  }),
})).json();
const step3 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments?session=sess_report_1&limit=1`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const decisionId = step3.data[0].id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/agent_reports`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "decision_id": decisionId,
    "kind": "unrecognized_charge",
    "occurred_at": "2026-10-26T19:00:00.000Z",
    "note": "The cardholder called about this order."
  }),
})).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"]
step2 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "action_description": "Buy 2 linen notebooks: $38.00 at Larkspur Paper",
    "action_payload": {
        "amount": 38,
        "currency": "USD"
    },
    "agent_session_id": "sess_report_1",
    "device_id": "dev_00000000000000000000000000000001",
    "agent_id": agent_id
}).json()
step3 = httpx.get(f"{api}/v1/mandate/assessments?session=sess_report_1&limit=1", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
decision_id = step3["data"][0]["id"]
data = httpx.post(f"{api}/v1/authorize/agent_reports", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "decision_id": decision_id,
    "kind": "unrecognized_charge",
    "occurred_at": "2026-10-26T19:00:00.000Z",
    "note": "The cardholder called about this order."
}).json()
```

### Response 201

```json
{
  "id": "nrp_01M6VQDE8NFF3P518B9N9438ZB",
  "object": "network_report",
  "kind": "unrecognized_charge",
  "status": "active",
  "intent_jti": "8f5f6828-813c-4494-8b64-c32b35c07827",
  "occurred_at": "2026-10-26T19:00:00.000Z",
  "note": "The cardholder called about this order.",
  "dispute_status": null,
  "created_at": "2026-11-07T19:22:53.589Z",
  "withdrawn_at": null,
  "withdrawable_until": "2026-12-07T19:22:53.589Z"
}
```

## Withdraw a report

`DELETE /v1/authorize/agent_reports/{id}`

Withdraws a report within 30 days of filing. It stops counting from the next hourly count.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The report's ID (`nrp_…`). |

### Returns

The withdrawn report.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`network_report_closed`](https://provenanceauth.com/docs/platform/errors.md#network_report_closed)
- [`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 -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"action_description\": \"Buy 2 linen notebooks: \$38.00 at Larkspur Paper\",
    \"action_payload\": {
      \"amount\": 38,
      \"currency\": \"USD\"
    },
    \"agent_session_id\": \"sess_report_2\",
    \"device_id\": \"dev_00000000000000000000000000000001\",
    \"agent_id\": \"$AGENT_ID\"
  }" > /dev/null
curl -s "$PROVENANCE_API/v1/mandate/assessments?session=sess_report_2&limit=1" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DECISION_ID=$(jq -r '.data[0].id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/agent_reports" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"decision_id\": \"$DECISION_ID\",
    \"kind\": \"fraud\",
    \"occurred_at\": \"2026-10-26T19:00:00.000Z\"
  }" > step.json
export REPORT_ID=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/authorize/agent_reports/$REPORT_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": "Cartwise" }),
})).json();
const agentId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_description": "Buy 2 linen notebooks: $38.00 at Larkspur Paper",
    "action_payload": {
      "amount": 38,
      "currency": "USD"
    },
    "agent_session_id": "sess_report_2",
    "device_id": "dev_00000000000000000000000000000001",
    "agent_id": agentId
  }),
})).json();
const step3 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments?session=sess_report_2&limit=1`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const decisionId = step3.data[0].id;
const step4 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/agent_reports`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "decision_id": decisionId,
    "kind": "fraud",
    "occurred_at": "2026-10-26T19:00:00.000Z"
  }),
})).json();
const reportId = step4.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/agent_reports/${reportId}`, {
  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": "Cartwise"
}).json()
agent_id = step1["id"]
step2 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "action_description": "Buy 2 linen notebooks: $38.00 at Larkspur Paper",
    "action_payload": {
        "amount": 38,
        "currency": "USD"
    },
    "agent_session_id": "sess_report_2",
    "device_id": "dev_00000000000000000000000000000001",
    "agent_id": agent_id
}).json()
step3 = httpx.get(f"{api}/v1/mandate/assessments?session=sess_report_2&limit=1", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
decision_id = step3["data"][0]["id"]
step4 = httpx.post(f"{api}/v1/authorize/agent_reports", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "decision_id": decision_id,
    "kind": "fraud",
    "occurred_at": "2026-10-26T19:00:00.000Z"
}).json()
report_id = step4["id"]
data = httpx.delete(f"{api}/v1/authorize/agent_reports/{report_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "nrp_01M6VQDE8QZV4CP5N33Z7G74R6",
  "object": "network_report",
  "deleted": true,
  "status": "withdrawn"
}
```

## Dispute a report

`POST /v1/mandate/agents/{id}/reports/{report_id}/dispute`

Asks Provenance to review a report about your agent. It stays counted until review resolves it, within 14 days.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Your agent's ID. |
| `report_id` | path | string | yes | The report's ID (`nrp_…`). |
| `reason` | body | string | yes | Why the report is wrong. |

### Returns

The report, with `dispute_status: open`.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`network_report_closed`](https://provenanceauth.com/docs/platform/errors.md#network_report_closed)
- [`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 -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"action_description\": \"Buy 2 linen notebooks: \$38.00 at Larkspur Paper\",
    \"action_payload\": {
      \"amount\": 38,
      \"currency\": \"USD\"
    },
    \"agent_session_id\": \"sess_report_3\",
    \"device_id\": \"dev_00000000000000000000000000000001\",
    \"agent_id\": \"$AGENT_ID\"
  }" > /dev/null
curl -s "$PROVENANCE_API/v1/mandate/assessments?session=sess_report_3&limit=1" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DECISION_ID=$(jq -r '.data[0].id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/agent_reports" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"decision_id\": \"$DECISION_ID\",
    \"kind\": \"agent_misbehaved\",
    \"occurred_at\": \"2026-10-26T19:00:00.000Z\"
  }" > step.json
export REPORT_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/reports/$REPORT_ID/dispute" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "The store refunded this order and confirmed the customer placed it."
  }'
```

**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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_description": "Buy 2 linen notebooks: $38.00 at Larkspur Paper",
    "action_payload": {
      "amount": 38,
      "currency": "USD"
    },
    "agent_session_id": "sess_report_3",
    "device_id": "dev_00000000000000000000000000000001",
    "agent_id": agentId
  }),
})).json();
const step3 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments?session=sess_report_3&limit=1`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const decisionId = step3.data[0].id;
const step4 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/agent_reports`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "decision_id": decisionId,
    "kind": "agent_misbehaved",
    "occurred_at": "2026-10-26T19:00:00.000Z"
  }),
})).json();
const reportId = step4.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/reports/${reportId}/dispute`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "reason": "The store refunded this order and confirmed the customer placed it."
  }),
})).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"]
step2 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "action_description": "Buy 2 linen notebooks: $38.00 at Larkspur Paper",
    "action_payload": {
        "amount": 38,
        "currency": "USD"
    },
    "agent_session_id": "sess_report_3",
    "device_id": "dev_00000000000000000000000000000001",
    "agent_id": agent_id
}).json()
step3 = httpx.get(f"{api}/v1/mandate/assessments?session=sess_report_3&limit=1", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
decision_id = step3["data"][0]["id"]
step4 = httpx.post(f"{api}/v1/authorize/agent_reports", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "decision_id": decision_id,
    "kind": "agent_misbehaved",
    "occurred_at": "2026-10-26T19:00:00.000Z"
}).json()
report_id = step4["id"]
data = httpx.post(f"{api}/v1/mandate/agents/{agent_id}/reports/{report_id}/dispute", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "reason": "The store refunded this order and confirmed the customer placed it."
}).json()
```

### Response 200

```json
{
  "id": "nrp_01M6VQDE8W713WW2NBR99NRM09",
  "object": "network_report",
  "kind": "agent_misbehaved",
  "status": "active",
  "week": "2026-11-02",
  "dispute_status": "open",
  "dispute_due_at": "2026-11-21T19:22:53.597Z"
}
```

## Check a store's proof now

`POST /v1/authorize/stores/{id}/check`

Checks the well-known file, then the DNS TXT record, instead of waiting for the daily check. At most once a minute.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The origin's ID (`nst_…`). |

### Returns

The store origin, with the check result.

### 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 -X POST "$PROVENANCE_API/v1/authorize/stores/nst_01M5X9A2B7Q9V3N8K4T6W1Y0S1/check" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/stores/nst_01M5X9A2B7Q9V3N8K4T6W1Y0S1/check`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/stores/nst_01M5X9A2B7Q9V3N8K4T6W1Y0S1/check", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "nst_01M5X9A2B7Q9V3N8K4T6W1Y0S1",
  "object": "network_store",
  "origin": "https://shop.quillstack.example",
  "listing": "listed",
  "listed": true,
  "unlisted": false,
  "proof": {
    "method": "well_known",
    "status": "verified",
    "checked_at": "2026-10-27T09:00:00.000Z",
    "verified_at": "2026-10-27T09:00:00.000Z",
    "well_known_url": "https://shop.quillstack.example/.well-known/provenance-store.json",
    "well_known_body": {
      "store_id": "nst_01M5X9A2B7Q9V3N8K4T6W1Y0S1"
    },
    "dns_name": "_provenance.shop.quillstack.example",
    "dns_value": "provenance-store=nst_01M5X9A2B7Q9V3N8K4T6W1Y0S1"
  },
  "categories": [
    "office_supplies"
  ],
  "accepts": [
    "network_mandates"
  ],
  "last_activity_at": "2026-10-27T08:41:00.000Z",
  "first_listed_at": "2026-10-27T09:00:00.000Z",
  "created_at": "2026-10-26T19:00:00.000Z"
}
```

## Check a store listing

`GET /v1/public/stores/check`

Whether an origin is listed in the store directory (what the store badge reads). No API key needed.

Auth: none. No API key needed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `origin` | query | string | yes | The store origin. |

### Returns

The listing check.

### Errors

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

### Request

**curl**

```bash
curl "$PROVENANCE_API/v1/public/stores/check?origin=https%3A%2F%2Fshop.quillstack.example"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/public/stores/check?origin=https%3A%2F%2Fshop.quillstack.example`)).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/public/stores/check?origin=https%3A%2F%2Fshop.quillstack.example").json()
```

### Response 200

```json
{
  "object": "directory_store_check",
  "origin": "https://shop.quillstack.example",
  "listed": false
}
```

## Redeem a connect token

`POST /v1/mandate/connect_intents/redeem`

Your app received `provenance_connect` on its Connect URL and signed the person in. Redeem it with the limits you ask for to get a mandate request already bound to that person; send them to `grant_url`. Each token works once, for 10 minutes, and only for your own 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). |
| `token` | body | string | yes | The `provenance_connect` value. |
| `proposed` | body | object | yes | A network mandate's limits. The person's rules apply on top. |
| `proposed.max_amount` | body | number \| null | no | Per-order limit, in major units. |
| `proposed.budget_amount` | body | number \| null | no | Budget per `budget_window`, in major units. |
| `proposed.budget_window` | body | enum | no | The budget window, counted in UTC. One of `day`, `week`, `month`. |
| `proposed.currency` | body | string | yes | ISO 4217; an order in another currency is refused. |
| `proposed.allowed_stores` | body | array of strings \| null | no | Store origins it may buy at without asking; null for any store. |
| `proposed.blocked_stores` | body | array of strings | no | Store origins it must never buy at. |
| `proposed.allowed_categories` | body | array of enums | no | Store categories it may buy at without asking (the store directory's list); empty for any. |
| `proposed.heartbeat` | body | object \| null | no | Check-ins (`interval`: weekly, biweekly or monthly; `grace_hours`); it stops if the person doesn't confirm. |
| `proposed.expires_at` | body | timestamp | yes | At most a year out. |
| `proposed.purpose` | body | string | no | What the permission is for, in plain text ("Restock printer paper for the office"). Set by the request and shown on the grant screen; the person sets the limits, not the purpose. Present when set. |
| `proposed.accept_within` | body | object | no | How far an outside agent's offer may differ from a brief before the person is asked (`constraints.accept_within` on a grant). Every field is optional; a child grant inherits what it leaves out and can't loosen a field, nor set one its parent leaves out (past the strictest value). With none anywhere in the chain, only an offer no worse in every way is accepted alone. Never on the grant token. |
| `proposed.accept_within.price_up_pct` | body | number | no | The most the price may rise, as a percentage of the brief's price line. |
| `proposed.accept_within.price_up_amount` | body | number | no | The most the price may rise, in the grant's currency (major units). Both price fields must pass when both are set. |
| `proposed.accept_within.date_earlier_minutes` | body | integer | no | How much earlier a date may move. |
| `proposed.accept_within.date_later_minutes` | body | integer | no | How much later a date may move. |
| `proposed.accept_within.substitutes` | body | enum | no | Whether a substitute item in the brief line's category may be accepted. One of `none`, `same_category`. |
| `proposed.accept_within.quantity_short` | body | enum | no | Whether an offer of part of the quantity may be accepted. One of `none`, `partial`. |
| `proposed.accept_within.terms_worse` | body | boolean | no | Whether worse terms (not refundable, an earlier cancellation deadline, a change fee, later delivery) may be accepted. |
| `proposed.accept_within.other_seller` | body | boolean | no | Whether a seller other than the brief's counterparties may be accepted. |
| `proposed.accept_within.on_timeout` | body | enum | no | What happens when the person doesn't answer an ask (default `decline`). Asks arrive in a later slice. One of `decline`, `accept_within_tolerances`. |
| `proposed.payment_card` | body | object \| null | no | The card this grant pays with (`personal_card_id`), checked only where Provenance decides the payment. Present when set; never in a token. |
| `proposed.payment_card.personal_card_id` | body | string | no | The person's card (`pcard_…`). |
| `return_url` | body | string | no | Where the grant screen sends the person afterwards. |

### Returns

The mandate request, bound to the person.

### Errors

- [`connect_token_invalid`](https://provenanceauth.com/docs/platform/errors.md#connect_token_invalid)
- [`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 POST "$PROVENANCE_API/v1/mandate/connect_intents/redeem" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "pct_q8V3nX2mB7tK9wR4yC1zD5fG6hJ0kL",
    "proposed": {
      "max_amount": 50,
      "budget_amount": 200,
      "budget_window": "month",
      "currency": "USD",
      "expires_at": "2027-06-30T00:00:00Z"
    }
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/connect_intents/redeem`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "token": "pct_q8V3nX2mB7tK9wR4yC1zD5fG6hJ0kL",
    "proposed": {
      "max_amount": 50,
      "budget_amount": 200,
      "budget_window": "month",
      "currency": "USD",
      "expires_at": "2027-06-30T00:00:00Z"
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/connect_intents/redeem", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "token": "pct_q8V3nX2mB7tK9wR4yC1zD5fG6hJ0kL",
    "proposed": {
        "max_amount": 50,
        "budget_amount": 200,
        "budget_window": "month",
        "currency": "USD",
        "expires_at": "2027-06-30T00:00:00Z"
    }
}).json()
```

### Response 201

```json
{
  "id": "ngrq_01M67Q4F8D7C4E2B9A6F5G1H0N",
  "object": "network_grant_request",
  "status": "pending",
  "agent_id": "agt_01M5ZK3Q8D7C4E2B9A6F5G1H0J",
  "proposed": {
    "max_amount": 50,
    "budget_amount": 200,
    "budget_window": "month",
    "currency": "USD",
    "allowed_stores": null,
    "blocked_stores": [],
    "allowed_categories": [],
    "heartbeat": null,
    "expires_at": "2027-06-30T00:00:00.000Z"
  },
  "return_url": null,
  "network_grant_id": null,
  "grant_url": "https://app.provenanceauth.com/me/grant?request=Rr8m2K1xq9VbT4nW7yZ3cD6fG0hJ5kL",
  "created_at": "2026-10-31T18:02:00.000Z",
  "decided_at": null,
  "expires_at": "2026-11-01T18:02:00.000Z"
}
```

## Poll a connect code

`POST /v1/mandate/connect_codes/token`

RFC 8628: until the person enters the code and grants, `authorization_pending`; faster than `interval`, `slow_down`; declined, `access_denied`; expired or already handed over, `expired_token`. Once granted, the network mandate, one time.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `device_code` | body | string | yes | From the code you created. |

### Returns

The granted network mandate.

### Errors

- [`authorization_pending`](https://provenanceauth.com/docs/platform/errors.md#authorization_pending)
- [`slow_down`](https://provenanceauth.com/docs/platform/errors.md#slow_down)
- [`access_denied`](https://provenanceauth.com/docs/platform/errors.md#access_denied)
- [`expired_token`](https://provenanceauth.com/docs/platform/errors.md#expired_token)
- [`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 POST "$PROVENANCE_API/v1/mandate/connect_codes/token" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "device_code": "dvc_Wq3n8Vx2mB7tK9wR4yC1zD5fG6hJ0kLpS" }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/connect_codes/token`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ "device_code": "dvc_Wq3n8Vx2mB7tK9wR4yC1zD5fG6hJ0kLpS" }),
})).json();
```

**Python**

```python
import os
import httpx

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

### Response 200

```json
{
  "object": "connect_code_grant",
  "network_grant_request_id": "ngrq_01M67Q4F8D7C4E2B9A6F5G1H0N",
  "network_grant_id": "ngr_01M67Q6B8D7C4E2B9A6F5G1H0Q",
  "network_mandate": "eyJhbGciOiJFUzI1NiIsInR5cCI6Im5ldHdvcmstbWFuZGF0ZStqd3QifQ.eyJtYW5kYXRlIjp0cnVlfQ.c2ln",
  "subject": "psub_1d4a9c8e7b6f5a3d2c1b0a9e8d7c6b5a"
}
```

## Ask a person for a network mandate

`POST /v1/mandate/grant_requests`

For one of your agents with a verified Identify signing key: the limits you ask for. Send the person to `grant_url`; they grant it with a passkey and can lower any limit. A `hard_max` (never below `proposed`) caps how far the person can later raise the money limits; without one there is no ceiling. The token arrives by the `mandate.network_grant.granted` webhook or on this request.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `agent_id` | body | string | yes | Your registered agent (it needs an active signing key). |
| `proposed` | body | object | yes | A network mandate's limits. The person's rules apply on top. |
| `proposed.max_amount` | body | number \| null | no | Per-order limit, in major units. |
| `proposed.budget_amount` | body | number \| null | no | Budget per `budget_window`, in major units. |
| `proposed.budget_window` | body | enum | no | The budget window, counted in UTC. One of `day`, `week`, `month`. |
| `proposed.currency` | body | string | yes | ISO 4217; an order in another currency is refused. |
| `proposed.allowed_stores` | body | array of strings \| null | no | Store origins it may buy at without asking; null for any store. |
| `proposed.blocked_stores` | body | array of strings | no | Store origins it must never buy at. |
| `proposed.allowed_categories` | body | array of enums | no | Store categories it may buy at without asking (the store directory's list); empty for any. |
| `proposed.heartbeat` | body | object \| null | no | Check-ins (`interval`: weekly, biweekly or monthly; `grace_hours`); it stops if the person doesn't confirm. |
| `proposed.expires_at` | body | timestamp | yes | At most a year out. |
| `proposed.purpose` | body | string | no | What the permission is for, in plain text ("Restock printer paper for the office"). Set by the request and shown on the grant screen; the person sets the limits, not the purpose. Present when set. |
| `proposed.accept_within` | body | object | no | How far an outside agent's offer may differ from a brief before the person is asked (`constraints.accept_within` on a grant). Every field is optional; a child grant inherits what it leaves out and can't loosen a field, nor set one its parent leaves out (past the strictest value). With none anywhere in the chain, only an offer no worse in every way is accepted alone. Never on the grant token. |
| `proposed.accept_within.price_up_pct` | body | number | no | The most the price may rise, as a percentage of the brief's price line. |
| `proposed.accept_within.price_up_amount` | body | number | no | The most the price may rise, in the grant's currency (major units). Both price fields must pass when both are set. |
| `proposed.accept_within.date_earlier_minutes` | body | integer | no | How much earlier a date may move. |
| `proposed.accept_within.date_later_minutes` | body | integer | no | How much later a date may move. |
| `proposed.accept_within.substitutes` | body | enum | no | Whether a substitute item in the brief line's category may be accepted. One of `none`, `same_category`. |
| `proposed.accept_within.quantity_short` | body | enum | no | Whether an offer of part of the quantity may be accepted. One of `none`, `partial`. |
| `proposed.accept_within.terms_worse` | body | boolean | no | Whether worse terms (not refundable, an earlier cancellation deadline, a change fee, later delivery) may be accepted. |
| `proposed.accept_within.other_seller` | body | boolean | no | Whether a seller other than the brief's counterparties may be accepted. |
| `proposed.accept_within.on_timeout` | body | enum | no | What happens when the person doesn't answer an ask (default `decline`). Asks arrive in a later slice. One of `decline`, `accept_within_tolerances`. |
| `proposed.payment_card` | body | object \| null | no | The card this grant pays with (`personal_card_id`), checked only where Provenance decides the payment. Present when set; never in a token. |
| `proposed.payment_card.personal_card_id` | body | string | no | The person's card (`pcard_…`). |
| `return_url` | body | string | no | Where the grant screen sends the person afterwards (https). |
| `hard_max` | body | object | no | The most a person may raise a network grant's money limits to, set by the agent's maker on its grant request. Never below the ask. A person may raise above the ask with their passkey, up to this line; with no `hard_max` there is no maker ceiling. |
| `hard_max.max_amount` | body | number \| null | no | The highest per-order limit a person may set; null for no ceiling. |
| `hard_max.budget_amount` | body | number \| null | no | The highest budget a person may set; null for no ceiling. |
| `limit_notice_channels` | body | object | no | This grant's near-limit channels, overriding your setting at `/v1/mandate/settings/limit_notices`. |
| `limit_notice_channels.push` | body | boolean | no | Push to the app or the web home. |
| `limit_notice_channels.text` | body | boolean | no | A text (billed to you). |
| `limit_notice_channels.email` | body | boolean | no | An email. |

### Returns

The request, with `grant_url`.

### Errors

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

### 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", "category": "shopping_agent" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/identify/agents/$AGENT_ID/signing_keys" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jwk": {
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY"
    }
  }' > /dev/null
curl -X POST "$PROVENANCE_API/v1/mandate/grant_requests" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"agent_id\": \"$AGENT_ID\",
    \"proposed\": {
      \"max_amount\": 50,
      \"budget_amount\": 200,
      \"budget_window\": \"month\",
      \"currency\": \"USD\",
      \"expires_at\": \"2027-06-30T00:00:00Z\"
    },
    \"return_url\": \"https://cartwise.example/connected\",
    \"hard_max\": {
      \"max_amount\": 100,
      \"budget_amount\": 400
    }
  }"
```

**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", "category": "shopping_agent" }),
})).json();
const agentId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/agents/${agentId}/signing_keys`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "jwk": {
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY"
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/grant_requests`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "agent_id": agentId,
    "proposed": {
      "max_amount": 50,
      "budget_amount": 200,
      "budget_window": "month",
      "currency": "USD",
      "expires_at": "2027-06-30T00:00:00Z"
    },
    "return_url": "https://cartwise.example/connected",
    "hard_max": {
      "max_amount": 100,
      "budget_amount": 400
    }
  }),
})).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",
    "category": "shopping_agent"
}).json()
agent_id = step1["id"]
step2 = httpx.post(f"{api}/v1/identify/agents/{agent_id}/signing_keys", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "jwk": {
        "kty": "OKP",
        "crv": "Ed25519",
        "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY"
    }
}).json()
data = httpx.post(f"{api}/v1/mandate/grant_requests", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "agent_id": agent_id,
    "proposed": {
        "max_amount": 50,
        "budget_amount": 200,
        "budget_window": "month",
        "currency": "USD",
        "expires_at": "2027-06-30T00:00:00Z"
    },
    "return_url": "https://cartwise.example/connected",
    "hard_max": {
        "max_amount": 100,
        "budget_amount": 400
    }
}).json()
```

### Response 201

```json
{
  "id": "ngrq_01M87NPNHBVBDKAFFQQEMVCS4C",
  "object": "network_grant_request",
  "status": "pending",
  "agent_id": "agt_01M87NPNH28KRDZ92EZ9GHP2E2",
  "proposed": {
    "max_amount": 50,
    "budget_amount": 200,
    "budget_window": "month",
    "currency": "USD",
    "allowed_stores": null,
    "blocked_stores": [],
    "allowed_categories": [],
    "heartbeat": null,
    "expires_at": "2027-06-30T00:00:00.000Z"
  },
  "hard_max": {
    "max_amount": 100,
    "budget_amount": 400
  },
  "return_url": "https://cartwise.example/connected",
  "network_grant_id": null,
  "grant_url": "http://localhost:5173/me/grant?request=kvkvrIB6uiz2dJgh1q1hm-vkOjikyfCY",
  "created_at": "2026-11-24T20:59:33.803Z",
  "decided_at": null,
  "expires_at": "2026-11-25T20:59:33.803Z"
}
```

## Revoke a network mandate

`POST /v1/mandate/network_grants/{id}/revoke`

Stops the mandate at once: new authorizes are refused and outstanding tokens can't be accepted.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The mandate's ID (`nmd_…`). |

### Returns

The revoked mandate.

### Errors

- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_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/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5/revoke" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

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

**Python**

```python
import os
import httpx

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

### Response 200

```json
{
  "id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
  "object": "network_grant",
  "status": "revoked",
  "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R7",
  "subject": "psub_4kq7vT2m9xW3sYd8cFjLh6gA",
  "constraints": {
    "max_amount": 40,
    "budget_amount": 150,
    "budget_window": "month",
    "currency": "USD",
    "allowed_stores": null,
    "blocked_stores": [],
    "allowed_categories": [],
    "heartbeat": null,
    "expires_at": "2027-06-30T00:00:00.000Z"
  },
  "spent_this_window": 38,
  "created_at": "2026-10-26T19:00:00.000Z",
  "updated_at": "2026-10-26T19:30:00.000Z",
  "revoked_at": "2026-10-26T20:00:00.000Z"
}
```

## Propose a plan of subagents

`POST /v1/mandate/network_grants/{id}/delegation_plans`

Hands part of a person's grant to registered, verified subagents through one plan the person reviews. Each budget is reserved or shared, and stops, asks the person or keeps going at its limit. 201 when the person's review setting accepts it at once, else 202 with `review.url`. See [propose a plan of subagents](https://provenanceauth.com/docs/mandate/guides/propose-a-plan-of-subagents.md).

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The person's network grant (`ngr_…`) the subagents are handed from: the agent's own, or a subagent grant below it. |
| `task` | body | string | yes | The task in one line, shown as the plan's head ("Lisbon trip, Dec 9 to 13"). |
| `helpers` | body | array of objects | yes | The helpers, each a registered, verified agent. |
| `helpers.key` | body | string | yes | Stable across versions ("flights"), so a revision says what changed. |
| `helpers.agent_id` | body | string | yes | A registered agent with an active signing key; another maker's agent is named to the person with its maker. |
| `helpers.purpose` | body | string | yes | What the subagent is for ("Book the flights"). |
| `helpers.budget` | body | object | yes | The helper's budget and its two settings. |
| `helpers.budget.amount` | body | number | yes | In major units of the grant's currency. |
| `helpers.budget.allocation` | body | enum | no | `reserved`: set aside from the grant; other subagents can't spend it. `shared` (the default): drawn from what the grant has left. One of `reserved`, `shared`. |
| `helpers.budget.at_limit` | body | enum | no | At the amount: `stop` refuses, `ask` asks the person up to `ask_up_to` past it, `continue` goes past without asking while the grant above has room. Default `ask` for `shared`, `stop` for `reserved`. One of `stop`, `ask`, `continue`. |
| `helpers.budget.ask_up_to` | body | object \| null | no | With `ask` only: `{ percent }` (20 by default when left out) or `{ amount }` past the amount; null asks at any amount the grant has room for. |
| `helpers.budget.ask_up_to.percent` | body | number | no | The margin in percent of the amount. |
| `helpers.budget.ask_up_to.amount` | body | number | no | The margin as a fixed amount. |
| `helpers.limits` | body | object \| null | no | Its limits, each narrower than the grant's (null: the grant's). |
| `helpers.limits.max_amount` | body | number \| null | no | Per-order cap, at most the grant's. |
| `helpers.limits.allowed_stores` | body | array of strings \| null | no | Within the grant's stores. A merchant lock: at any other store the subagent is refused (`outside_merchant_lock`), never asked. |
| `helpers.limits.allowed_categories` | body | array of strings | no | Within the grant's categories. |
| `helpers.limits.accept_within` | body | object | no | How far an outside agent's offer may differ from a brief before the person is asked (`constraints.accept_within` on a grant). Every field is optional; a child grant inherits what it leaves out and can't loosen a field, nor set one its parent leaves out (past the strictest value). With none anywhere in the chain, only an offer no worse in every way is accepted alone. Never on the grant token. |
| `helpers.limits.accept_within.price_up_pct` | body | number | no | The most the price may rise, as a percentage of the brief's price line. |
| `helpers.limits.accept_within.price_up_amount` | body | number | no | The most the price may rise, in the grant's currency (major units). Both price fields must pass when both are set. |
| `helpers.limits.accept_within.date_earlier_minutes` | body | integer | no | How much earlier a date may move. |
| `helpers.limits.accept_within.date_later_minutes` | body | integer | no | How much later a date may move. |
| `helpers.limits.accept_within.substitutes` | body | enum | no | Whether a substitute item in the brief line's category may be accepted. One of `none`, `same_category`. |
| `helpers.limits.accept_within.quantity_short` | body | enum | no | Whether an offer of part of the quantity may be accepted. One of `none`, `partial`. |
| `helpers.limits.accept_within.terms_worse` | body | boolean | no | Whether worse terms (not refundable, an earlier cancellation deadline, a change fee, later delivery) may be accepted. |
| `helpers.limits.accept_within.other_seller` | body | boolean | no | Whether a seller other than the brief's counterparties may be accepted. |
| `helpers.limits.accept_within.on_timeout` | body | enum | no | What happens when the person doesn't answer an ask (default `decline`). Asks arrive in a later slice. One of `decline`, `accept_within_tolerances`. |
| `helpers.active` | body | object \| null | no | The subagent's dates, inside the grant's. |
| `helpers.active.from` | body | timestamp \| null | no | The first day. |
| `helpers.active.until` | body | timestamp \| null | no | The last day. |
| `available_helpers` | body | array of objects | no | Registered agents the person may add from the review page. |
| `available_helpers.agent_id` | body | string | yes | The registered agent. |
| `available_helpers.purpose_hint` | body | string \| null | no | A suggested purpose. |
| `requests_raise` | body | object | no | Only when the plan needs more than the grant: always shown to the person, and accepting it raises the grant with their passkey (up to the maker's `hard_max`). |
| `requests_raise.amount` | body | number | yes | In major units of the grant's currency. |
| `requests_raise.reason` | body | string | yes | Why, in one line, shown to the person. |

### Returns

Accepted at once under the person's review setting, with the subagent grants minted. See [the delegation plan result object](#object).

### Errors

- [`delegation_not_allowed`](https://provenanceauth.com/docs/platform/errors.md#delegation_not_allowed)
- [`delegation_exceeds_parent`](https://provenanceauth.com/docs/platform/errors.md#delegation_exceeds_parent)
- [`helper_not_verified`](https://provenanceauth.com/docs/platform/errors.md#helper_not_verified)
- [`external_helper_not_allowed`](https://provenanceauth.com/docs/platform/errors.md#external_helper_not_allowed)
- [`purpose_required`](https://provenanceauth.com/docs/platform/errors.md#purpose_required)
- [`delegation_depth_exceeded`](https://provenanceauth.com/docs/platform/errors.md#delegation_depth_exceeded)
- [`delegation_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#delegation_limit_reached)
- [`network_grant_inactive`](https://provenanceauth.com/docs/platform/errors.md#network_grant_inactive)
- [`chain_unavailable`](https://provenanceauth.com/docs/platform/errors.md#chain_unavailable)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`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/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5/delegation_plans" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "Lisbon trip, Dec 9 to 13",
    "helpers": [
      {
        "key": "flights",
        "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
        "purpose": "Book the flights",
        "budget": {
          "amount": 1100,
          "allocation": "reserved",
          "at_limit": "stop"
        }
      },
      {
        "key": "rooms",
        "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R2",
        "purpose": "Book the hotel",
        "budget": {
          "amount": 900,
          "allocation": "shared",
          "at_limit": "ask",
          "ask_up_to": {
            "percent": 10
          }
        },
        "limits": {
          "allowed_stores": [
            "https://casamarlinde.example"
          ],
          "allowed_categories": [
            "travel"
          ]
        }
      }
    ]
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5/delegation_plans`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "task": "Lisbon trip, Dec 9 to 13",
    "helpers": [
      {
        "key": "flights",
        "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
        "purpose": "Book the flights",
        "budget": {
          "amount": 1100,
          "allocation": "reserved",
          "at_limit": "stop"
        }
      },
      {
        "key": "rooms",
        "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R2",
        "purpose": "Book the hotel",
        "budget": {
          "amount": 900,
          "allocation": "shared",
          "at_limit": "ask",
          "ask_up_to": {
            "percent": 10
          }
        },
        "limits": {
          "allowed_stores": [
            "https://casamarlinde.example"
          ],
          "allowed_categories": [
            "travel"
          ]
        }
      }
    ]
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/network_grants/ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5/delegation_plans", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "task": "Lisbon trip, Dec 9 to 13",
    "helpers": [
        {
            "key": "flights",
            "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
            "purpose": "Book the flights",
            "budget": {
                "amount": 1100,
                "allocation": "reserved",
                "at_limit": "stop"
            }
        },
        {
            "key": "rooms",
            "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R2",
            "purpose": "Book the hotel",
            "budget": {
                "amount": 900,
                "allocation": "shared",
                "at_limit": "ask",
                "ask_up_to": {
                    "percent": 10
                }
            },
            "limits": {
                "allowed_stores": [
                    "https://casamarlinde.example"
                ],
                "allowed_categories": [
                    "travel"
                ]
            }
        }
    ]
}).json()
```

### Response 201

```json
{
  "plan": {
    "id": "dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1",
    "object": "delegation_plan",
    "version": 1,
    "status": "accepted",
    "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
    "task": "Lisbon trip, Dec 9 to 13",
    "proposed_by_agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R7",
    "edited_by": "agent",
    "helpers": [
      {
        "key": "flights",
        "agent": {
          "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
          "name": "Flights",
          "maker": {
            "id": "acct_scout",
            "name": "scout.example"
          },
          "verified": true
        },
        "purpose": "Book the flights",
        "budget": {
          "amount": 1100,
          "allocation": "reserved",
          "at_limit": "stop",
          "ask_up_to": null
        },
        "limits": null,
        "active": null,
        "network_grant_id": null
      },
      {
        "key": "rooms",
        "agent": {
          "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R2",
          "name": "Rooms",
          "maker": {
            "id": "acct_scout",
            "name": "scout.example"
          },
          "verified": true
        },
        "purpose": "Book the hotel",
        "budget": {
          "amount": 900,
          "allocation": "shared",
          "at_limit": "ask",
          "ask_up_to": {
            "percent": 10
          }
        },
        "limits": {
          "allowed_stores": [
            "https://casamarlinde.example"
          ],
          "allowed_categories": [
            "travel"
          ]
        },
        "active": null,
        "network_grant_id": null
      }
    ],
    "budget": {
      "total": 2000,
      "of": 2400,
      "currency": "USD"
    },
    "available_helpers": null,
    "requests_raise": null,
    "review": {
      "mode": "auto_accept",
      "expires_at": "2026-11-27T19:00:00.000Z",
      "url": "https://app.provenanceauth.com/me/plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1"
    },
    "decided_at": "2026-11-26T19:00:00.000Z",
    "decided_via": "auto",
    "created_at": "2026-11-26T19:00:00.000Z"
  },
  "status": "accepted",
  "children": []
}
```

## Revise a plan of subagents

`POST /v1/mandate/delegation_plans/{id}/revisions`

Proposes the next version: the whole subagent list, keys kept. A revision that only tightens (removes a subagent, lowers a budget, shortens dates) applies at once and the person gets a notice; anything else is reviewed under the person's setting while the accepted version keeps running.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The plan (`dpl_…`). |
| `task` | body | string | no | The task in one line, shown as the plan's head. |
| `helpers` | body | array of objects | yes | The helpers, each a registered, verified agent. |
| `helpers.key` | body | string | yes | Stable across versions ("flights"), so a revision says what changed. |
| `helpers.agent_id` | body | string | yes | A registered agent with an active signing key; another maker's agent is named to the person with its maker. |
| `helpers.purpose` | body | string | yes | What the subagent is for ("Book the flights"). |
| `helpers.budget` | body | object | yes | The helper's budget and its two settings. |
| `helpers.budget.amount` | body | number | yes | In major units of the grant's currency. |
| `helpers.budget.allocation` | body | enum | no | `reserved`: set aside from the grant; other subagents can't spend it. `shared` (the default): drawn from what the grant has left. One of `reserved`, `shared`. |
| `helpers.budget.at_limit` | body | enum | no | At the amount: `stop` refuses, `ask` asks the person up to `ask_up_to` past it, `continue` goes past without asking while the grant above has room. Default `ask` for `shared`, `stop` for `reserved`. One of `stop`, `ask`, `continue`. |
| `helpers.budget.ask_up_to` | body | object \| null | no | With `ask` only: `{ percent }` (20 by default when left out) or `{ amount }` past the amount; null asks at any amount the grant has room for. |
| `helpers.budget.ask_up_to.percent` | body | number | no | The margin in percent of the amount. |
| `helpers.budget.ask_up_to.amount` | body | number | no | The margin as a fixed amount. |
| `helpers.limits` | body | object \| null | no | Its limits, each narrower than the grant's (null: the grant's). |
| `helpers.limits.max_amount` | body | number \| null | no | Per-order cap, at most the grant's. |
| `helpers.limits.allowed_stores` | body | array of strings \| null | no | Within the grant's stores. A merchant lock: at any other store the subagent is refused (`outside_merchant_lock`), never asked. |
| `helpers.limits.allowed_categories` | body | array of strings | no | Within the grant's categories. |
| `helpers.limits.accept_within` | body | object | no | How far an outside agent's offer may differ from a brief before the person is asked (`constraints.accept_within` on a grant). Every field is optional; a child grant inherits what it leaves out and can't loosen a field, nor set one its parent leaves out (past the strictest value). With none anywhere in the chain, only an offer no worse in every way is accepted alone. Never on the grant token. |
| `helpers.limits.accept_within.price_up_pct` | body | number | no | The most the price may rise, as a percentage of the brief's price line. |
| `helpers.limits.accept_within.price_up_amount` | body | number | no | The most the price may rise, in the grant's currency (major units). Both price fields must pass when both are set. |
| `helpers.limits.accept_within.date_earlier_minutes` | body | integer | no | How much earlier a date may move. |
| `helpers.limits.accept_within.date_later_minutes` | body | integer | no | How much later a date may move. |
| `helpers.limits.accept_within.substitutes` | body | enum | no | Whether a substitute item in the brief line's category may be accepted. One of `none`, `same_category`. |
| `helpers.limits.accept_within.quantity_short` | body | enum | no | Whether an offer of part of the quantity may be accepted. One of `none`, `partial`. |
| `helpers.limits.accept_within.terms_worse` | body | boolean | no | Whether worse terms (not refundable, an earlier cancellation deadline, a change fee, later delivery) may be accepted. |
| `helpers.limits.accept_within.other_seller` | body | boolean | no | Whether a seller other than the brief's counterparties may be accepted. |
| `helpers.limits.accept_within.on_timeout` | body | enum | no | What happens when the person doesn't answer an ask (default `decline`). Asks arrive in a later slice. One of `decline`, `accept_within_tolerances`. |
| `helpers.active` | body | object \| null | no | The subagent's dates, inside the grant's. |
| `helpers.active.from` | body | timestamp \| null | no | The first day. |
| `helpers.active.until` | body | timestamp \| null | no | The last day. |

### Returns

Accepted at once under the person's review setting, with the subagent grants minted. See [the delegation plan result object](#object).

### Errors

- [`delegation_not_allowed`](https://provenanceauth.com/docs/platform/errors.md#delegation_not_allowed)
- [`delegation_exceeds_parent`](https://provenanceauth.com/docs/platform/errors.md#delegation_exceeds_parent)
- [`helper_not_verified`](https://provenanceauth.com/docs/platform/errors.md#helper_not_verified)
- [`external_helper_not_allowed`](https://provenanceauth.com/docs/platform/errors.md#external_helper_not_allowed)
- [`purpose_required`](https://provenanceauth.com/docs/platform/errors.md#purpose_required)
- [`delegation_depth_exceeded`](https://provenanceauth.com/docs/platform/errors.md#delegation_depth_exceeded)
- [`delegation_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#delegation_limit_reached)
- [`network_grant_inactive`](https://provenanceauth.com/docs/platform/errors.md#network_grant_inactive)
- [`chain_unavailable`](https://provenanceauth.com/docs/platform/errors.md#chain_unavailable)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`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/delegation_plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1/revisions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "helpers": [
      {
        "key": "flights",
        "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
        "purpose": "Book the flights",
        "budget": {
          "amount": 900,
          "allocation": "reserved",
          "at_limit": "stop"
        }
      }
    ]
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/delegation_plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1/revisions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "helpers": [
      {
        "key": "flights",
        "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
        "purpose": "Book the flights",
        "budget": {
          "amount": 900,
          "allocation": "reserved",
          "at_limit": "stop"
        }
      }
    ]
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/delegation_plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1/revisions", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "helpers": [
        {
            "key": "flights",
            "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
            "purpose": "Book the flights",
            "budget": {
                "amount": 900,
                "allocation": "reserved",
                "at_limit": "stop"
            }
        }
    ]
}).json()
```

### Response 201

```json
{
  "plan": {
    "id": "dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1",
    "object": "delegation_plan",
    "version": 1,
    "status": "accepted",
    "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
    "task": "Lisbon trip, Dec 9 to 13",
    "proposed_by_agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R7",
    "edited_by": "agent",
    "helpers": [
      {
        "key": "flights",
        "agent": {
          "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
          "name": "Flights",
          "maker": {
            "id": "acct_scout",
            "name": "scout.example"
          },
          "verified": true
        },
        "purpose": "Book the flights",
        "budget": {
          "amount": 1100,
          "allocation": "reserved",
          "at_limit": "stop",
          "ask_up_to": null
        },
        "limits": null,
        "active": null,
        "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0F9"
      },
      {
        "key": "rooms",
        "agent": {
          "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R2",
          "name": "Rooms",
          "maker": {
            "id": "acct_scout",
            "name": "scout.example"
          },
          "verified": true
        },
        "purpose": "Book the hotel",
        "budget": {
          "amount": 900,
          "allocation": "shared",
          "at_limit": "ask",
          "ask_up_to": {
            "percent": 10
          }
        },
        "limits": {
          "allowed_stores": [
            "https://casamarlinde.example"
          ],
          "allowed_categories": [
            "travel"
          ]
        },
        "active": null,
        "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R9"
      }
    ],
    "budget": {
      "total": 2000,
      "of": 2400,
      "currency": "USD"
    },
    "available_helpers": null,
    "requests_raise": null,
    "review": {
      "mode": "prompt",
      "expires_at": "2026-11-27T19:00:00.000Z",
      "url": null
    },
    "decided_at": "2026-11-26T19:05:00.000Z",
    "decided_via": "home",
    "created_at": "2026-11-26T19:00:00.000Z"
  },
  "status": "accepted",
  "children": [
    {
      "object": "network_grant",
      "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0F9",
      "parent_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
      "agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
      "plan_id": "dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1",
      "plan_version": 1,
      "plan_helper_key": "flights",
      "purpose": "Book the flights",
      "budget": {
        "amount": 1100,
        "allocation": "reserved",
        "at_limit": "stop",
        "ask_up_to": null
      },
      "constraints": {
        "max_amount": 1500,
        "budget_amount": 1100,
        "budget_window": "month",
        "currency": "USD",
        "allowed_stores": null,
        "blocked_stores": [],
        "allowed_categories": [],
        "heartbeat": null,
        "expires_at": "2027-06-30T00:00:00.000Z",
        "purpose": "Book the flights"
      },
      "created": true,
      "network_mandate": "eyJhbGciOiJFUzI1NiIsInR5cCI6Im5ldHdvcmstbWFuZGF0ZStqd3QifQ.eyJqdGkiOiJuZ3JfMDFNNVg5In0.sig"
    }
  ]
}
```

## Withdraw a proposed plan

`POST /v1/mandate/delegation_plans/{id}/withdraw`

Withdraws the plan's proposed version. The accepted version, if any, keeps running.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The plan (`dpl_…`). |

### Returns

The withdrawn version.

### Errors

- [`plan_closed`](https://provenanceauth.com/docs/platform/errors.md#plan_closed)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_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/delegation_plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1/withdraw" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

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

**Python**

```python
import os
import httpx

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

### Response 200

```json
{
  "id": "dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1",
  "object": "delegation_plan",
  "version": 1,
  "status": "withdrawn",
  "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
  "task": "Lisbon trip, Dec 9 to 13",
  "proposed_by_agent_id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R7",
  "edited_by": "agent",
  "helpers": [
    {
      "key": "flights",
      "agent": {
        "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0F1",
        "name": "Flights",
        "maker": {
          "id": "acct_scout",
          "name": "scout.example"
        },
        "verified": true
      },
      "purpose": "Book the flights",
      "budget": {
        "amount": 1100,
        "allocation": "reserved",
        "at_limit": "stop",
        "ask_up_to": null
      },
      "limits": null,
      "active": null,
      "network_grant_id": null
    },
    {
      "key": "rooms",
      "agent": {
        "id": "agt_01M5X9A2B7Q9V3N8K4T6W1Y0R2",
        "name": "Rooms",
        "maker": {
          "id": "acct_scout",
          "name": "scout.example"
        },
        "verified": true
      },
      "purpose": "Book the hotel",
      "budget": {
        "amount": 900,
        "allocation": "shared",
        "at_limit": "ask",
        "ask_up_to": {
          "percent": 10
        }
      },
      "limits": {
        "allowed_stores": [
          "https://casamarlinde.example"
        ],
        "allowed_categories": [
          "travel"
        ]
      },
      "active": null,
      "network_grant_id": null
    }
  ],
  "budget": {
    "total": 2000,
    "of": 2400,
    "currency": "USD"
  },
  "available_helpers": null,
  "requests_raise": null,
  "review": {
    "mode": "prompt",
    "expires_at": "2026-11-27T19:00:00.000Z",
    "url": "https://app.provenanceauth.com/me/plans/dpl_01M5X9A2B7Q9V3N8K4T6W1Y0P1"
  },
  "decided_at": null,
  "decided_via": null,
  "created_at": "2026-11-26T19:00:00.000Z"
}
```

## Answer a person's question

`POST /v1/mandate/approvals/{id}/answers`

Answers the latest open question on one of your account's waiting requests (`appr_…` or `noa_…`). The answer shows on the request as the agent's answer; the request keeps waiting.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The request's ID. |
| `text` | body | string | yes | The answer. |
| `question_id` | body | string | no | A specific question (`note_…`); default the latest open one. |

### Returns

The answer.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/mandate/approvals/noa_01M6B4R1D2K7Q9V3N8K4T6W1Y0/answers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "It'\''s the only store with the linen notebook in stock." }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/approvals/noa_01M6B4R1D2K7Q9V3N8K4T6W1Y0/answers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "text": "It's the only store with the linen notebook in stock." }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/approvals/noa_01M6B4R1D2K7Q9V3N8K4T6W1Y0/answers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "text": "It's the only store with the linen notebook in stock."
}).json()
```

### Response 200

```json
{
  "object": "agent_note_answer",
  "id": "note_01M6B6A2C8R0W4P9L5U7X2Z1S3",
  "approval_id": "noa_01M6B4R1D2K7Q9V3N8K4T6W1Y0",
  "answered_at": "2026-11-01T16:03:20.000Z"
}
```

## Buy under a network mandate

`POST /v1/mandate/network_orders`

Within the limits: the amount is reserved and a 10-minute cart-bound token comes back. Outside them: `approval_required`; retry with `approval_id` once approved. Inactive: `refused`. A limit the person can change adds `adjust` and `retry`; above `hard_max` it's refused `over_ceiling`. See [when a person changes a grant](https://provenanceauth.com/docs/mandate/guides/when-a-person-changes-a-grant.md).

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `network_mandate` | body | string | yes | The network-mandate token the person granted. |
| `order` | body | object | yes | `checkoutBinding(order)` from `@provenanceauth/rails/checkout`: the store's normalized order. |
| `aud` | body | string | yes | The store's origin; it must equal `order.origin`. |
| `approval_id` | body | string | no | After the person approved this exact order outside the limits. |
| `counter_offer_id` | body | string | no | The accepted proposal this order buys. The order must match the acceptance (amount with the option's tax and fees, currency, store, lines), and uses it once (409 `counter_offer_terms_changed` or `counter_offer_closed`). The person's yes on it is this order's approval. |
| `payment_method` | body | object | no | The card this order pays with (brand, last four, wallet), never a card number. It joins the person's card list; when the grant names another card, the order asks (`payment_card_mismatch`). |
| `payment_method.brand` | body | enum | yes | The card's brand. One of `visa`, `mastercard`, `amex`, `discover`, `jcb`, `unionpay`, `diners`, `other`. |
| `payment_method.last4` | body | string | yes | The card's last four digits. |
| `payment_method.wallet` | body | string | no | The wallet it pays through (`apple_pay`). |
| `payment_method.network_token` | body | boolean | no | True when the card is a network agent token. |
| `agent_session` | body | object | no | This run of your agent, so the person sees it as its own session and can stop or limit it. A stopped session is refused with `session_stopped`. |
| `agent_session.id` | body | string | yes | Your session's ID (stored hashed). |
| `agent_session.client` | body | object | no | The label the person sees. |
| `agent_session.client.name` | body | string | no | Your agent's name. |
| `agent_session.client.version` | body | string | no | Its version. |
| `agent_session.workspace` | body | string | no | What this run works on, shown to the person. |

### Returns

`authorized`, `approval_required` or `refused`.

### Errors

- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`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/network_orders" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "network_mandate": "eyJhbGciOiJFUzI1NiIsInR5cCI6Im5ldHdvcmstbWFuZGF0ZStqd3QifQ.eyJqdGkiOiJubWRfMDFNNVg5QTJCN1E5VjNOOEs0VDZXMVkwUjUifQ.sig",
    "aud": "https://shop.quillstack.example",
    "order": {
      "order_id": "ord_88213",
      "total": 3800,
      "currency": "usd",
      "merchant_id": "m_quillstack",
      "origin": "https://shop.quillstack.example",
      "items": [
        {
          "sku": "nb-linen",
          "name": "Linen notebook",
          "quantity": 2,
          "unit_amount": 1900
        }
      ]
    }
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/network_orders`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "network_mandate": "eyJhbGciOiJFUzI1NiIsInR5cCI6Im5ldHdvcmstbWFuZGF0ZStqd3QifQ.eyJqdGkiOiJubWRfMDFNNVg5QTJCN1E5VjNOOEs0VDZXMVkwUjUifQ.sig",
    "aud": "https://shop.quillstack.example",
    "order": {
      "order_id": "ord_88213",
      "total": 3800,
      "currency": "usd",
      "merchant_id": "m_quillstack",
      "origin": "https://shop.quillstack.example",
      "items": [
        {
          "sku": "nb-linen",
          "name": "Linen notebook",
          "quantity": 2,
          "unit_amount": 1900
        }
      ]
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/network_orders", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "network_mandate": "eyJhbGciOiJFUzI1NiIsInR5cCI6Im5ldHdvcmstbWFuZGF0ZStqd3QifQ.eyJqdGkiOiJubWRfMDFNNVg5QTJCN1E5VjNOOEs0VDZXMVkwUjUifQ.sig",
    "aud": "https://shop.quillstack.example",
    "order": {
        "order_id": "ord_88213",
        "total": 3800,
        "currency": "usd",
        "merchant_id": "m_quillstack",
        "origin": "https://shop.quillstack.example",
        "items": [
            {
                "sku": "nb-linen",
                "name": "Linen notebook",
                "quantity": 2,
                "unit_amount": 1900
            }
        ]
    }
}).json()
```

### Response 200

```json
{
  "object": "network_authorization",
  "result": "authorized",
  "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
  "intent_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig",
  "expires_at": "2026-10-26T19:50:00.000Z",
  "reservation": {
    "amount": 38,
    "currency": "USD"
  }
}
```

## Confirm a network order

`POST /v1/authorize/network_orders/confirm`

The store's one online step: the reserved budget becomes spend, the order joins the person's Orders, and the store is metered. A repeat by the same store returns the first result.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `intent_token` | body | string | yes | The `Provenance-Intent` token the agent presented. |

### Returns

The acceptance.

### Errors

- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`network_grant_inactive`](https://provenanceauth.com/docs/platform/errors.md#network_grant_inactive)
- [`network_token_expired`](https://provenanceauth.com/docs/platform/errors.md#network_token_expired)
- [`network_order_closed`](https://provenanceauth.com/docs/platform/errors.md#network_order_closed)
- [`usage_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#usage_limit_reached)
- [`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/authorize/network_orders/confirm" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig" }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/network_orders/confirm`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/network_orders/confirm", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig"
}).json()
```

### Response 200

```json
{
  "object": "network_acceptance",
  "id": "nrs_01M5X9A2B7Q9V3N8K4T6W1Y0R9",
  "status": "accepted",
  "network_grant_id": "ngr_01M5X9A2B7Q9V3N8K4T6W1Y0R5",
  "jti": "d770f6bc-a13b-4919-8d04-84a78ed0c2fa",
  "store_origin": "https://shop.quillstack.example",
  "amount": 38,
  "currency": "USD",
  "order_id": "ord_88213",
  "accepted_at": "2026-10-26T19:41:00.000Z"
}
```

## Cancel a network order

`POST /v1/authorize/network_orders/cancel`

A cancelled or refunded order gives its amount back to the person's budget. Only the store that accepted it can cancel it.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `intent_token` | body | string | yes | The order's token (an expired one is fine). |

### Returns

The cancellation.

### Errors

- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`network_order_closed`](https://provenanceauth.com/docs/platform/errors.md#network_order_closed)
- [`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/authorize/network_orders/cancel" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig" }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/network_orders/cancel`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/network_orders/cancel", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJuZXR3b3JrIjp0cnVlfQ.sig"
}).json()
```

### Response 200

```json
{
  "object": "network_cancellation",
  "id": "nrs_01M5X9A2B7Q9V3N8K4T6W1Y0R9",
  "status": "cancelled",
  "amount": 38,
  "currency": "USD",
  "cancelled_at": "2026-10-27T09:00:00.000Z"
}
```
