View as Markdown

Mandate · Guide

Offer options

Use options when your agent found more than one way to do the job, such as three flights or two quotes, and the person should pick. You authorize 2 to 5 complete actions at once. Each gets its own intent token, the person sees them as cards and approves one, and only that option's token verifies.

Before you begin: export the sandbox account key. Options open an approval in the account's inbox, so they need an account key.

export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
  1. Agent authorizes options
    one token per option
  2. Person approves one
    the card they want
  3. Agent verifies its pick
    valid; the others refused

1. Authorize the options

Send options to POST /v1/mandate/intents instead of action_description. Each option is a complete action:

FieldMeaning
labelWhat the person sees on the card
actionThe option's action description, hashed into its own token
payloadThe option's exact payload, hashed into its own token
contextFacts for your policy and the card: transaction_amount, currency, payee, date
curl -s $PROVENANCE_API/v1/mandate/intents \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_session_id": "sess_travel_1",
    "device_id": "dev_00000000000000000000000000000001",
    "options": [
      { "label": "6:05 am nonstop", "action": "Book flight NW 412 BOS to SFO on Nov 3", "payload": { "flight": "NW412", "fare": 389 }, "context": { "transaction_amount": 389, "currency": "USD", "date": "2026-11-03" } },
      { "label": "9:40 am nonstop", "action": "Book flight NW 1520 BOS to SFO on Nov 3", "payload": { "flight": "NW1520", "fare": 412 }, "context": { "transaction_amount": 412, "currency": "USD", "date": "2026-11-03" } },
      { "label": "1:15 pm, one stop", "action": "Book flight NW 433 BOS to SFO on Nov 3", "payload": { "flight": "NW433", "fare": 298 }, "context": { "transaction_amount": 298, "currency": "USD", "date": "2026-11-03" } }
    ]
  }' | tee options.json
export APPROVAL_ID=$(jq -r .approval_id options.json)
export PICK_TOKEN=$(jq -r '.options[1].intent_token' options.json)
export OTHER_TOKEN=$(jq -r '.options[0].intent_token' options.json)
{
  "object": "intent_authorization",
  "status": "approval_pending",
  "option_group_id": "optg_01M5WK3T8Q2R6V9X1Z4B7D0F3H",
  "approval_id": "appr_01M5WK3T8R5T8W1Y3A6C9E2G5J",
  "approval_expires_at": "2026-10-26T18:10:00.000Z",
  "expires_at": "2026-10-26T22:00:00.000Z",
  "biometric_bound": false,
  "options": [
    { "index": 0, "label": "6:05 am nonstop", "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJqdGkiOiIwIn0.c2ln", "attestation_id": "5f0c1e2a-7b3d-4c8e-9a1f-2d4b6e8f0a13" },
    { "index": 1, "label": "9:40 am nonstop", "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJqdGkiOiIxIn0.c2ln", "attestation_id": "9a3e5c7b-1d2f-4e6a-8c0b-3f5d7e9a1c24" },
    { "index": 2, "label": "1:15 pm, one stop", "intent_token": "eyJhbGciOiJFUzI1NiJ9.eyJqdGkiOiIyIn0.c2ln", "attestation_id": "2b4d6f8a-0c1e-4a3b-9d5f-7e9a1c3b5d36" }
  ]
}

Every token carries the same option_group_id and its own jti and action_hash. One approval holds the group, and the person is asked now, before the agent acts.

The account's policy runs on each option. An option it denies outright comes back with disabled: true and its disabled_reason, and the person sees it greyed out.

2. The person approves one

The person sees one lettered card per option, with its label, the key facts and the exact action, and Approve this one on each. None of these declines every option. With a passkey rule, the assertion signs sha256 of the group and the chosen option's action_hash, so the passkey signs the choice itself.

Here you approve the second option with the key, through POST /v1/mandate/approvals/{id}/respond:

curl -s $PROVENANCE_API/v1/mandate/approvals/$APPROVAL_ID/respond \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "decision": "approve", "option_index": 1 }'
{
  "id": "appr_01M5WK3T8R5T8W1Y3A6C9E2G5J",
  "object": "approval",
  "status": "approved",
  "action_description": "Choose one: 6:05 am nonstop · 9:40 am nonstop · 1:15 pm, one stop",
  "option_group_id": "optg_01M5WK3T8Q2R6V9X1Z4B7D0F3H",
  "chosen_option": { "index": 1 }
}

Once the group is decided, nothing switches the choice: approving another option answers 409 approval_already_decided.

3. Verify the chosen option

Verify the chosen option's token with its own action and payload. It's valid:

curl -s $PROVENANCE_API/v1/mandate/assessments \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "intent_token": "'"$PICK_TOKEN"'",
    "action_description": "Book flight NW 1520 BOS to SFO on Nov 3",
    "action_payload": { "flight": "NW1520", "fare": 412 },
    "context": { "transaction_amount": 412 }
  }'
{
  "object": "mandate_assessment",
  "valid": true,
  "payload_bound": true
}

4. Other options are refused

Every other option's token fails with option_not_chosen, and chosen_option names the one the person picked:

curl -s $PROVENANCE_API/v1/mandate/assessments \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "intent_token": "'"$OTHER_TOKEN"'",
    "action_description": "Book flight NW 412 BOS to SFO on Nov 3",
    "action_payload": { "flight": "NW412", "fare": 389 },
    "context": { "transaction_amount": 389 }
  }'
{
  "object": "mandate_assessment",
  "valid": false,
  "reason": "option_not_chosen",
  "option_group_id": "optg_01M5WK3T8Q2R6V9X1Z4B7D0F3H",
  "chosen_option": { "index": 1 }
}

The mandate.approval.approved webhook carries the pick as chosen_option: { index, jti }, so your server knows which token to run without polling.

Use options in a policy

Verify on an option token adds two facts your rules can read:

FactValue
approval.option_countHow many options the person chose from
approval.chosen_optionThe index of the option they approved

Errors you might see

CodeStatusWhat to do
parameter_invalid400Send 2 to 5 options with distinct labels, and no action_description, action_payload, approval or mandate_token beside them. On respond, send option_index with approve only.
approval_already_decided409The group was decided; read it with GET /v1/mandate/approvals/{id} instead.
option_not_chosen200A verify reason, not an error: run only the chosen option.

See also