# Decisions

The hash-chained ledger of every authorize and verify, with signed receipts.

Related guide: [Decision ledger](https://provenanceauth.com/docs/mandate/concepts/decision-ledger.md)

## Endpoints

- `GET /v1/mandate/assessments/{id}`: [Retrieve a mandate assessment](#get-v1-mandate-assessments-id)
- `GET /v1/mandate/assessments/{id}/receipt`: [Get a decision receipt](#get-v1-mandate-assessments-id-receipt)
- `GET /v1/mandate/assessments`: [List mandate assessments](#get-v1-mandate-assessments)
- `GET /v1/mandate/assessments/verify_chain`: [Verify the decision chain](#get-v1-mandate-assessments-verify-chain)

## The decision object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `auto_approval` | object | no | Present only on a valid verify an `auto_approve` clause approved. |
| `auto_approval.rule_id` | string | no | The rule the clause sits on. |
| `auto_approval.clause_id` | string | no | The clause's ID. |
| `auto_approval.label` | string | no | The clause's label. |
| `auto_approval.policy_version` | integer \| null | no | The policy version that approved it. |
| `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). |
| `id` | string | yes | Unique identifier for the object. |
| `object` | enum | yes | The type of object. One of `mandate_assessment`. |
| `environment` | string | yes | `sandbox` or `live`. |
| `account_id` | string | yes | The account's ID. |
| `carrier_id` | string | yes | The carrier the data belongs to. |
| `kind` | string | yes | What kind of object or event it is. |
| `jti` | string | yes | The intent token's ID. |
| `agent_session_id` | string | yes | The agent session the token was minted for. |
| `device_id` | string | yes | The capture or approving device's ID. |
| `facts` | object \| null | yes | The facts the policy evaluated. |
| `result` | string | yes | The result. |
| `reason` | string | yes | The reason given or recorded. |
| `matched_rule_id` | string \| null | yes | The rule ID as the record was written (part of the hashed record, so `record_hash` recomputes from this read); `policy` names the rule. |
| `policy_version` | integer \| null | yes | The policy version that decided it, as recorded; null for the default. |
| `policy` | object \| null | no | The rule that decided, the same block on every product's assessment and simulation: your policy's ID and the version that decided, the rule's ID and name, when it ran, what it did, and each of its conditions with the value the engine compared (`actual`). Only the deciding rule is listed. A computed comparison (a location match, a distance) appears in a result only here. Null when no rule decided; `reason` then says what did. |
| `policy.id` | string \| null | yes | The product's policy (`pol_…`), one per account and product, the same on every version. |
| `policy.version` | integer \| null | yes | The version that decided: null on the built-in default rules, 0 when a simulation runs a draft. |
| `policy.rule` | object | yes | The rule, and what it compared. |
| `policy.rule.id` | string | yes | The rule's ID (`rul_…`, or `rul_default_…` for a default row), kept across versions. |
| `policy.rule.ref` | string \| null | no | The rule's short display ID (`R-103`, or `R-04` outside checkout), the one the console shows beside the rule. Checkout rules carry their phase digit first: `R-1nn` at checkout, `R-2nn` after the customer answers. Kept across versions and never reused in the policy. Null when the rule's text is gone. |
| `policy.rule.name` | string \| null | yes | The rule's name in the builder, when it has one. |
| `policy.rule.phase` | enum | yes | When it ran: `assess`, or `after_approval` (a store's checkout rule run once the person decided); a Trace rule runs at `action` (before a tool call) or `completion` (on model output). One of `assess`, `after_approval`, `action`, `completion`. |
| `policy.rule.action` | enum | yes | What the rule did: Approve, Challenge (ask a person), Reject or Review. See [outcome words](https://provenanceauth.com/docs/reference/outcomes.md). One of `approve`, `challenge`, `reject`, `review`. |
| `policy.rule.conditions` | array of objects | yes | Each condition of the rule, with the value compared. |
| `policy.rule.conditions.fact` | string | yes | The fact (`order.amount`, `approval.location`, `class`, …). |
| `policy.rule.conditions.op` | string | yes | The operator. |
| `policy.rule.conditions.value` | any | yes | The value the condition compares with. |
| `policy.rule.conditions.actual` | any | yes | The value the engine compared; null when the fact was absent. |
| `policy.rule.conditions.unavailable` | string | no | Why `actual` is null: `not_collected`, `not_recorded` on a result read back from a record that didn't keep the value, or `withheld` for a raw field-timing fact (`agent.typing_interval_ms`, `agent.checkout_fill_seconds`), which rules read but no result returns. |
| `policy.rule.conditions.metric` | string | no | A velocity condition's counter (`verify_count`, `amount_sum`). |
| `policy.rule.conditions.window` | string | no | A velocity condition's window. |
| `policy.rule.conditions.per` | string | no | A velocity condition's subject. |
| `policy.rule.conditions.set` | string | no | A canary or prediction condition's family or probe. |
| `policy.rule.conditions.baseline` | string | no | A relative canary condition's baseline. |
| `policy.rule.conditions.path` | string | no | A field condition's path in the request. |
| `policy.trace` | object | no | The deciding rule's path, however deep: its groups, conditions, signals, scorecards with their rows, rule references and rule groups, each with its value and result. Present only when the path says more than `rule.conditions` (a nested group, a derived fact, an unavailable reading). Bounded at depth 6 and 60 nodes, then `truncated`. |
| `policy.trace.rounds` | integer | no | Rounds of fact resolution the decision took. |
| `policy.trace.nodes` | array of objects | yes | The path's nodes. `kind` is `condition`, `all`, `any`, `none`, `at_least`, `signal`, `scorecard`, `rule`, `group`, `flow` or `risk_score`; groups and signals hold `nodes`, a scorecard its `rows`. A `risk_score` node is a condition on a custom risk score: `key`, `label`, `version`, `answer`, `p` (as rules read them), `raw` (the model's own), `calibrated`, `fact`, `op`, `value`, `actual`, `result`, `evaluation_id` and `reason.status` (the text is on the evaluation). |
| `policy.trace.skipped` | object | no | Facts the decision never had to read, by cost tier (`tier_3: 1`). |
| `policy.trace.truncated` | boolean | no | The path was longer than the bounds. |
| `policy.unavailable` | array of objects | no | The facts the decision found unavailable, and why. Present only when there were some. |
| `policy.unavailable.fact` | string | yes | The fact. |
| `policy.unavailable.reason` | string | yes | Why: `timeout`, `error`, `unconfigured`, `deadline` and the rest. |
| `signature` | object \| any \| null | no | How the agent's request was signed, as the row recorded it (in `facts.signature_block`, under `record_hash`); null on rows written before November 17, 2026 and on rows that aren't assessments. |
| `signature.method` | enum | no | How the request was signed: `web_bot_auth`, `http_signature`, `network` (a card network agent program's tag), or `none` (no signature, or no request was checked). One of `web_bot_auth`, `http_signature`, `network`, `none`. |
| `signature.valid` | boolean \| null | no | True when the signature verified, false when one was sent and didn't, null when nothing was signed. A traffic assessment reports a failed signature (your traffic policy decides what it gets); a mandate assessment refuses it first (`agent_signature_invalid`). |
| `signature.key_id` | string \| null | no | The signature's `keyid` (the key's JWK thumbprint). |
| `signature.directory` | string \| null | no | Where the key was found: the `Signature-Agent` directory URL, or `provenance_registry` for a key registered with Provenance. |
| `signature.agent_id` | string \| null | no | The registered agent (`agt_…`) the key belongs to, when the signature verified against a key registered with Provenance or its hosted directory. |
| `signature.platform` | object \| any \| null | no | Checkout assessments only: the agent platform Identify named for the checkout (`signed` or `declared`), or null. |
| `signature.platform.name` | enum | no | The platform's catalog name. One of `openai`, `anthropic`, `google`, `microsoft`, `apple`, `perplexity`, `meta`, `common_crawl`. |
| `signature.platform.label` | string | no | The platform's display name (`OpenAI`). |
| `signature.platform.source` | enum | no | `signed` (verified through the platform's signing directory) or `declared` (a known crawler's user agent). One of `signed`, `declared`. |
| `signature.covers` | array of strings | no | The covered components, by name (`@authority`, `@method`, `@path`, `signature-agent`, `content-digest`). Empty when nothing was signed. |
| `authority` | object \| any \| null | no | What covered the action, as the row recorded it (in `facts.authority_block`); null on rows written before November 17, 2026 and on rows that aren't assessments. |
| `authority.kind` | enum | no | What covered the action. Assessments today return `provenance_intent_token`, `provenance_mandate`, `third_party_mandate` (checkout only) or `none`. One of `provenance_intent_token`, `provenance_mandate`, `third_party_mandate`, `spc`, `platform_confirmation`, `none`. |
| `authority.verified` | boolean | no | True when the token verified (ES256 against Provenance's published keys). |
| `authority.verified_against` | enum | no | What it was verified against: Provenance's published keys. One of `provenance_jwks`. |
| `authority.alg` | enum | no | The token's signing algorithm. One of `ES256`. |
| `authority.key_id` | string \| null | no | The `kid` of the key that signed the token. |
| `authority.issuer` | string \| null | no | The token's issuer (`iss`); on `third_party_mandate`, the name you listed the issuer under (or, through your own AP2 verifier, the mandate's `iss`). |
| `authority.mandate_id` | string \| null | no | The mandate the token was issued under, or the grant itself; null for a token with no mandate. |
| `authority.mandate_chain` | array of strings | no | The mandates from the person's grant down to the one the agent holds, root first (up to 5). Present with `mandate_id`; a traffic assessment leaves it out (the middleware can't see the chain). |
| `authority.approval_context_id` | string \| null | no | On `provenance_intent_token`: the approval context of the person's yes that minted the token, when one is known. |
| `authority.cart_match` | enum | no | How the covered thing matched what was assessed: `matched` (the token's binding hash, or an AP2 Payment Mandate's total, currency and payee, equal the cart's), `merchant_facts` (an AP2 Checkout Mandate matched your own Checkout), or `not_applicable` (an agent action or a request, where the payload or request hash binds instead). One of `matched`, `merchant_facts`, `not_applicable`. |
| `authority.protocol` | enum | no | On `third_party_mandate`: the mandate's protocol. One of `ap2`, `acp`. |
| `authority.verified_by` | enum | no | On `third_party_mandate`: verified against the keys of an issuer you list (`issuer_jwks`), or by your own AP2 verifier through Identify (`merchant_verifier`). One of `issuer_jwks`, `merchant_verifier`. |
| `authority.evidence_hash` | string \| null | no | On `third_party_mandate`: the SHA-256 (hex) of the mandate as presented, never the mandate; null when Provenance never saw it (a verdict your middleware reported). |
| `mandate_id` | any \| null | yes | The mandate's ID. |
| `agent_id` | any \| null | yes | The registered agent's ID. |
| `approver_id` | any \| null | yes | The network approver who decided. |
| `shadow_result` | any \| null | yes | The shadow version's result. |
| `shadow_reason` | any \| null | yes | The shadow version's reason. |
| `shadow_rule_id` | any \| null | yes | The shadow rule that matched. |
| `shadow_policy_version` | any \| null | yes | The shadow policy version that was evaluated. |
| `context_hash` | any \| null | yes | SHA-256 of the agent's stated reason, when one was bound. |
| `order_id` | any \| null | yes | The clinical order's ID. |
| `order_type` | any \| null | yes | The kind of clinical order. |
| `order_prescriber_id` | any \| null | yes | The prescriber, for a clinical order decision. |
| `order_prescriber_tier` | any \| null | yes | The prescriber's tier at the time, for a clinical order decision. |
| `trace_id` | any \| null | yes | The trace's ID. |
| `canary_hash` | any \| null | yes | SHA-256 of the canary readings, bound into tokens and manifests. |
| `check_decision` | any \| null | yes | The Trace check's decision for the reading. |
| `canary_baseline_id` | any \| null | yes | The baseline the decision read. |
| `evidence_hash` | any \| null | yes | SHA-256 of the explanation evidence. |
| `prev_hash` | string | yes | The previous record's hash in the chain. |
| `created_at` | string | yes | When it was created. |
| `record_hash` | string | yes | SHA-256 over this record's canonical contents. |

### Example

```json
{
  "id": "mas_01M8ANCBRQ4DWS30D2GBBY4Z0P",
  "object": "mandate_assessment",
  "environment": "sandbox",
  "account_id": "acct_000000000000000000000000000000a2",
  "carrier_id": "car_000000000000000000000000000000c0",
  "kind": "verify",
  "jti": "680d9228-fbef-4eec-90a0-2b7a1daffe3d",
  "agent_session_id": "sess_ledger_1",
  "device_id": "dev_00000000000000000000000000000001",
  "facts": {
    "signature_block": {
      "method": "none",
      "valid": null,
      "key_id": null,
      "directory": null,
      "agent_id": null,
      "covers": []
    },
    "authority_block": {
      "kind": "none"
    }
  },
  "result": "denied",
  "reason": "payload_hash_mismatch",
  "matched_rule_id": null,
  "policy_version": null,
  "mandate_id": null,
  "agent_id": null,
  "approver_id": null,
  "shadow_result": null,
  "shadow_reason": null,
  "shadow_rule_id": null,
  "shadow_policy_version": null,
  "context_hash": null,
  "order_id": null,
  "order_type": null,
  "order_prescriber_id": null,
  "order_prescriber_tier": null,
  "trace_id": null,
  "canary_hash": null,
  "check_decision": null,
  "canary_baseline_id": null,
  "evidence_hash": null,
  "prev_hash": "9c976729d66b9ad5e7ec46624bc9fea97cd1e2a6d01f304e18f3b58938b6f742",
  "created_at": "2026-11-26T00:51:39.415Z",
  "record_hash": "72ce41932e63d1927b55c876c2982944f3aaa3c0f74644d3040f1e31cf73c08c",
  "policy": null,
  "signature": {
    "method": "none",
    "valid": null,
    "key_id": null,
    "directory": null,
    "agent_id": null,
    "covers": []
  },
  "authority": {
    "kind": "none"
  }
}
```

## Retrieve a mandate assessment

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

Returns one decision-ledger record: the facts evaluated, the rule and policy version, the result, and its hashes.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The assessment's ID (`mas_…`; rows written before November 2026 keep `dec_…`). |

### Returns

The decision.

### 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/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": {
      "amount": 1850,
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_ledger_1",
    "device_id": "dev_00000000000000000000000000000001"
  }' > step.json
export INTENT_TOKEN=$(jq -r '.intent_token' step.json)
curl -s -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\": {
      \"amount\": 18500,
      \"payee\": \"acct_attacker\"
    }
  }" > /dev/null
curl -s "$PROVENANCE_API/v1/mandate/assessments?session=sess_ledger_1&limit=1" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DECISION_ID=$(jq -r '.data[0].id' step.json)
curl "$PROVENANCE_API/v1/mandate/assessments/$DECISION_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = 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": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "amount": 1850,
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_ledger_1",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
const intentToken = step1.intent_token;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "intent_token": intentToken,
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "amount": 18500,
      "payee": "acct_attacker"
    }
  }),
})).json();
const step3 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments?session=sess_ledger_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/mandate/assessments/${decisionId}`, {
  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/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
        "amount": 1850,
        "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_ledger_1",
    "device_id": "dev_00000000000000000000000000000001"
}).json()
intent_token = step1["intent_token"]
step2 = httpx.post(f"{api}/v1/mandate/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "intent_token": intent_token,
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
        "amount": 18500,
        "payee": "acct_attacker"
    }
}).json()
step3 = httpx.get(f"{api}/v1/mandate/assessments?session=sess_ledger_1&limit=1", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
decision_id = step3["data"][0]["id"]
data = httpx.get(f"{api}/v1/mandate/assessments/{decision_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "mas_01M7PC2XJ7XN8GHECXQXMX5RX0",
  "object": "mandate_assessment",
  "environment": "sandbox",
  "account_id": "acct_000000000000000000000000000000a2",
  "carrier_id": "car_000000000000000000000000000000c0",
  "kind": "verify",
  "jti": "9d057dca-bed8-4ac9-899d-1e532071f6c8",
  "agent_session_id": "sess_ledger_1",
  "device_id": "dev_00000000000000000000000000000001",
  "facts": {
    "signature_block": {
      "method": "none",
      "valid": null,
      "key_id": null,
      "directory": null,
      "agent_id": null,
      "covers": []
    },
    "authority_block": {
      "kind": "none"
    }
  },
  "result": "denied",
  "reason": "payload_hash_mismatch",
  "matched_rule_id": null,
  "policy_version": null,
  "mandate_id": null,
  "agent_id": null,
  "approver_id": null,
  "shadow_result": null,
  "shadow_reason": null,
  "shadow_rule_id": null,
  "shadow_policy_version": null,
  "context_hash": null,
  "order_id": null,
  "order_type": null,
  "order_prescriber_id": null,
  "order_prescriber_tier": null,
  "trace_id": null,
  "canary_hash": null,
  "check_decision": null,
  "canary_baseline_id": null,
  "evidence_hash": null,
  "prev_hash": "213bcb2ac118e5613326c89053a78b61dbe8512672f66008ee66105a99a9845c",
  "created_at": "2026-11-18T03:44:24.135Z",
  "record_hash": "31fde1b414e98138bb3b65607d9d520c69c9fb91941cfc6e756928fd9d47d2b3",
  "policy": null,
  "signature": {
    "method": "none",
    "valid": null,
    "key_id": null,
    "directory": null,
    "agent_id": null,
    "covers": []
  },
  "authority": {
    "kind": "none"
  }
}
```

## Get a decision receipt

`GET /v1/mandate/assessments/{id}/receipt`

Returns a signed receipt for a decision: an ES256 JWS that anyone can verify offline with the published keys, its claims, and a link to the console's Verify a proof page. Add format=pdf for a one-page PDF.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The object's ID. |
| `format` | query | enum | no | `json` (the default) or `pdf` for a one-page PDF. One of `json`, `pdf`. |

### Returns

The receipt, as JSON or a PDF.

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
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": {
      "amount": 1850,
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_ledger_1",
    "device_id": "dev_00000000000000000000000000000001"
  }' > step.json
export INTENT_TOKEN=$(jq -r '.intent_token' step.json)
curl -s -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\": {
      \"amount\": 18500,
      \"payee\": \"acct_attacker\"
    }
  }" > /dev/null
curl -s "$PROVENANCE_API/v1/mandate/assessments?session=sess_ledger_1&limit=1" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DECISION_ID=$(jq -r '.data[0].id' step.json)
curl "$PROVENANCE_API/v1/mandate/assessments/$DECISION_ID/receipt" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = 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": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "amount": 1850,
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_ledger_1",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
const intentToken = step1.intent_token;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "intent_token": intentToken,
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "amount": 18500,
      "payee": "acct_attacker"
    }
  }),
})).json();
const step3 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments?session=sess_ledger_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/mandate/assessments/${decisionId}/receipt`, {
  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/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
        "amount": 1850,
        "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_ledger_1",
    "device_id": "dev_00000000000000000000000000000001"
}).json()
intent_token = step1["intent_token"]
step2 = httpx.post(f"{api}/v1/mandate/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "intent_token": intent_token,
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
        "amount": 18500,
        "payee": "acct_attacker"
    }
}).json()
step3 = httpx.get(f"{api}/v1/mandate/assessments?session=sess_ledger_1&limit=1", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
decision_id = step3["data"][0]["id"]
data = httpx.get(f"{api}/v1/mandate/assessments/{decision_id}/receipt", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "receipt",
  "id": "rcpt_c472205087af62c87b6d5a59dde9eff9",
  "claims": {
    "receipt_id": "rcpt_c472205087af62c87b6d5a59dde9eff9",
    "decision_id": "mas_01M7MM3E8PEH3H7DF30ENSZRJC",
    "kind": "verify",
    "jti": "aa1c0ba2-15a3-43d5-81e4-df8b1935ddc8",
    "agent_session_id": "sess_ledger_1",
    "agent_id": null,
    "approver_id": null,
    "device_id": "dev_00000000000000000000000000000001",
    "result": "denied",
    "reason": "payload_hash_mismatch",
    "matched_rule_id": null,
    "policy_version": null,
    "mandate_id": null,
    "biometric_bound": false,
    "record_hash": "f92739b01d174ec72617d1e98cf8ef065fdfc559c16e85d3f059cec42a1225b0",
    "prev_hash": "ed400b0343458dec722e103935777431ccabce6c83b3fd5088b1d28196940cbb",
    "decided_at": "2026-11-17T11:26:00.982Z",
    "iss": "http://localhost:3000"
  },
  "token": "eyJhbGciOiJFUzI1NiIsInR5cCI6InByb3ZlbmFuY2UtcmVjZWlwdCtqd3QiLCJraWQiOiJiMjY3MTU5ZTA4YjhkNjg3In0.eyJyZWNlaXB0X2lkIjoicmNwdF9jNDcyMjA1MDg3YWY2MmM4N2I2ZDVhNTlkZGU5ZWZmOSIsImRlY2lzaW9uX2lkIjoibWFzXzAxTTdNTTNFOFBFSDNIN0RGMzBFTlNaUkpDIiwia2luZCI6InZlcmlmeSIsImp0aSI6ImFhMWMwYmEyLTE1YTMtNDNkNS04MWU0LWRmOGIxOTM1ZGRjOCIsImFnZW50X3Nlc3Npb25faWQiOiJzZXNzX2xlZGdlcl8xIiwiYWdlbnRfaWQiOm51bGwsImFwcHJvdmVyX2lkIjpudWxsLCJkZXZpY2VfaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDEiLCJyZXN1bHQiOiJkZW5pZWQiLCJyZWFzb24iOiJwYXlsb2FkX2hhc2hfbWlzbWF0Y2giLCJtYXRjaGVkX3J1bGVfaWQiOm51bGwsInBvbGljeV92ZXJzaW9uIjpudWxsLCJtYW5kYXRlX2lkIjpudWxsLCJiaW9tZXRyaWNfYm91bmQiOmZhbHNlLCJyZWNvcmRfaGFzaCI6ImY5MjczOWIwMWQxNzRlYzcyNjE3ZDFlOThjZjhlZjA2NWZkZmM1NTljMTZlODVkM2YwNTljZWM0MmExMjI1YjAiLCJwcmV2X2hhc2giOiJlZDQwMGIwMzQzNDU4ZGVjNzIyZTEwMzkzNTc3NzQzMWNjYWJjZTZjODNiM2ZkNTA4OGIxZDI4MTk2OTQwY2JiIiwiZGVjaWRlZF9hdCI6IjIwMjYtMTEtMTdUMTE6MjY6MDAuOTgyWiIsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6MzAwMCJ9.tNQUrRv6xHY8fpP7m6TI0CgkMCbPH0A0xnZIfxhaRnXYxHBDh7HWZhQkkj6Erh87a7OEX-GJKjPn-TKjLXcTnQ",
  "verify_url": "http://localhost:5173/developers/verify?receipt=eyJhbGciOiJFUzI1NiIsInR5cCI6InByb3ZlbmFuY2UtcmVjZWlwdCtqd3QiLCJraWQiOiJiMjY3MTU5ZTA4YjhkNjg3In0.eyJyZWNlaXB0X2lkIjoicmNwdF9jNDcyMjA1MDg3YWY2MmM4N2I2ZDVhNTlkZGU5ZWZmOSIsImRlY2lzaW9uX2lkIjoibWFzXzAxTTdNTTNFOFBFSDNIN0RGMzBFTlNaUkpDIiwia2luZCI6InZlcmlmeSIsImp0aSI6ImFhMWMwYmEyLTE1YTMtNDNkNS04MWU0LWRmOGIxOTM1ZGRjOCIsImFnZW50X3Nlc3Npb25faWQiOiJzZXNzX2xlZGdlcl8xIiwiYWdlbnRfaWQiOm51bGwsImFwcHJvdmVyX2lkIjpudWxsLCJkZXZpY2VfaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDEiLCJyZXN1bHQiOiJkZW5pZWQiLCJyZWFzb24iOiJwYXlsb2FkX2hhc2hfbWlzbWF0Y2giLCJtYXRjaGVkX3J1bGVfaWQiOm51bGwsInBvbGljeV92ZXJzaW9uIjpudWxsLCJtYW5kYXRlX2lkIjpudWxsLCJiaW9tZXRyaWNfYm91bmQiOmZhbHNlLCJyZWNvcmRfaGFzaCI6ImY5MjczOWIwMWQxNzRlYzcyNjE3ZDFlOThjZjhlZjA2NWZkZmM1NTljMTZlODVkM2YwNTljZWM0MmExMjI1YjAiLCJwcmV2X2hhc2giOiJlZDQwMGIwMzQzNDU4ZGVjNzIyZTEwMzkzNTc3NzQzMWNjYWJjZTZjODNiM2ZkNTA4OGIxZDI4MTk2OTQwY2JiIiwiZGVjaWRlZF9hdCI6IjIwMjYtMTEtMTdUMTE6MjY6MDAuOTgyWiIsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6MzAwMCJ9.tNQUrRv6xHY8fpP7m6TI0CgkMCbPH0A0xnZIfxhaRnXYxHBDh7HWZhQkkj6Erh87a7OEX-GJKjPn-TKjLXcTnQ"
}
```

## List mandate assessments

`GET /v1/mandate/assessments`

Lists your account's decision ledger as `mandate_assessment` objects, newest first. Filter by time, result, reason, token, agent session or run.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `created_gte` | query | timestamp | no | The start of the time window, as an ISO 8601 time. |
| `created_lte` | query | timestamp | no | The end of the time window, as an ISO 8601 time. |
| `result` | query | array of enums | no | Only decisions with these results. One value, or several separated by commas. |
| `q` | query | string | no | Search text. Matches when the decision's ID, the reason, the intent token's ID, the agent session or the agent's ID contains it, ignoring case. At most 200 characters. |
| `agent_id` | query | string | no | Only decisions made for this registered agent. |
| `reason` | query | string | no | The reason given or recorded. |
| `jti` | query | string | no | The intent token's ID. |
| `session` | query | string | no | Only decisions for this agent session. |
| `automatic` | query | enum | no | `true`: only decisions an `auto_approve` clause approved; `false`: only the others. One of `true`, `false`. |
| `run_id` | query | string | no | Only one run's rows (`run_…`): its agents' authorize, delegate and verify decisions and its halts. |
| `cursor` | query | string | no | The `next_cursor` from the previous page. |
| `limit` | query | integer | no | The most items to return, from 1 to 100. The default is 20. |

### Returns

The decisions, newest first.

### Errors

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

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
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": {
      "amount": 1850,
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_ledger_1",
    "device_id": "dev_00000000000000000000000000000001"
  }' > step.json
export INTENT_TOKEN=$(jq -r '.intent_token' step.json)
curl -s -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\": {
      \"amount\": 18500,
      \"payee\": \"acct_attacker\"
    }
  }" > /dev/null
curl -s "$PROVENANCE_API/v1/mandate/assessments?session=sess_ledger_1&limit=1" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export DECISION_ID=$(jq -r '.data[0].id' step.json)
curl "$PROVENANCE_API/v1/mandate/assessments?session=sess_ledger_1&limit=1" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = 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": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "amount": 1850,
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_ledger_1",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
const intentToken = step1.intent_token;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "intent_token": intentToken,
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "amount": 18500,
      "payee": "acct_attacker"
    }
  }),
})).json();
const step3 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/assessments?session=sess_ledger_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/mandate/assessments?session=sess_ledger_1&limit=1`, {
  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/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
        "amount": 1850,
        "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_ledger_1",
    "device_id": "dev_00000000000000000000000000000001"
}).json()
intent_token = step1["intent_token"]
step2 = httpx.post(f"{api}/v1/mandate/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "intent_token": intent_token,
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
        "amount": 18500,
        "payee": "acct_attacker"
    }
}).json()
step3 = httpx.get(f"{api}/v1/mandate/assessments?session=sess_ledger_1&limit=1", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
decision_id = step3["data"][0]["id"]
data = httpx.get(f"{api}/v1/mandate/assessments?session=sess_ledger_1&limit=1", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "id": "mas_01M8ANCBRQ4DWS30D2GBBY4Z0P",
      "object": "mandate_assessment",
      "environment": "sandbox",
      "account_id": "acct_000000000000000000000000000000a2",
      "carrier_id": "car_000000000000000000000000000000c0",
      "kind": "verify",
      "jti": "680d9228-fbef-4eec-90a0-2b7a1daffe3d",
      "agent_session_id": "sess_ledger_1",
      "device_id": "dev_00000000000000000000000000000001",
      "facts": {
        "signature_block": {
          "method": "none",
          "valid": null,
          "key_id": null,
          "directory": null,
          "agent_id": null,
          "covers": []
        },
        "authority_block": {
          "kind": "none"
        }
      },
      "result": "denied",
      "reason": "payload_hash_mismatch",
      "matched_rule_id": null,
      "policy_version": null,
      "mandate_id": null,
      "agent_id": null,
      "approver_id": null,
      "shadow_result": null,
      "shadow_reason": null,
      "shadow_rule_id": null,
      "shadow_policy_version": null,
      "context_hash": null,
      "order_id": null,
      "order_type": null,
      "order_prescriber_id": null,
      "order_prescriber_tier": null,
      "trace_id": null,
      "canary_hash": null,
      "check_decision": null,
      "canary_baseline_id": null,
      "evidence_hash": null,
      "prev_hash": "9c976729d66b9ad5e7ec46624bc9fea97cd1e2a6d01f304e18f3b58938b6f742",
      "created_at": "2026-11-26T00:51:39.415Z",
      "record_hash": "72ce41932e63d1927b55c876c2982944f3aaa3c0f74644d3040f1e31cf73c08c",
      "policy": null,
      "signature": {
        "method": "none",
        "valid": null,
        "key_id": null,
        "directory": null,
        "agent_id": null,
        "covers": []
      },
      "authority": {
        "kind": "none"
      }
    }
  ],
  "has_more": true,
  "next_cursor": "eyJpZCI6Im1hc18wMU04QU5DQlJRNERXUzMwRDJHQkJZNFowUCIsImRpcmVjdGlvbiI6Im5leHQifQ"
}
```

## Verify the decision chain

`GET /v1/mandate/assessments/verify_chain`

Recomputes the hash chain over your account's decisions, or a time range, and reports the first record that doesn't match.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `created_gte` | query | timestamp | no | The start of the time window, as an ISO 8601 time. |
| `created_lte` | query | timestamp | no | The end of the time window, as an ISO 8601 time. |

### Returns

Whether the ledger's hash chain is intact.

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

**Node**

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

### Response 200

```json
{
  "object": "chain_verification",
  "valid": true,
  "count": 14
}
```
