View as Markdown

Mandate · API reference

Decisions

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

Related guide: Decision ledger

The decision object

Attributes

auto_approvalobject
Present only on a valid verify an auto_approve clause approved.
Show child attributes
rule_idstring
The rule the clause sits on.
clause_idstring
The clause's ID.
labelstring
The clause's label.
policy_versioninteger | null
The policy version that approved it.
reusedobject
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.
Show child attributes
sourceenumRequired
Who asked first. One of intent_token, agent, store, network, routed.
confirmed_viaobject
Present only when the person confirmed outside Provenance (decided_via is then external).
Show child attributes
kindenumRequired
The kind of confirmation. One of ap2_user_mandate, spc, platform.
issuerstring
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.
evidence_hashstringRequired
The SHA-256 of the evidence (the evidence itself isn't kept).
idstringRequired
Unique identifier for the object.
objectenumRequired
The type of object. One of mandate_assessment.
environmentstringRequired
sandbox or live.
account_idstringRequired
The account's ID.
carrier_idstringRequired
The carrier the data belongs to.
kindstringRequired
What kind of object or event it is.
jtistringRequired
The intent token's ID.
agent_session_idstringRequired
The agent session the token was minted for.
device_idstringRequired
The capture or approving device's ID.
factsobject | nullRequired
The facts the policy evaluated.
resultstringRequired
The result.
reasonstringRequired
The reason given or recorded.
matched_rule_idstring | nullRequired
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_versioninteger | nullRequired
The policy version that decided it, as recorded; null for the default.
policyobject | null
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.
Show child attributes
idstring | nullRequired
The product's policy (pol_…), one per account and product, the same on every version.
versioninteger | nullRequired
The version that decided: null on the built-in default rules, 0 when a simulation runs a draft.
ruleobjectRequired
The rule, and what it compared.
Show child attributes
idstringRequired
The rule's ID (rul_…, or rul_default_… for a default row), kept across versions.
refstring | null
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.
namestring | nullRequired
The rule's name in the builder, when it has one.
phaseenumRequired
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.
actionenumRequired
What the rule did: Approve, Challenge (ask a person), Reject or Review. See outcome words. One of approve, challenge, reject, review.
conditionsarray of objectsRequired
Each condition of the rule, with the value compared.
Show child attributes
factstringRequired
The fact (order.amount, approval.location, class, …).
opstringRequired
The operator.
valueanyRequired
The value the condition compares with.
actualanyRequired
The value the engine compared; null when the fact was absent.
unavailablestring
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.
metricstring
A velocity condition's counter (verify_count, amount_sum).
windowstring
A velocity condition's window.
perstring
A velocity condition's subject.
setstring
A canary or prediction condition's family or probe.
baselinestring
A relative canary condition's baseline.
pathstring
A field condition's path in the request.
traceobject
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.
Show child attributes
roundsinteger
Rounds of fact resolution the decision took.
nodesarray of objectsRequired
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).
skippedobject
Facts the decision never had to read, by cost tier (tier_3: 1).
truncatedboolean
The path was longer than the bounds.
unavailablearray of objects
The facts the decision found unavailable, and why. Present only when there were some.
Show child attributes
factstringRequired
The fact.
reasonstringRequired
Why: timeout, error, unconfigured, deadline and the rest.
signatureobject | any | null
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.
Show child attributes
methodenum
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.
validboolean | null
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).
key_idstring | null
The signature's keyid (the key's JWK thumbprint).
directorystring | null
Where the key was found: the Signature-Agent directory URL, or provenance_registry for a key registered with Provenance.
agent_idstring | null
The registered agent (agt_…) the key belongs to, when the signature verified against a key registered with Provenance or its hosted directory.
platformobject | any | null
Checkout assessments only: the agent platform Identify named for the checkout (signed or declared), or null.
Show child attributes
nameenum
The platform's catalog name. One of openai, anthropic, google, microsoft, apple, perplexity, meta, common_crawl.
labelstring
The platform's display name (OpenAI).
sourceenum
signed (verified through the platform's signing directory) or declared (a known crawler's user agent). One of signed, declared.
coversarray of strings
The covered components, by name (@authority, @method, @path, signature-agent, content-digest). Empty when nothing was signed.
authorityobject | any | null
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.
Show child attributes
kindenum
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.
verifiedboolean
True when the token verified (ES256 against Provenance's published keys).
verified_againstenum
What it was verified against: Provenance's published keys. One of provenance_jwks.
algenum
The token's signing algorithm. One of ES256.
key_idstring | null
The kid of the key that signed the token.
issuerstring | null
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).
mandate_idstring | null
The mandate the token was issued under, or the grant itself; null for a token with no mandate.
mandate_chainarray of strings
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).
approval_context_idstring | null
On provenance_intent_token: the approval context of the person's yes that minted the token, when one is known.
cart_matchenum
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.
protocolenum
On third_party_mandate: the mandate's protocol. One of ap2, acp.
verified_byenum
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.
evidence_hashstring | null
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_idany | nullRequired
The mandate's ID.
agent_idany | nullRequired
The registered agent's ID.
approver_idany | nullRequired
The network approver who decided.
shadow_resultany | nullRequired
The shadow version's result.
shadow_reasonany | nullRequired
The shadow version's reason.
shadow_rule_idany | nullRequired
The shadow rule that matched.
shadow_policy_versionany | nullRequired
The shadow policy version that was evaluated.
context_hashany | nullRequired
SHA-256 of the agent's stated reason, when one was bound.
order_idany | nullRequired
The clinical order's ID.
order_typeany | nullRequired
The kind of clinical order.
order_prescriber_idany | nullRequired
The prescriber, for a clinical order decision.
order_prescriber_tierany | nullRequired
The prescriber's tier at the time, for a clinical order decision.
trace_idany | nullRequired
The trace's ID.
canary_hashany | nullRequired
SHA-256 of the canary readings, bound into tokens and manifests.
check_decisionany | nullRequired
The Trace check's decision for the reading.
canary_baseline_idany | nullRequired
The baseline the decision read.
evidence_hashany | nullRequired
SHA-256 of the explanation evidence.
prev_hashstringRequired
The previous record's hash in the chain.
created_atstringRequired
When it was created.
record_hashstringRequired
SHA-256 over this record's canonical contents.

