# Intent tokens

Authorizing an agent's action, verifying it before it runs, and revoking it.

Related guide: [Verify a token](https://provenanceauth.com/docs/authorize/guides/verify-tokens.md)

## Endpoints

- `POST /v1/mandate/intents`: [Create an intent token](#post-v1-mandate-intents)
- `POST /v1/mandate/biometric_challenges`: [Create a biometric challenge](#post-v1-mandate-biometric-challenges)
- `POST /v1/mandate/revocations`: [Revoke tokens](#post-v1-mandate-revocations)
- `GET /v1/mandate/intents/{id}`: [Check a token's revocation status](#get-v1-mandate-intents-id)
- `POST /v1/mandate/assessments`: [Assess an agent action](#post-v1-mandate-assessments)

## The intent authorization object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `intent_token` | string | no | Compact JWS, signed with ES256 (header alg=ES256, kid); payload carries `iss`, `jti` (= attestation_id), `sub`, `session`, `action_hash`, and `payload_hash` when a payload is bound. `sub` is an opaque subject, never the device id: with an `audience` it is pairwise (`psub_` + 26 characters, the same for one device at that audience and unrelated at every other); without one it is per token (`anon_` + 26 characters). Tokens minted before pairwise subjects carry the device's UUID until they expire. Verify it against the JWKS (offline: authenticity + expiry only) or via POST /v1/mandate/assessments (full check incl. binding + revocation). |
| `expires_at` | timestamp | no | When it expires. |
| `attestation_id` | string | no | Also the token `jti`. |
| `biometric_bound` | boolean | no | Whether a passkey check was verified at authorize (on a step-up, by the approval). |
| `object` | enum | no | The type of object. One of `intent_authorization`. |
| `status` | enum | no | Checkout step-up only (absent otherwise), and `approval_pending` with `options`. `approved` carries the token; every other status carries none. One of `approved`, `approval_pending`, `approval_denied`, `approval_expired`, `approval_muted`, `approval_too_weak`. |
| `reason` | string | no | Checkout step-up only, when there is no token. A code from the reason registry. |
| `approval_id` | string | no | Checkout step-up only, while pending or once decided. |
| `approval_link_token` | string | no | Sandbox only (the dev link echo). The single-use approval link token, so a test can finish the loop. |
| `option_group_id` | string | no | With `options`: the group every option's token carries. |
| `approval_expires_at` | timestamp | no | With `options`: when the person's approval of the group expires. |
| `options` | array of objects | no | With `options`: one token per option. Verify only the chosen option's token; the others answer `option_not_chosen`. |
| `options.index` | integer | no | The option's position, from 0. |
| `options.label` | string | no | The label on the option's card. |
| `options.intent_token` | string | no | This option's intent token (its own `jti` and `action_hash`). |
| `options.attestation_id` | string | no | Also this token's `jti`. |
| `options.disabled` | boolean | no | True when the account's policy denies this option outright (shown disabled). |
| `options.disabled_reason` | string | no | The policy reason. |
| `approval` | object | no | Checkout step-up only, on `approved`. The same object as the token's `approval` claim. `method` is `device_biometric` (the person's enrolled device) or `passkey` (an approver-network passkey), and is absent when no passkey check was made. |
| `approval.id` | string | no | The approval's ID. |
| `approval.approved_at` | timestamp | no | When the person approved. |
| `approval.method` | enum | no | How the person approved. One of `device_biometric`, `passkey`. |
| `reused` | object | no | Present only when no one was asked because this order or action was already answered: by the agent's own token (`intent_token`), or by an earlier approval of the same binding that the agent (`agent`, `routed` when it went to an outside approver), a store (`store`) or a network order (`network`) asked for. You learn only what your own token carries; never the other party's account, approval ID, contact or deny reason. See [ask once](https://provenanceauth.com/docs/authorize/guides/ask-once.md). |
| `reused.source` | enum | yes | Who asked first. One of `intent_token`, `agent`, `store`, `network`, `routed`. |
| `confirmed_via` | object | no | Present only when the person confirmed outside Provenance (`decided_via` is then `external`). |
| `confirmed_via.kind` | enum | yes | The kind of confirmation. One of `ap2_user_mandate`, `spc`, `platform`. |
| `confirmed_via.issuer` | string | no | Whose word it is: the AP2 issuer or platform named in your policy, or your store's origin for a passkey your store registered. Absent for a passkey set up with Provenance. |
| `confirmed_via.evidence_hash` | string | yes | The SHA-256 of the evidence (the evidence itself isn't kept). |
| `decided_via` | enum | no | Checkout step-up only, with `confirmed_via`. One of `external`. |
| `external_confirmation` | object | no | Present only when an outside confirmation was refused; the request asks the person as usual. |
| `external_confirmation.result` | enum | yes | Always `refused`. One of `refused`. |
| `external_confirmation.kind` | enum | yes | The kind sent. One of `ap2_user_mandate`, `spc`, `platform`. |
| `external_confirmation.reason` | enum | yes | Why it was refused (see the reason codes). One of `issuer_not_trusted`, `issuer_unreachable`, `signature_invalid`, `binding_mismatch`, `kind_not_accepted`, `expired`. |

### Example

```json
{
  "object": "intent_authorization",
  "intent_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImY3NjVhOTlhZDA1NDNkOTkifQ.eyJpc3MiOiJwcm92ZW5hbmNlLWF1dGhvcml6ZSIsImp0aSI6ImNjZWFiYzYwLTkwNmItNGVmOS05YWRlLTJlYmNkNDE1OTJkNyIsInN1YiI6ImFub25fd2prbmprend0ZnBicXNudTU1bjJ6ZjRkYWQiLCJpYXQiOjE3OTQwNzkzMDYsImV4cCI6MTc5NDA5MzcwNiwiYWN0aW9uX2hhc2giOiI3NDBhNGI0MWFjMWZkYzU1MzJlZDBjNzA0Mzk0NTczZTkzMDM1NDJmYTU5ZmUzYWNiMWM3M2IzZGNiNjNlMmQxIiwicGF5bG9hZF9oYXNoIjoiZGYyYThhMzMzOWExYjdhZGM1ZWMxMTAyN2U5MWFmMDcxNmZhZWFlYWFhMmY4ZTk4Mjc2YmVhMDJlNGRmZGE0NiIsInJpc2siOnsic2NvcmUiOjMwLCJhY3Rpb24iOiJhbGxvdyJ9fQ.b_tKtL0e3CHLYGkOS0y59da2Gv0MqgpbjdNdCGeAkg-IcdHyh99w-PGeL6I3j42a6NeDuEYAZ6kwsADG-pMgjA",
  "expires_at": "2026-11-07T23:21:46.000Z",
  "attestation_id": "cceabc60-906b-4ef9-9ade-2ebcd41592d7",
  "biometric_bound": false
}
```

## Events

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

- `mandate.assessment.denied`
- `mandate.intent.revoked`

## Create an intent token

`POST /v1/mandate/intents`

Mints an ES256 intent token that binds an agent session and device to the SHA-256 of an action's description and, when sent, its exact payload. Until the person your rules ask approves, it's [held](https://provenanceauth.com/docs/authorize/guides/verify-tokens.md#approval-holds).

With `approval`, it answers a store's checkout challenge ([step-up](https://provenanceauth.com/docs/authorize/guides/verify-agent-checkout.md#ask-the-shopper-to-approve)).

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). |
| `DPoP` | header | string | no | A DPoP proof (RFC 9449) from the grant's holder key, when the grant is holder-bound (`holder_jkt`): an ES256 `dpop+jwt` naming this request (`htm`, `htu`), `iat` within 60 seconds, a fresh `jti`, and `ath`, the SHA-256 of the grant token sent. One per request. See [bind a grant to its holder](https://provenanceauth.com/docs/mandate/guides/bind-a-grant-to-its-holder.md). |
| `action_description` | body | string | no | The human-readable action, exactly as authorized. Required unless you send `options`. |
| `action_payload` | body | any | no | Opaque; its canonical-JSON SHA-256 is bound into the token. |
| `options` | body | array of objects | no | "Choose one": 2 to 5 complete actions instead of `action_description`. Each is hashed and gets its own token (a distinct `jti` and `action_hash`, all carrying `option_group_id`); one approval holds the group and opens now. The person approves exactly one; verify on the others answers `option_not_chosen`. The account's policy runs on each option, and one it denies outright is shown disabled. Can't be combined with `action_description`, `action_payload`, `approval`, `mandate_token` or `display_summary`. |
| `options.label` | body | string | yes | The option's card label ("United 9:40 am"); unique in the request. |
| `options.action` | body | string | yes | The option's action description, hashed into its token. |
| `options.payload` | body | any | no | The option's exact payload (opaque), hashed into its token. `action_payload` is accepted too. |
| `options.context` | body | object | no | Policy facts and card facts for this option (`transaction_amount`, `currency`, `payee`, `date`, …), up to 20. |
| `revises` | body | string | no | The approval this request revises: one that ended `changes_requested`. The token carries it (`revises` claim), and the new approval shows the person what changed. |
| `run_id` | body | string | no | An agent-team run to join. The token carries `run`, and the session stops when the run is halted. Defaults to the mandate's run. |
| `agent_session_id` | body | string | yes | The agent session the token was minted for. |
| `device_id` | body | string | yes | The capture or approving device's ID. |
| `agent_id` | body | string | no | The registered agent that asks. The token's `agent` claim carries `{ id, name, integration, sdk_version }`: the agent's id and name, plus the integration the client declares in its `User-Agent` (`mcp`, `ai_sdk`, `langchain`, `langchain_py`, `claude_agent_sdk`, `claude_agent_sdk_py`, `openai_agents`, `openai_agents_py`, `adk_py`, `crewai_py` or `none`), signed as reported. A merchant reads it at checkout. |
| `mandate_token` | body | string | no | Authorize UNDER a delegation mandate. The mandate is validated here (signature, status, expiry, device/session binding — invalid ⇒ 400 grant_invalid) and its `grant_id` is bound into the resulting token so verify enforces its constraints and budget. A holder-bound grant (`holder_jkt`) also needs its holder's DPoP proof in the `DPoP` header (401 `dpop_proof_required`, `dpop_proof_invalid`, `dpop_proof_replayed` or `holder_mismatch`). |
| `counter_offer_id` | body | string | no | the accepted counter-offer this action buys. Needs `mandate_token` (the counter-offer's grant). When the accepted option gave an `action_hash`, the action's payload hash must equal it; the amount and counterparty are checked at verify, where the acceptance is spent (one purchase each). A mismatch is 409 `counter_offer_terms_changed` and no token is minted. The token carries no new claim: the id stays on the token's server-side record. |
| `context_evidence` | body | object | no | The agent's justification for the action (a JSON blob of scalars/strings, ≤ ~8KB). Canonicalized + hashed into the token (context_hash), sealed onto the ledger + receipts, and shown to the human in the "Why the agent is asking" panel. It is the agent's STATED reason — a claim, not a verified fact. verify may re-supply it to re-check (context_hash_mismatch on mutation). Free. |
| `trace_id` | body | string | no | Bind a Trace (a traced inference from /v1/trace/chat/completions, or a sidecar reading, this account) into the token as `trace: {id, canary_hash}`, so `fact:"canary"` policy conditions read its canary readings at verify. Another account's trace → 404 resource_missing. |
| `approval` | body | object | no | A merchant-requested checkout step-up, taken from the store's `ProvenanceIntent` challenge (`approval_request`); pass the challenge's `binding` as `action_payload`. The first call opens an approval bound to that exact order and answers `approval_pending`; relay it to the person (the `mandate.approval.created` webhook and the approval embed, or an approver link). The same call after the approval returns the token. A declined, expired or muted step-up answers 200 with that `reason` and no token. No delivery path → 503 `stepup_delivery_not_configured`; over the per-person, per-store or per-account limits → 429 `rate_limit_exceeded`, with no notification. No field identifies the person; `ships_to` is coarse order data the store holds. |
| `approval.merchant_origin` | body | string | yes | The origin of the URL your agent called (`https://shop.example`). It must equal the binding's `origin`. |
| `approval.display` | body | object | yes | What the person sees that the order can't bind. Optional `total`, `currency` and `items` must repeat the binding exactly. |
| `approval.display.merchant_name` | body | string | yes | The store's own name, shown as "calls itself …" (sanitized, at most 80 characters). |
| `approval.display.ships_to` | body | object | no | City, region and country only. |
| `approval.display.ships_to.city` | body | string | no | The city. |
| `approval.display.ships_to.region` | body | string | no | The region or state. |
| `approval.display.ships_to.country` | body | string | no | The country. |
| `approval.display.total` | body | integer | no | The bound total in minor units. |
| `approval.display.currency` | body | string | no | The bound ISO 4217 currency. |
| `approval.display.items` | body | array of objects | no | The bound quantities per SKU. |
| `approval.display.items.sku` | body | string | no | The SKU. |
| `approval.display.items.quantity` | body | integer | no | The quantity. |
| `approval.expires_at` | body | timestamp | yes | The challenge's expiry. The approval lasts until this or 10 minutes, whichever comes first. |
| `approval.require_biometric` | body | boolean | no | Ask for face, fingerprint or passkey on the person's enrolled device. No enrolled credential → `approval_too_weak`. |
| `approval.min_tier` | body | enum | no | The store's minimum device tier. A passkey (routed) approval can't meet it → `approval_too_weak`. One of `tee`, `strongbox`, `sep`. |
| `approval.transport` | body | enum | no | How the store asked (default `checkout`). With `acp`, `action_payload` is the ACP binding. With `request`, it is an Identify request binding (`kind: "request"`, origin, action, method, path), `display` holds only `merchant_name`, and the person approves with a biometric or passkey. One of `checkout`, `acp`, `request`. |
| `approval.route` | body | object | no | Route the approval to an approver-network link instead of the in-house device. |
| `approval.route.approver_link_id` | body | string | no | An active approver link of this account. |
| `approval.external_confirmation` | body | object | no | A confirmation the person gave outside Provenance, accepted only when your policy's `external_confirmations.accept` lists its kind and it verifies for this exact cart. Screenshots, chat transcripts and an agent saying the person confirmed are never a kind. Every plan. See [ask once](https://provenanceauth.com/docs/authorize/guides/ask-once.md#5-accept-confirmations-given-outside-provenance). |
| `approval.external_confirmation.kind` | body | enum | yes | `ap2_user_mandate`: a closed AP2 0.2 mandate SD-JWT; `spc`: a Secure Payment Confirmation; `platform`: a listed agent platform's signed confirmation. One of `ap2_user_mandate`, `spc`, `platform`. |
| `approval.external_confirmation.evidence` | body | string \| object | yes | The SD-JWT presentation (`ap2_user_mandate`) or compact JWS (`platform`) as a string, or the SPC assertion as an object. |
| `approval.external_confirmation.evidence.credential_id` | body | string | no | The passkey's credential ID. |
| `approval.external_confirmation.evidence.assertion` | body | object | no | The assertion, base64url fields. |
| `approval.external_confirmation.evidence.assertion.authenticator_data` | body | string | yes | base64url authenticator data. |
| `approval.external_confirmation.evidence.assertion.client_data_json` | body | string | yes | base64url clientDataJSON (`type: payment.get`). |
| `approval.external_confirmation.evidence.assertion.signature` | body | string | yes | base64url signature. |
| `approval.external_confirmation.evidence.public_key` | body | string \| object | no | A passkey your store registered itself: its public key (PEM or JWK). The confirmation is then labelled as your store's credential. |
| `audience` | body | string | no | The one site this token is for (its `aud` claim): an http(s) origin (normalized, e.g. https://shop.example) or a merchant id. A site running Identify refuses a token minted for another audience. Present only when you send it. With an audience the token's `sub` is pairwise (`psub_…`): stable for this device at this audience, so Identify can give the person one pseudonym there. Without one, `sub` is per token (`anon_…`). |

### Returns

The signed intent token. See [the intent authorization object](#object).

### Errors

- [`agent_suspended`](https://provenanceauth.com/docs/platform/errors.md#agent_suspended)
- [`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)
- [`link_revoked`](https://provenanceauth.com/docs/platform/errors.md#link_revoked)
- [`grant_invalid`](https://provenanceauth.com/docs/platform/errors.md#grant_invalid)
- [`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)
- [`stepup_delivery_not_configured`](https://provenanceauth.com/docs/platform/errors.md#stepup_delivery_not_configured)
- [`usage_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#usage_limit_reached)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/mandate/intents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_1",
    "device_id": "dev_00000000000000000000000000000001"
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_1",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
        "type": "payment",
        "amount": 1850,
        "currency": "USD",
        "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_1",
    "device_id": "dev_00000000000000000000000000000001"
}).json()
```

### Response 200

```json
{
  "object": "intent_authorization",
  "intent_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImY3NjVhOTlhZDA1NDNkOTkifQ.eyJpc3MiOiJwcm92ZW5hbmNlLWF1dGhvcml6ZSIsImp0aSI6ImNjZWFiYzYwLTkwNmItNGVmOS05YWRlLTJlYmNkNDE1OTJkNyIsInN1YiI6ImFub25fd2prbmprend0ZnBicXNudTU1bjJ6ZjRkYWQiLCJpYXQiOjE3OTQwNzkzMDYsImV4cCI6MTc5NDA5MzcwNiwiYWN0aW9uX2hhc2giOiI3NDBhNGI0MWFjMWZkYzU1MzJlZDBjNzA0Mzk0NTczZTkzMDM1NDJmYTU5ZmUzYWNiMWM3M2IzZGNiNjNlMmQxIiwicGF5bG9hZF9oYXNoIjoiZGYyYThhMzMzOWExYjdhZGM1ZWMxMTAyN2U5MWFmMDcxNmZhZWFlYWFhMmY4ZTk4Mjc2YmVhMDJlNGRmZGE0NiIsInJpc2siOnsic2NvcmUiOjMwLCJhY3Rpb24iOiJhbGxvdyJ9fQ.b_tKtL0e3CHLYGkOS0y59da2Gv0MqgpbjdNdCGeAkg-IcdHyh99w-PGeL6I3j42a6NeDuEYAZ6kwsADG-pMgjA",
  "expires_at": "2026-11-07T23:21:46.000Z",
  "attestation_id": "cceabc60-906b-4ef9-9ade-2ebcd41592d7",
  "biometric_bound": false
}
```

## Create a biometric challenge

`POST /v1/mandate/biometric_challenges`

Returns a single-use WebAuthn challenge. Sign it with a passkey on the person's device and send the assertion to authorize, so the token is biometric-bound.

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). |

### Returns

A single-use passkey challenge and when it expires.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`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_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/mandate/biometric_challenges" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

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

**Python**

```python
import os
import httpx

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

### Response 200

```json
{
  "object": "biometric_challenge",
  "challenge": "yH75vl053p170MkEhCHCufUjr_ghFSYaNkAJ5yx3Xd4",
  "expires_at": "2026-11-07T19:26:46.217Z"
}
```

## Revoke tokens

`POST /v1/mandate/revocations`

Revokes one token, every token of an agent session, or every token from a device. Send exactly one of intent_token, jti, agent_session_id or device_id. The next verify fails with token_revoked.

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). |
| `intent_token` | body | string | no | The intent token from authorize. |
| `jti` | body | string | no | The intent token's ID. |
| `agent_session_id` | body | string | no | The agent session the token was minted for. |
| `device_id` | body | string | no | The capture or approving device's ID. |
| `reason` | body | string | no | The reason given or recorded. |

### Returns

The existing revocation, when it was already revoked.

### 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)
- [`revoke_forbidden`](https://provenanceauth.com/docs/platform/errors.md#revoke_forbidden)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_description": "Pay invoice INV-2041",
    "agent_session_id": "sess_reference_revoke",
    "device_id": "dev_00000000000000000000000000000001"
  }' > step.json
export INTENT_TOKEN=$(jq -r '.intent_token' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/revocations" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"intent_token\": \"$INTENT_TOKEN\",
    \"reason\": \"cancelled by the requester\"
  }"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_description": "Pay invoice INV-2041",
    "agent_session_id": "sess_reference_revoke",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
const intentToken = step1.intent_token;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/revocations`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "intent_token": intentToken,
    "reason": "cancelled by the requester"
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "action_description": "Pay invoice INV-2041",
    "agent_session_id": "sess_reference_revoke",
    "device_id": "dev_00000000000000000000000000000001"
}).json()
intent_token = step1["intent_token"]
data = httpx.post(f"{api}/v1/mandate/revocations", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "intent_token": intent_token,
    "reason": "cancelled by the requester"
}).json()
```

### Response 200

```json
{
  "id": "rev_01M5R0BZRVKPFE34W4ZHJKAP2B",
  "object": "revocation",
  "scope": "token",
  "value": "8a123986-8f02-4786-b682-a27cec1ef629",
  "revoked": true,
  "reason": "cancelled by the requester",
  "created_at": "2026-10-24T22:26:43.611Z"
}
```

## Check a token's revocation status

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

Returns whether a token is revoked, with the scope and reason. Use it after verifying a token offline, which can't see revocations.

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

### Parameters

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

### Returns

Whether the token is revoked.

### 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_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_description": "Pay invoice INV-2041",
    "agent_session_id": "sess_reference_status",
    "device_id": "dev_00000000000000000000000000000001"
  }' > step.json
export JTI=$(jq -r '.attestation_id' step.json)
curl "$PROVENANCE_API/v1/mandate/intents/$JTI" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_description": "Pay invoice INV-2041",
    "agent_session_id": "sess_reference_status",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
const jti = step1.attestation_id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents/${jti}`, {
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "action_description": "Pay invoice INV-2041",
    "agent_session_id": "sess_reference_status",
    "device_id": "dev_00000000000000000000000000000001"
}).json()
jti = step1["attestation_id"]
data = httpx.get(f"{api}/v1/mandate/intents/{jti}", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
```

### Response 200

```json
{
  "object": "intent_status",
  "jti": "1594137a-73d7-470b-ac2c-e8de0db56803",
  "revoked": false,
  "revoked_scope": null,
  "reason": null,
  "checked_at": "2026-11-07T19:21:46.216Z"
}
```

## Assess an agent action

`POST /v1/mandate/assessments`

Checks a token's signature and expiry, that the description and payload match what was authorized, revocation, and your account's policy. A refused action returns 200 with valid false and a reason. An action past a grant's limit that asks a person returns `approval_pending` (`delegation_over_limit`); see [subagents' limits](https://provenanceauth.com/docs/mandate/guides/give-subagents-their-own-limits.md#over-the-limit).

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). |
| `intent_token` | body | string | yes | The intent token from authorize. |
| `action_description` | body | string | yes | The human-readable action, exactly as authorized. |
| `action_payload` | body | any | no | Must match what was authorized when the token carries payload_hash. |
| `display` | body | object | no | Display only, for the approval page when this check asks a person: `kind` names what is asked about, so the page reads "Scout is asking you to approve a stay." Kept in the approval's `display`; never a token claim or a rule fact. Left out, the page says a payment. |
| `display.kind` | body | enum | no | What the person is asked to approve. One of `stay`, `flight`, `order`, `payment`, `booking`. |
| `approver` | body | object | no | Display only: the name of the person you expect to answer ("Maya Chen"), kept with the approval this check opens. A run waiting on it reads `waiting_on: "Maya Chen"`. Shown only to your account, never on the approval page; never a token claim or a rule fact. |
| `approver.name` | body | string | no | One line of 1 to 100 characters. |
| `request` | body | object | no | The agent's request as your tool or service received it. Its signature is checked before the token and returned as `signature`: Web Bot Auth through its `Signature-Agent` directory, or an HTTP message signature with no `Signature-Agent` against a key the agent registered with Provenance. A signature that doesn't verify makes the result `valid: false` with `agent_signature_invalid` (or `agent_signature_unverified` when its directory can't be checked). Read, never stored. |
| `request.method` | body | string | yes | The HTTP method. |
| `request.url` | body | string | yes | The full URL the agent called. |
| `request.headers` | body | object | yes | The request headers as sent, including `Signature`, `Signature-Input` and `Content-Digest`. |
| `request.body` | body | string | no | The request body as sent, at most 64 KB. Checked against `Content-Digest` when the signature covers it. |
| `context` | body | object | no | Facts for your policy. One list is allowed: `alternatives`, up to 10 payees the person can pick from in "Ask for a change". It is shown on the approval and is never a policy fact. Under a grant, `counterparty`, `currency`, `mcc` (the merchant's declared MCC, four digits), `merchant_country` (alpha-2 or ISO 3166-1 numeric), `service_start` and `service_end` (the dates of what is bought: a date or a date-time with an offset) are checked against the grant's lists and service window and every grant above it. |
| `approver_link_ids` | body | array of strings | no | Group sign-off: when a step-up rule fires, route the approval to these approver links (yours, accepted) instead of one. Each approver gets their own link and approves with their own passkey; each decision is its own ledger row. Pro and up. Not with `approver_link_id`. |
| `approvals_needed` | body | integer | no | With `approver_link_ids`: how many must approve, 1 to the group's size (default: all). |
| `deny_rule` | body | enum | no | With `approver_link_ids`: `any` (default) ends the request at the first deny; `unreachable` ends it once too few approvers are left to reach `approvals_needed`. One of `any`, `unreachable`. |
| `account_approvers` | body | boolean | no | With `approver_link_ids`: your own people count toward `approvals_needed` too (they decide in the console or the approval embed). |
| `trace_id` | body | string | no | The traced inference whose canary readings the policy's `fact: canary` conditions read. It takes precedence over the token's own trace. A stale or missing reading, or another account's, counts as unavailable. |
| `policy_version` | body | integer | no | Sandbox only. Decide with this version of your agent rules (a draft, typically) instead of the live one. A draft saved in a draft group needs that `draft_group`. In live, `400 parameter_invalid`; a version that doesn't exist, `404`. |
| `draft_group` | body | string | no | Sandbox only, with `policy_version`: the draft group the draft was saved in (the rules embed session's `rules.draft_group`). Another group's draft is `400 parameter_invalid`. |
| `explain` | body | enum | no | Explain tripped canary families (default), or also those at 0.8 of their threshold or more. One of `tripped`, `near`. |
| `inference_input` | body | object | no | Or re-read the canaries NOW over this prompt (metered `trace_canary_read`, after the plan allowance). ≤ 32 KB. |
| `inference_input.model` | body | string | no | The model to run, as a registry model ID or its short name. |
| `inference_input.messages` | body | array of objects | no | The chat messages, in order. |
| `approval_expires_in` | body | integer | no | The expiry of an approval this call opens, in seconds: 60 to 7 days, and never past the intent token's expiry. Defaults to the account default, then the server's. |
| `link_expires_in` | body | integer | no | How long each single-use link to the approver works, in seconds: at least 60, capped at the approval. Defaults to the whole approval window; a resend issues a new link for the same time. |
| `reminders` | body | object | no | For a routed approval: its automatic reminders (the `approval` schedule's shape). Left out, your account's schedule. |
| `reminders.enabled` | body | boolean | no | `true` tracks this request on the schedule (Pro and above on a live deployment: `402 plan_required` on `reminders.enabled` below Pro, nothing created; every plan in the sandbox); `false` sends it no automatic reminder (one by hand or by API is still allowed). |
| `reminders.after` | body | array of strings | no | Up to three offsets from the request's creation (`10m`, `24h`, `3d`), increasing, each at least the minimum gap after the one before, at most 7 days. Errors use the Settings messages on `reminders.after`. |
| `channels` | body | object | no | For a routed approval: which messages may go (`app_notification`, `email`, `text`). They narrow the approver's own order (their Provenance app, then their channels, then a text when they have a phone, then email), and one message goes. Left out, your account's default. |
| `delivery` | body | enum | no | `send`, or `self`: send nothing; the response carries `approve_url` for you to show in your own app. The approver still approves with their own passkey. `self` needs an approver link. Left out, your account's default. One of `send`, `self`. |
| `approver_link_id` | body | string | no | When a step-up rule fires, route the approval to this approver link (someone outside your account) instead of your own team. The link must be yours and accepted. The approver is texted a single-use link and approves with their passkey; the same verify call then returns `valid`. The link's ceiling and the approver's own limits apply (`approver_ceiling_exceeded`). An approval that already exists for this token and action keeps its routing. |

### Returns

The verification result. `valid` says whether the action may run; when it's false, `reason` says why. Canary, step-up and mandate outcomes add their own fields.

### 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)
- [`link_revoked`](https://provenanceauth.com/docs/platform/errors.md#link_revoked)
- [`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)
- [`spend_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#spend_limit_exceeded)
- [`usage_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#usage_limit_reached)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_1",
    "device_id": "dev_00000000000000000000000000000001"
  }' > step.json
export INTENT_TOKEN=$(jq -r '.intent_token' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/assessments" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"intent_token\": \"$INTENT_TOKEN\",
    \"action_description\": \"Pay invoice INV-2041: \$1,850.00 to Brindlecote Supplies\",
    \"action_payload\": {
      \"type\": \"payment\",
      \"amount\": 1850,
      \"currency\": \"USD\",
      \"payee\": \"acct_brindlecote_supplies\"
    },
    \"display\": {
      \"kind\": \"payment\"
    }
  }"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_1",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
const intentToken = step1.intent_token;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "intent_token": intentToken,
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    },
    "display": {
      "kind": "payment"
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
        "type": "payment",
        "amount": 1850,
        "currency": "USD",
        "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_1",
    "device_id": "dev_00000000000000000000000000000001"
}).json()
intent_token = step1["intent_token"]
data = httpx.post(f"{api}/v1/mandate/assessments", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "intent_token": intent_token,
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
        "type": "payment",
        "amount": 1850,
        "currency": "USD",
        "payee": "acct_brindlecote_supplies"
    },
    "display": {
        "kind": "payment"
    }
}).json()
```

### Response 200

```json
{
  "object": "mandate_assessment",
  "id": null,
  "approval_context": null,
  "valid": true,
  "hardware_attested": false,
  "scope_match": true,
  "payload_bound": true,
  "intent_token_age_seconds": 0,
  "policy": null,
  "signature": {
    "method": "none",
    "valid": null,
    "key_id": null,
    "directory": null,
    "agent_id": null,
    "covers": []
  },
  "authority": {
    "kind": "provenance_intent_token",
    "verified": true,
    "verified_against": "provenance_jwks",
    "alg": "ES256",
    "key_id": "a425023cd9d6b3c4",
    "issuer": "provenance-authorize",
    "mandate_id": null,
    "approval_context_id": null,
    "cart_match": "not_applicable"
  }
}
```
