Mandate · API reference
Approvals
Step-up approval requests a person decides.
Related guide: Step-up approval
The ap2 mandate request object
Attributes
idstring- Unique identifier for the object (
coap_…). objectenum- The type of object. One of
ap2_mandate_request. statusenum- The approval's status. One of
pending,in_review,approved,denied,expired. expires_attimestamp- When the approval expires.
created_attimestamp- When it was opened.
decided_attimestamp | null- When the person decided.
approve_urlstring- On create: the approval page's link (show it to the person, or let Provenance send it).
status_urlstring- On create: the keyless status read, with the agent's DPoP proof when holder-bound.
deliveryobject- On create, when Provenance sent the link: what happened to the send.
holder_jktstring- The thumbprint of the agent's holder key, when bound.
deny_reasonstring- With
denied: the reason given. reviewobject- With
in_review: when the review ends. retry_afterinteger- With
in_review: seconds to wait before asking again. intent_tokenstring- Once approved: the cart-bound intent token.
intent_token_expires_attimestamp- When the intent token expires.
ap2object- Once approved: the AP2 content (the binding and the mandate content with its AP2-bound token).
ap2_mandatesobject- The AP2 v0.2 mandates Provenance signed after the person approved this exact cart with a passkey (present only on an approval created with
ap2.issue, once it is decided). Each is an SD-JWT (dc+sd-jwt, ES256) that any AP2 verifier listing Provenance's AP2 JWKS as an issuer accepts. Signed again on each read with the same claims, as the intent token is.Show child attributes
statusenumRequiredissued: the mandates are here.pending_app_signature: the person approved from the Provenance app and its key is signing; ask again afterretry_after.holder_proof_required: a holder-bound request read without the agent's DPoP proof.revoked: the approval's token was revoked.not_issued: this approval issues none (reason).unavailable: the issuer is off or couldn't sign (reason). One ofissued,pending_app_signature,holder_proof_required,revoked,not_issued,unavailable.signerenum- With
issued: Provenance's AP2 issuer key, or the person's app key under the issuer's attestation. One ofprovenance,app. checkout_mandatestring- With
issued: the closed Checkout Mandate (mandate.checkout.1), an SD-JWT. payment_mandatestring- With
issued, when the request named the payment instrument: the closed Payment Mandate (mandate.payment.1). holder_boundboolean- With
issued: the mandates name the agent's key incnf.jwk(present them with a key-binding JWT). expires_attimestamp- With
issued: when these copies expire (never after the intent token inside). issuer_jwks_urlstring- With
issued: the AP2 issuer JWKS to list as a trusted issuer. fallback_reasonenum- With
issued: why the issuer key signed although the approval was opened from the app. One ofapp_signature_timeout,key_invalidated,user_cancelled,biometry_unavailable. retry_afterinteger- With
pending_app_signature: seconds to wait before asking again. holder_jktstring- With
holder_proof_required: the thumbprint of the key the DPoP proof must use. reasonstring- With
not_issued:not_approved,no_passkey,outside_confirmation,reused,store_review,checkout_jwt_missingortoken_expired. Withunavailable:ap2_issuer_unconfiguredorsigning_failed.
The ap2 mandate request object
{
"id": "coap_01M81A2Q9V4XK7N3T6YBA8RJ5D",
"object": "ap2_mandate_request",
"status": "pending",
"expires_at": "2026-11-22T10:15:00.000Z",
"created_at": "2026-11-22T10:00:00.000Z",
"approve_url": "https://app.provenanceauth.com/approve/c/Qm9va2luZ0xpbmtUb2tlbjE",
"status_url": "https://api.provenanceauth.com/v1/authorize/checkout_approvals/requests/status?token=Qm9va2luZ0xpbmtUb2tlbjE"
}Events
Sent to your webhook endpoints when they subscribe:
mandate.approval.createdmandate.approval.approvedmandate.approval.reminder_sentmandate.approval.reminder_not_sentmandate.approval.declinedmandate.approval.expired
Retrieve an approval
GET/v1/mandate/approvals/{id}
Returns one approval request with its action, status and how it was decided.
Parameters
idstringpathRequired- The object's ID.
Returns
The approval.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X PUT "$PROVENANCE_API/v1/mandate/policies" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "wires need a person",
"document": {
"rules": [
{
"id": "wire-needs-approval",
"when": [
{
"fact": "action_type",
"op": "eq",
"value": "wire"
}
],
"require": {
"approval": true
}
}
]
}
}' > /dev/null
curl -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"agent_session_id": "sess_treasury_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\": \"Wire \$12,000 to Acme Corp for PO-7781\",
\"context\": {
\"action_type\": \"wire\"
}
}" > step.json
export APPROVAL_ID=$(jq -r '.approval_id' step.json)
curl "$PROVENANCE_API/v1/mandate/approvals/$APPROVAL_ID" \
-H "Authorization: Bearer $PROVENANCE_KEY"
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/policies" \
-H "Authorization: Bearer $PROVENANCE_KEY" > /dev/nullconst step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/policies`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"note": "wires need a person",
"document": {
"rules": [
{
"id": "wire-needs-approval",
"when": [
{
"fact": "action_type",
"op": "eq",
"value": "wire"
}
],
"require": {
"approval": true
}
}
]
}
}),
})).json();
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"agent_session_id": "sess_treasury_1",
"device_id": "dev_00000000000000000000000000000001"
}),
})).json();
const intentToken = step2.intent_token;
const step3 = 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": "Wire $12,000 to Acme Corp for PO-7781",
"context": {
"action_type": "wire"
}
}),
})).json();
const approvalId = step3.approval_id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/approvals/${approvalId}`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.put(f"{api}/v1/mandate/policies", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"note": "wires need a person",
"document": {
"rules": [
{
"id": "wire-needs-approval",
"when": [
{
"fact": "action_type",
"op": "eq",
"value": "wire"
}
],
"require": {
"approval": True
}
}
]
}
}).json()
step2 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"agent_session_id": "sess_treasury_1",
"device_id": "dev_00000000000000000000000000000001"
}).json()
intent_token = step2["intent_token"]
step3 = httpx.post(f"{api}/v1/mandate/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"intent_token": intent_token,
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"context": {
"action_type": "wire"
}
}).json()
approval_id = step3["approval_id"]
data = httpx.get(f"{api}/v1/mandate/approvals/{approval_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"deliveries": [
{
"person": "policy-demo@sandbox.example",
"channel": "email",
"recipient": "p•••@sandbox.example",
"status": "sent",
"sent_at": "2026-11-27T22:27:47.854Z",
"outcome": null
}
],
"id": "appr_01M8FHYCFXPMBNTVA9C34TR3ZS",
"object": "approval",
"status": "pending",
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"context": {
"action_type": "wire"
},
"jti": "5f36f86a-0171-48f8-bfdf-ce81fa53c950",
"agent_session_id": "sess_treasury_1",
"matched_rule_id": "rul_01M8FHYCB6DACN30AJ1V8WA34G",
"policy_version": 1,
"requires_biometric": false,
"decided_at": null,
"decided_via": null,
"decided_method": null,
"reason": null,
"created_at": "2026-11-27T22:27:47.837Z",
"expires_at": "2026-11-27T22:37:47.837Z",
"reminders": {
"sent": 0,
"left": 3,
"last_sent_at": null,
"last_channel": null,
"last_channels": [],
"next_allowed_at": "2026-11-27T22:37:47.837Z",
"scheduled": null,
"next_automatic_at": null,
"next_channel": "inbox",
"next_channels": [
"inbox"
],
"next_channel_reason": "default",
"blocked": null,
"schedule": {
"enabled": false,
"after": []
}
},
"approval_context": null,
"person_decision": null,
"decline_reason": null,
"decline_note": null
}Get a link to an approval
POST/v1/mandate/approvals/{id}/link
A fresh single-use link to a pending step-up approval, for your agent to pass on to the person itself (a text, an email, a code on a screen). The page still asks for a passkey when the approval needs one. Any key that can decide the approval can get its link; a routed approval is its approver's. short_url is the short text link, when short links are on.
Parameters
idstringpathRequired- The object's ID.
Returns
The link, single use, working until the approval or the link expires.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X PUT "$PROVENANCE_API/v1/mandate/policies" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "wires need a person",
"document": {
"rules": [
{
"id": "wire-needs-approval",
"when": [
{
"fact": "action_type",
"op": "eq",
"value": "wire"
}
],
"require": {
"approval": true
}
}
]
}
}' > /dev/null
curl -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"agent_session_id": "sess_treasury_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\": \"Wire \$12,000 to Acme Corp for PO-7781\",
\"context\": {
\"action_type\": \"wire\"
}
}" > step.json
export APPROVAL_ID=$(jq -r '.approval_id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/approvals/$APPROVAL_ID/link" \
-H "Authorization: Bearer $PROVENANCE_KEY"
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/policies" \
-H "Authorization: Bearer $PROVENANCE_KEY" > /dev/nullconst step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/policies`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"note": "wires need a person",
"document": {
"rules": [
{
"id": "wire-needs-approval",
"when": [
{
"fact": "action_type",
"op": "eq",
"value": "wire"
}
],
"require": {
"approval": true
}
}
]
}
}),
})).json();
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"agent_session_id": "sess_treasury_1",
"device_id": "dev_00000000000000000000000000000001"
}),
})).json();
const intentToken = step2.intent_token;
const step3 = 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": "Wire $12,000 to Acme Corp for PO-7781",
"context": {
"action_type": "wire"
}
}),
})).json();
const approvalId = step3.approval_id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/approvals/${approvalId}/link`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.put(f"{api}/v1/mandate/policies", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"note": "wires need a person",
"document": {
"rules": [
{
"id": "wire-needs-approval",
"when": [
{
"fact": "action_type",
"op": "eq",
"value": "wire"
}
],
"require": {
"approval": True
}
}
]
}
}).json()
step2 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"agent_session_id": "sess_treasury_1",
"device_id": "dev_00000000000000000000000000000001"
}).json()
intent_token = step2["intent_token"]
step3 = httpx.post(f"{api}/v1/mandate/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"intent_token": intent_token,
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"context": {
"action_type": "wire"
}
}).json()
approval_id = step3["approval_id"]
data = httpx.post(f"{api}/v1/mandate/approvals/{approval_id}/link", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 201
{
"object": "approval_link",
"approval_id": "appr_01M7Q217KV1MG2J6GMS50BHG69",
"approve_url": "http://localhost:5173/approve/x9S5zr0S6faB2hv2sjijMqhulsQld8Ry9s8ro4sODbA",
"short_url": null,
"expires_at": "2026-11-18T10:17:57.563Z"
}List approvals
GET/v1/mandate/approvals
Lists your account's step-up approval requests, newest first. Filter by status, such as pending.
Parameters
statusenumquery- The object's current status. One of
pending,approved,declined,expired. routedenumquery- Signed-in console members only: approvals routed to you (
me) or to a group you belong to (my_groups). One ofme,my_groups.
Returns
The account's approvals.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/approvals?status=pending" \
-H "Authorization: Bearer $PROVENANCE_KEY"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/approvals?status=pending`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/mandate/approvals?status=pending", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"object": "list",
"data": [],
"has_more": false,
"next_cursor": null
}List an approval's reminders
GET/v1/mandate/approvals/{id}/reminders
Every reminder asked for on one approval, oldest first, with how each person's delivery ended.
Parameters
idstringpathRequired- The approval's ID (
appr_…).
Returns
The reminders.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/approvals/appr_01M6ZG0DENDP7V1YZC3CG74SWD/reminders" \
-H "Authorization: Bearer $PROVENANCE_KEY"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/approvals/appr_01M6ZG0DENDP7V1YZC3CG74SWD/reminders`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/mandate/approvals/appr_01M6ZG0DENDP7V1YZC3CG74SWD/reminders", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"object": "list",
"data": [
{
"object": "reminder",
"id": "rem_01JCXB3K8M2Q7T4V9W5Y1Z6R0P",
"request": {
"object": "approval",
"id": "appr_01M6ZG0DENDP7V1YZC3CG74SWD"
},
"trigger": "console",
"status": "sent",
"scheduled_for": "2026-11-12T14:00:00.000Z",
"deliveries": [
{
"recipient_key": "approver:lnk_01JCX2M7Q4HW8R5T9V3B6N1KZD",
"recipient": "D. Whitlow",
"channel": "app_notification",
"channel_reason": "default",
"status": "sent"
},
{
"recipient_key": "approver:lnk_01JCX2P9R6JK3T8W5Y2C7V4N1M",
"recipient": "•••• 0172",
"channel": "text",
"channel_reason": "default",
"status": "sent"
}
],
"reason": null,
"link_expires_at": "2026-11-14T15:30:00.000Z",
"reminders_left": 2,
"next_allowed_at": null,
"quiet_hours": {
"time_zone": "America/Chicago",
"source": "account"
},
"sent_at": "2026-11-12T14:00:04.000Z",
"created_at": "2026-11-12T03:42:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}Ask the person for AP2 mandates
POST/v1/mandate/ap2_mandate_requests
Shows the person the exact Checkout and, once they approve with a passkey, signs the closed AP2 Checkout Mandate (and Payment Mandate with payment_instrument), rebuilt from these fields, never as sent. Reach them with contact or show approve_url. Pro or trial; 503 until the AP2 issuer is on. See issue AP2 mandates.
Parameters
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
checkout_jwtstringRequired- The merchant-signed Checkout JWT (AP2 binds the Checkout by its hash).
payeeobjectRequired- AP2's Merchant: who is paid.
websiteis the store's https origin.Show child attributes
idstringRequired- The merchant's id (AP2
payee.id). namestringRequired- What the person sees.
websitestringRequired- The store's origin.
amountintegerRequired- Minor units (AP2
payment_amount.amount). currencystringRequired- ISO 4217.
payment_instrumentobject- AP2's payment instrument descriptor: an id, a type and a display string. Never a card number, a token or a cryptogram.
Show child attributes
idstringRequired- Your credential provider's id for the instrument.
typestringRequiredcard,dpc, …descriptionstring- What the person sees ("Visa ···· 4242").
holder_keyobject- Your agent's P-256 public JWK: the mandates name it in
cnf.jwk, and reading them needs a DPoP proof from it. contactobject- The person's phone or email, as on a cart approval.
deliveryanysend(tocontact) orself(you showapprove_url).channelsarray of strings- Which of the app notification, the email and the text may go.
expires_ininteger- Seconds the person has to decide (default 900).
Returns
The request, with the approval page's link and the keyless status read. See the ap2 mandate request object.
Errors
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/mandate/ap2_mandate_requests" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"checkout_jwt": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudCI6eyJpZCI6ImhhcmJvcmJlYW4iLCJuYW1lIjoiSGFyYm9yIEJlYW4ifSwidG90YWwiOjQyNTB9.c2lnbmF0dXJl",
"payee": {
"id": "harborbean",
"name": "Harbor Bean",
"website": "https://harborbean.example"
},
"amount": 4250,
"currency": "USD",
"payment_instrument": {
"id": "pi_card_1",
"type": "card",
"description": "Visa ···· 4242"
},
"delivery": "self"
}'const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/ap2_mandate_requests`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"checkout_jwt": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudCI6eyJpZCI6ImhhcmJvcmJlYW4iLCJuYW1lIjoiSGFyYm9yIEJlYW4ifSwidG90YWwiOjQyNTB9.c2lnbmF0dXJl",
"payee": {
"id": "harborbean",
"name": "Harbor Bean",
"website": "https://harborbean.example"
},
"amount": 4250,
"currency": "USD",
"payment_instrument": {
"id": "pi_card_1",
"type": "card",
"description": "Visa ···· 4242"
},
"delivery": "self"
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/ap2_mandate_requests", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
"checkout_jwt": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudCI6eyJpZCI6ImhhcmJvcmJlYW4iLCJuYW1lIjoiSGFyYm9yIEJlYW4ifSwidG90YWwiOjQyNTB9.c2lnbmF0dXJl",
"payee": {
"id": "harborbean",
"name": "Harbor Bean",
"website": "https://harborbean.example"
},
"amount": 4250,
"currency": "USD",
"payment_instrument": {
"id": "pi_card_1",
"type": "card",
"description": "Visa ···· 4242"
},
"delivery": "self"
}).json()Response 201
{
"id": "coap_01M81A2Q9V4XK7N3T6YBA8RJ5D",
"object": "ap2_mandate_request",
"status": "pending",
"expires_at": "2026-11-22T10:15:00.000Z",
"created_at": "2026-11-22T10:00:00.000Z",
"approve_url": "https://app.provenanceauth.com/approve/c/Qm9va2luZ0xpbmtUb2tlbjE",
"status_url": "https://api.provenanceauth.com/v1/authorize/checkout_approvals/requests/status?token=Qm9va2luZ0xpbmtUb2tlbjE"
}Collect the AP2 mandates
GET/v1/mandate/ap2_mandate_requests/{id}
The state and, once the person approved with a passkey, the intent token and ap2_mandates (SD-JWTs, each expiring no later than the token inside). With holder_key, send a DPoP proof from it; without one the read shows the state only (holder_proof_required).
Parameters
DPoPstringheader- A DPoP proof (RFC 9449) from the grant's holder key, when the grant is holder-bound (
holder_jkt): an ES256dpop+jwtnaming this request (htm,htu),iatwithin 60 seconds, a freshjti, andath, the SHA-256 of the grant token sent. One per request. See bind a grant to its holder. idstringpathRequired- The request's
coap_ID.
Returns
The request. See the ap2 mandate request object.
Errors
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl "$PROVENANCE_API/v1/mandate/ap2_mandate_requests/coap_01M81A2Q9V4XK7N3T6YBA8RJ5D" \
-H "Authorization: Bearer $PROVENANCE_KEY"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/ap2_mandate_requests/coap_01M81A2Q9V4XK7N3T6YBA8RJ5D`, {
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/mandate/ap2_mandate_requests/coap_01M81A2Q9V4XK7N3T6YBA8RJ5D", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()Response 200
{
"id": "coap_01M81A2Q9V4XK7N3T6YBA8RJ5D",
"object": "ap2_mandate_request",
"status": "approved",
"expires_at": "2026-11-22T10:15:00.000Z",
"created_at": "2026-11-22T10:00:00.000Z",
"decided_at": "2026-11-22T10:01:12.000Z",
"intent_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImY3NjVhOTlhZDA1NDNkOTkifQ.eyJqdGkiOiJhYmMifQ.c2ln",
"intent_token_expires_at": "2026-11-22T14:01:12.000Z",
"ap2_mandates": {
"status": "issued",
"signer": "provenance",
"checkout_mandate": "eyJhbGciOiJFUzI1NiIsInR5cCI6ImRjK3NkLWp3dCIsImtpZCI6IjNjMWYwYTliN2QyZTRmNjAifQ.eyJ2Y3QiOiJtYW5kYXRlLmNoZWNrb3V0LjEifQ.c2ln~WyJzYWx0Iix7fV0~",
"payment_mandate": "eyJhbGciOiJFUzI1NiIsInR5cCI6ImRjK3NkLWp3dCIsImtpZCI6IjNjMWYwYTliN2QyZTRmNjAifQ.eyJ2Y3QiOiJtYW5kYXRlLnBheW1lbnQuMSJ9.c2ln~WyJzYWx0Iix7fV0~",
"holder_bound": false,
"expires_at": "2026-11-22T10:11:12.000Z",
"issuer_jwks_url": "https://api.provenanceauth.com/.well-known/ap2/jwks.json"
}
}Respond to an approval
POST/v1/mandate/approvals/{id}/respond
Approves or denies a pending request. When the approval requires a biometric, an approve must include a verified passkey assertion. A denial is final. An approval routed to an approver link is the approver's to approve (approval_routed_to_approver); you can still deny it to withdraw the request.
Parameters
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired- The object's ID.
decisionenumRequired- The decision.
request_changesends the request aschanges_requestedwithrequested_changesandnote; the agent sends a new request withrevises. One ofapprove,decline,deny,request_changes. option_indexinteger- On a choose-one request: the option to approve (required with
approve). With a passkey check, the assertion answers that option's challenge fromoption_challenges. Deny declines every option. requested_changesarray of objects- With
request_changes: the fields to change, from the approval'schange_form, as{ field, to }. A note alone is allowed. On an ask about a proposal the field isprice(orprice:<index>), as in[{ field: price, to: 610 }].Show child attributes
fieldstringRequired- The field from the form.
tostringRequired- The value asked for.
notestring- With
request_changes: the person's note (links and phone numbers are removed). decline_reasonenum- With a deny: the reason the person picked, stored as the approval's
reasonand returned on verify asdeny_reason. One ofunrecognized,wrong_amount,not_now,off_task. mute_originboolean- With a decline of a checkout step-up: don't ask this person again for this store's origin. Later step-ups from it answer
approval_mutedwith no notification. reasonstring- The reason given or recorded.
biometric_challengestring- The challenge from
POST /v1/mandate/biometric_challengesthe assertion signs. biometric_assertionobject- The passkey assertion over the challenge.
Show child attributes
authenticator_datastring- The base64url authenticatorData from the passkey assertion.
client_data_jsonstring- The base64url clientDataJSON from the passkey ceremony.
signaturestring- The base64url signature from the passkey assertion.
Returns
The approval, now decided.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X PUT "$PROVENANCE_API/v1/mandate/policies" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "wires need a person",
"document": {
"rules": [
{
"id": "wire-needs-approval",
"when": [
{
"fact": "action_type",
"op": "eq",
"value": "wire"
}
],
"require": {
"approval": true
}
}
]
}
}' > /dev/null
curl -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"agent_session_id": "sess_treasury_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\": \"Wire \$12,000 to Acme Corp for PO-7781\",
\"context\": {
\"action_type\": \"wire\"
}
}" > step.json
export APPROVAL_ID=$(jq -r '.approval_id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/approvals/$APPROVAL_ID/respond" \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "decision": "approve" }'
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/policies" \
-H "Authorization: Bearer $PROVENANCE_KEY" > /dev/nullconst step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/policies`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"note": "wires need a person",
"document": {
"rules": [
{
"id": "wire-needs-approval",
"when": [
{
"fact": "action_type",
"op": "eq",
"value": "wire"
}
],
"require": {
"approval": true
}
}
]
}
}),
})).json();
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"agent_session_id": "sess_treasury_1",
"device_id": "dev_00000000000000000000000000000001"
}),
})).json();
const intentToken = step2.intent_token;
const step3 = 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": "Wire $12,000 to Acme Corp for PO-7781",
"context": {
"action_type": "wire"
}
}),
})).json();
const approvalId = step3.approval_id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/approvals/${approvalId}/respond`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "decision": "approve" }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.put(f"{api}/v1/mandate/policies", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"note": "wires need a person",
"document": {
"rules": [
{
"id": "wire-needs-approval",
"when": [
{
"fact": "action_type",
"op": "eq",
"value": "wire"
}
],
"require": {
"approval": True
}
}
]
}
}).json()
step2 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"agent_session_id": "sess_treasury_1",
"device_id": "dev_00000000000000000000000000000001"
}).json()
intent_token = step2["intent_token"]
step3 = httpx.post(f"{api}/v1/mandate/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"intent_token": intent_token,
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"context": {
"action_type": "wire"
}
}).json()
approval_id = step3["approval_id"]
data = httpx.post(f"{api}/v1/mandate/approvals/{approval_id}/respond", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"decision": "approve"
}).json()Response 200
{
"id": "appr_01M8FHYCM6FQZM2WQZ0W8P15J1",
"object": "approval",
"status": "approved",
"action_description": "Wire $12,000 to Acme Corp for PO-7781",
"context": {
"action_type": "wire"
},
"jti": "d12abcfa-dcad-4980-a3a8-0e80675e6a0a",
"agent_session_id": "sess_treasury_1",
"matched_rule_id": "rul_01M8FHYCB6DACN30AJ1V8WA34G",
"policy_version": 2,
"requires_biometric": false,
"decided_at": "2026-11-27T22:27:47.992Z",
"decided_via": "api",
"decided_method": "api_key",
"reason": null,
"created_at": "2026-11-27T22:27:47.974Z",
"expires_at": "2026-11-27T22:37:47.974Z",
"approval_context": null,
"person_decision": null,
"decline_reason": null,
"decline_note": null
}Remind the approvers
POST/v1/mandate/approvals/{id}/reminders
Sends the pending approval again, marked as a reminder, to everyone it still waits for as one round, or to one person (recipient). Each person is held on their own clock for quiet hours. Up to 3 per approval, 10 minutes after the last message. Emits mandate.approval.reminder_sent when the round ends. See reminders.
Parameters
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired- The approval's ID (
appr_…). channelenum- Pins the channel (
app_notification,emailortext;smsandapp_pushare refused); only the people who have it are reminded. Left out, each person's channel order applies (the Provenance app, a web home, a text, an email). One ofapp_notification,text,email. recipientstring- One person's key from the approval's
reminders.recipients(approver:lnk_…,user:…). Left out, everyone the approval waits for.
Returns
The reminder, sent, or held for someone's quiet hours.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/mandate/approvals/appr_01M6ZG0DENDP7V1YZC3CG74SWD/reminders" \
-H "Authorization: Bearer $PROVENANCE_KEY"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/approvals/appr_01M6ZG0DENDP7V1YZC3CG74SWD/reminders`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/approvals/appr_01M6ZG0DENDP7V1YZC3CG74SWD/reminders", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 201
{
"object": "reminder",
"id": "rem_01JCXB3K8M2Q7T4V9W5Y1Z6R0P",
"request": {
"object": "approval",
"id": "appr_01M6ZG0DENDP7V1YZC3CG74SWD"
},
"trigger": "console",
"status": "scheduled",
"scheduled_for": "2026-11-12T14:00:00.000Z",
"deliveries": [
{
"recipient_key": "approver:lnk_01JCX2M7Q4HW8R5T9V3B6N1KZD",
"recipient": "D. Whitlow",
"channel": "app_notification",
"channel_reason": "default",
"status": "sent"
},
{
"recipient_key": "approver:lnk_01JCX2P9R6JK3T8W5Y2C7V4N1M",
"recipient": "•••• 0172",
"channel": "text",
"channel_reason": "default",
"status": "scheduled",
"scheduled_for": "2026-11-12T14:00:00.000Z"
}
],
"reason": null,
"link_expires_at": "2026-11-14T15:30:00.000Z",
"reminders_left": 2,
"next_allowed_at": "2026-11-12T14:10:00.000Z",
"quiet_hours": {
"time_zone": "America/Chicago",
"source": "account"
},
"sent_at": null,
"created_at": "2026-11-12T03:42:00.000Z"
}Cancel a held reminder
DELETE/v1/mandate/approvals/{id}/reminders/{reminder_id}
Cancels a reminder held until quiet hours end, before it goes. Only a scheduled reminder can be cancelled. When nothing in the round has gone it reads cancelled and the count is given back. No reminder webhook fires. See reminders.
Parameters
idstringpathRequired- The approval's ID (
appr_…). reminder_idstringpathRequired- The held reminder's ID (
rem_…), from the request'sreminders.scheduled.idor its reminders list.
Returns
The reminder as it ended.
Errors
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X DELETE "$PROVENANCE_API/v1/mandate/approvals/appr_01M6ZG0DENDP7V1YZC3CG74SWD/reminders/rem_01JCXB3K8M2Q7T4V9W5Y1Z6R0P" \
-H "Authorization: Bearer $PROVENANCE_KEY"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/approvals/appr_01M6ZG0DENDP7V1YZC3CG74SWD/reminders/rem_01JCXB3K8M2Q7T4V9W5Y1Z6R0P`, {
method: "DELETE",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.delete(f"{api}/v1/mandate/approvals/appr_01M6ZG0DENDP7V1YZC3CG74SWD/reminders/rem_01JCXB3K8M2Q7T4V9W5Y1Z6R0P", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"object": "reminder",
"id": "rem_01JCXB3K8M2Q7T4V9W5Y1Z6R0P",
"request": {
"object": "approval",
"id": "appr_01M6ZG0DENDP7V1YZC3CG74SWD"
},
"trigger": "console",
"status": "sent",
"scheduled_for": "2026-11-12T14:00:00.000Z",
"deliveries": [
{
"recipient_key": "approver:lnk_01JCX2M7Q4HW8R5T9V3B6N1KZD",
"recipient": "D. Whitlow",
"channel": "app_notification",
"channel_reason": "default",
"status": "sent"
},
{
"recipient_key": "approver:lnk_01JCX2P9R6JK3T8W5Y2C7V4N1M",
"recipient": "•••• 0172",
"channel": "text",
"channel_reason": "default",
"status": "not_sent",
"reason": "cancelled"
}
],
"reason": null,
"link_expires_at": "2026-11-14T15:30:00.000Z",
"reminders_left": 2,
"next_allowed_at": null,
"quiet_hours": {
"time_zone": "America/Chicago",
"source": "account"
},
"sent_at": "2026-11-12T04:10:00.000Z",
"created_at": "2026-11-12T03:42:00.000Z"
}