The decision object

{
  "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.

Parameters

idstringpathRequired
The assessment's ID (mas_…; rows written before November 2026 keep dec_…).

Returns

The decision.

Errors

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"

Response 200

{
  "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.

Parameters

idstringpathRequired
The object's ID.
formatenumquery
json (the default) or pdf for a one-page PDF. One of json, pdf.

Returns

The receipt, as JSON or a PDF.

Errors

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"

Response 200

{
  "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.

Parameters

created_gtetimestampquery
The start of the time window, as an ISO 8601 time.
created_ltetimestampquery
The end of the time window, as an ISO 8601 time.
resultarray of enumsquery
Only decisions with these results. One value, or several separated by commas.
qstringquery
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_idstringquery
Only decisions made for this registered agent.
reasonstringquery
The reason given or recorded.
jtistringquery
The intent token's ID.
sessionstringquery
Only decisions for this agent session.
automaticenumquery
true: only decisions an auto_approve clause approved; false: only the others. One of true, false.
run_idstringquery
Only one run's rows (run_…): its agents' authorize, delegate and verify decisions and its halts.
cursorstringquery
The next_cursor from the previous page.
limitintegerquery
The most items to return, from 1 to 100. The default is 20.

Returns

The decisions, newest first.

Errors

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"

Response 200

{
  "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.

Parameters

created_gtetimestampquery
The start of the time window, as an ISO 8601 time.
created_ltetimestampquery
The end of the time window, as an ISO 8601 time.

Returns

Whether the ledger's hash chain is intact.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/assessments/verify_chain" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

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

Was this page helpful? Send us feedback

LLM? Read llms.txt.