View as Markdown

Authorize · API reference

Counter-offers

Counter-offers between agents: a subagent records what it was asked to get (a brief), posts what an outside agent offered instead, and Provenance computes the differences and decides each option: accept within the grant's tolerances, ask the person who asked, or refuse.

Related guide: Counter-offers

The counter offer object

Attributes

idstringRequired
cof_ + ULID.
objectenumRequired
The type of object. One of counter_offer.
sideenumRequired
The side. One of asking, offering.
statusenumRequired
The state. not_chosen: it waited in the collect window or the queue and the person accepted another offer for the brief. One of open, asking, accepted, declined, expired, stopped, withdrawn, not_chosen.
brief_idstringRequired
The brief.
grant_idstring | nullRequired
The grant.
run_idstring | nullRequired
The agent-team run, when there is one.
channelenumRequired
Where the offer came from. One of a2a, mcp, ucp, acp, ap2, web, voice, chat, email.
counterpartyobjectRequired
The outside agent and the best proof it gave.
Show child attributes
agent_idstring
The agent's registered id.
kidstring
The key id the outside agent signed with.
originstring
The outside agent's origin.
namestring
The name, as given.
card_urlstring
The outside agent's Agent Card URL.
call_idstring
The registered call the offer came on (voice).
verificationenum
The best proof the outside agent gave. registered: an offer signed by a key registered to a Provenance selling agent. signed_directory: an option signed by a key in its origin's RFC 9421 key directory. signed_card: an A2A Agent Card on its origin whose signature verifies against a key on that origin. declared: a name and origin only (also when its keys or card couldn't be fetched). One of registered, signed_directory, signed_card, declared.
key_thumbprintstring
The key id (registered) or RFC 7638 thumbprint (directory) of the key that signed an option.
proven_originstring
The origin whose key directory or signed Agent Card proved the level.
card_key_thumbprintstring
The thumbprint of the key that signed the Agent Card (signed_card).
proof_problemenum
Why a proof that was offered didn't count, when the level is declared. One of keys_unavailable, card_unavailable, card_signature_invalid.
trustedobject
A trusted agent on the person's or the company's list it matched, by its proven agent id or key. It counts as verified.
Show child attributes
idstring
The trusted agent entry.
ownerenum
Whose list. One of account, person.
optionsarray of objectsRequired
The options offered (one to five).
Show child attributes
indexinteger
The option's position (0 first).
labelstring
A short label for the option.
sourceenum
The source. One of signed, reported_by_agent.
signed_byenum
How a signed option was checked: a seller's offer+jwt against its registered key, or a JWS against the origin's key directory. One of registered, signed_directory.
signature_statusenum
A signed option whose keys couldn't be fetched, kept as reported. One of keys_unavailable.
offerobject
What one option offers. For a signed option these are the signed fields; fields sent beside a signed offer are ignored.
Show child attributes
itemsarray of objectsRequired
The lines.
Show child attributes
namestringRequired
The name, as given.
skustring
The seller's item code.
categorystring
The item's category.
quantitynumberRequired
How many.
unitstring
The unit the quantity is in.
unit_pricenumber
The price of one unit, in the offer's currency.
totalnumberRequired
The offer's total, in its currency (major units).
currencystringRequired
ISO 4217 currency code.
datesobject
The dates of what is offered.
Show child attributes
starttimestamp
When it starts.
endtimestamp
When it ends.
termsobject
The offer's terms.
Show child attributes
refundableboolean
Whether it can be refunded.
cancellation_beforetimestamp
The last time it can be cancelled.
change_feenumber
The fee to change it, in the currency.
deliveryobject
When it is delivered.
Show child attributes
bytimestamp
The delivery date.
sellerstring
The seller's id or origin.
expires_attimestampRequired
When the offer ends.
coverageenum
Whether the offer covers the whole brief (full) or part of it (partial). One of full, partial.
linesarray of objects
For a partial offer: how much of each brief line it covers.
Show child attributes
brief_lineinteger
The brief line's index.
quantity_offerednumber
How much of that line is offered.
tax_and_feesnumber
Tax and fees on top of the total, when declared.
offer_hashstring
The signed offer's hash, or sha256 over the reported fields. What an acceptance binds to.
differencesarray of objects
What the option changes against the brief, computed by Provenance.
Show child attributes
fieldenum
What differs. One of price, dates, item, quantity, terms, seller, currency, delivery.
partstring
Which part of the field (a line's name, end, refundable).
fromstring | null
The brief's value.
tostring | null
The offer's value.
deltanumber
Price in the currency, dates and delivery in minutes, quantity in units.
delta_pctnumber
The price change as a percentage of the brief's price line.
directionenum
better, worse or different. One of better, worse, different.
categoryenum
The item's category. One of same, different, unknown.
resultenum
The result. One of within_authority, ask, refused.
reasonstring | null
Why it asks or was refused (a reason code).
matched_rule_idstring
The matched rule id.
notestring
The outside agent's own words, plain text, labelled as theirs.
external_refstring
The outside agent's own reference for the option.
action_hashstring
the payload hash an intent bought for this option must carry (sha256 hex).
changed_after_acceptancearray of objects
on a revision (revises) of an accepted counter-offer, what changed against the accepted version, in the shape of differences. Worse in any way: the person decides it again.
cleared_byenum
Offering side: who cleared the option for signing (the offer rules, a staff member, or the rules' timeout setting). Only cleared options may be signed (sign_check). One of rules, staff, timeout.
offer_payloadobject
Offering side: the signed-offer payload your agent signs once the option is cleared.
request_differencesarray of objects
Offering side: what the option changes against the buyer's request (differences are against your standard offer: a lower price there is a concession).
credit_instead_of_refundnumber
Offering side: store credit offered instead of a refund, in major units.
fromobject
an option that joined this ask from another counter-offer in the collect window.
Show child attributes
counter_offer_idstring
The counter-offer it came from.
indexinteger
Its index there.
statusenum
The state. One of open, accepted, not_chosen.
retryenumRequired
What the agent should do next: accept one within authority, wait_for_person while the ask is open, find_another (refused, Keep looking or a timeout), revise (the person asked for a change: take their words back to the outside agent and post its new offer with revises), or nothing (accepted, or the person declined this one and the brief stays open). One of accept, wait_for_person, find_another, revise.
exchange_idstring
The shared exchange record this counter-offer is written to (xch_…), on a read of one counter-offer, when there is one.
approval_idstring | nullRequired
The ask's approval (an ordinary approval row, matched_rule_id counter_offer), when a person was asked.
askobject | null
The ask that went to a person, when one did.
Show child attributes
toenum
Who was asked: the person behind the top grant, a member, an approver link, or the account's approval routes. One of root_person, member, approver_link, routes.
expires_attimestamp
When the ask ends (30 seconds before the offer, the ask limit, or the brief's deadline).
on_timeoutenum
What silence does. accept_within_tolerances only when the person chose it for the grant. One of decline, accept_within_tolerances.
optionsarray of integers
The options asked about.
decisionobject | null
How the ask ended.
Show child attributes
kindenum
The person's answer, a timeout, or a check at the time that refused the option. One of accept, decline, keep_looking, request_changes, timeout, no_longer_allowed.
optioninteger
The option accepted.
notestring | null
The person's note to the agent (theirs, plain text).
requested_changesarray of objects
What the person asked to change (the change form: field, label, from, to). On the offering side, Edit proposal sends a price: { field: price, label: Price, from: 598, to: 610 } (price:<index> when the ask held several proposals). It is a request to the agent, never an instruction the platform carries out.
reasonstring | null
Why, when nobody chose it.
byenum
Who ended it (agent: the requesting agent declined it). One of person, timeout, system, agent.
by_namestring
With person: who answered, by name, on the account's own reads: a console person's email or an outside approver's display name. Absent for the person behind a grant, a server, a timeout and the system.
methodstring | null
How the person answered: passkey, link, console or api_key.
attimestamp
When.
approval_link_tokenstring
Sandbox only, on create: the ask's link token, so a test can answer as the person. Never on live.
acceptanceobject | nullRequired
The acceptance a purchase must match (one per counter-offer).
Show child attributes
optioninteger
The option's index.
offer_hashstring
The offer's hash; what the acceptance binds to.
amountnumber
The accepted amount.
currencystring
ISO 4217 currency code.
expires_attimestamp
The offer's expiry, at most 24 hours.
accepted_byobject
authority with the tolerance that allowed it (or no_worse); person with the approval_id and method; or timeout with the tolerance that let silence accept it.
accepted_attimestamp
When it was accepted.
consumed_attimestamp | null
When a purchase used it (null until then).
consumed_byobject | null
the purchase that used it (one each): a deal, a verify of a token, or a store's checkout assessment.
Show child attributes
kindenum
What used it. One of deal, verify, checkout.
idstring
The deal, the token's jti or the checkout assessment.
heldobject | null
the ask waits. collecting (until the collect window ends, then one ask goes out with the joined options), merged (its options joined into that counter-offer's ask; the acceptance lives there) or queued (behind another ask on the brief that is out).
Show child attributes
kindenum
How it waits. One of collecting, merged, queued.
untiltimestamp
When the collect window ends.
intostring
The counter-offer whose ask it joined.
behindstring
The counter-offer whose ask it waits behind.
revisesstring | nullRequired
The counter-offer this one replaces.
call_idstring | nullRequired
The registered call the offer came on (voice).
stopped_byobject | nullRequired
The stopped by.
created_byobjectRequired
The created by.
Show child attributes
viaenum
How it was created: holder (the agent's own proof), account_key or console. One of holder, account_key, console.
agent_idstring | null
The agent's registered id.
created_attimestampRequired
The created at.
updated_attimestampRequired
The updated at.

The counter offer object

{
  "id": "cof_01M8F9N80Q5D7W4S53G1744HDE",
  "object": "counter_offer",
  "side": "asking",
  "status": "asking",
  "brief_id": "brf_01M8F9N80B1BY758DGSKQZHH59",
  "grant_id": "grt_01M8F9N801BZ5DYQV0MEDYTW6B",
  "run_id": null,
  "channel": "a2a",
  "counterparty": {
    "origin": "https://air.example",
    "name": "The airline's booking agent",
    "verification": "declared"
  },
  "options": [
    {
      "index": 0,
      "label": "12:40",
      "source": "reported_by_agent",
      "offer": {
        "items": [
          {
            "name": "Seat LIS-JFK",
            "sku": "TP209-1240",
            "category": "flight",
            "quantity": 1
          }
        ],
        "total": 648,
        "currency": "USD",
        "dates": {
          "start": "2027-03-12T12:40:00Z"
        },
        "terms": {
          "refundable": true
        },
        "expires_at": "2027-03-01T00:00:00Z"
      },
      "offer_hash": "99e31a9716993e671300ef8761fac8261bafa8eefe8181edf48daa3d05877c6c",
      "differences": [
        {
          "field": "item",
          "part": "Seat LIS-JFK",
          "from": "Seat LIS-JFK",
          "to": "Seat LIS-JFK",
          "direction": "different",
          "category": "same"
        },
        {
          "field": "price",
          "from": 612,
          "to": 648,
          "delta": 36,
          "delta_pct": 5.9,
          "direction": "worse"
        },
        {
          "field": "dates",
          "from": "2027-03-12T09:05:00Z",
          "to": "2027-03-12T12:40:00Z",
          "delta": 215,
          "direction": "worse"
        }
      ],
      "result": "ask",
      "reason": "item_changed",
      "note": "The 9:05 is full",
      "status": "open"
    }
  ],
  "retry": "wait_for_person",
  "approval_id": "appr_01M8F9N80WH06X7T67MZVGFXRW",
  "ask": {
    "to": "root_person",
    "expires_at": "2026-11-27T20:17:59.735Z",
    "on_timeout": "decline",
    "options": [
      0
    ]
  },
  "decision": null,
  "acceptance": null,
  "revises": null,
  "held": null,
  "call_id": null,
  "stopped_by": null,
  "created_by": {
    "via": "account_key",
    "agent_id": null
  },
  "created_at": "2026-11-27T20:02:59.733Z",
  "updated_at": "2026-11-27T20:02:59.742Z"
}

Events

Sent to your webhook endpoints when they subscribe:

  • authorize.brief.recorded
  • authorize.brief.closed
  • authorize.counter_offer.received
  • authorize.counter_offer.accepted
  • authorize.counter_offer.asked
  • authorize.counter_offer.decided
  • authorize.counter_offer.expired
  • authorize.counter_offer.stopped

Retrieve a brief

GET/v1/authorize/briefs/{id}

One of the account's briefs.

Parameters

idstringpathRequired
The brief (brf_…).

Returns

The brief.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "purpose": "Book Maya'\''s Lisbon trip, 12 to 16 March",
    "constraints": {
      "max_amount": 1300,
      "budget_amount": 2400,
      "budget_window": "month",
      "currency": "USD",
      "accept_within": {
        "price_up_pct": 5,
        "date_later_minutes": 120
      },
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export GRANT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: brief-lisbon-flight-3" \
  -H "Content-Type: application/json" \
  -d "{
    \"grant_id\": \"$GRANT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      },
      \"terms\": {
        \"refundable\": true
      }
    }
  }" > step.json
export BRIEF_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/authorize/briefs/$BRIEF_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "brf_01M8DAEPKZB238VHVC2CK03023",
  "object": "brief",
  "side": "asking",
  "status": "open",
  "grant_id": "grt_01M8DAEPKXPJX84KJMPS39TPZ4",
  "agent_id": null,
  "run_id": null,
  "purpose": "Book Maya's Lisbon trip, 12 to 16 March",
  "asked_by": {
    "kind": "root_person"
  },
  "wants": {
    "items": [
      {
        "name": "Seat LIS-JFK",
        "sku": "TP209-0905",
        "category": "flight",
        "quantity": 1
      }
    ],
    "max_total": 612,
    "currency": "USD",
    "dates": {
      "start": "2027-03-12T09:05:00Z"
    },
    "terms": {
      "refundable": true
    }
  },
  "remaining": [
    {
      "name": "Seat LIS-JFK",
      "sku": "TP209-0905",
      "category": "flight",
      "quantity": 1
    }
  ],
  "brief_hash": "94f177c5dae9fea4a82ed2c69f6580e7dc953956f340a341344687b6c4af5048",
  "deadline": null,
  "created_by": {
    "via": "account_key",
    "agent_id": null
  },
  "created_at": "2026-11-27T01:38:25.023Z",
  "updated_at": "2026-11-27T01:38:25.023Z"
}

Retrieve a counter-offer

GET/v1/authorize/counter_offers/{id}

One of the account's counter-offers, with each option's differences and result. An ask the person answered (on any surface) or that ran out is brought up to date first, so status, decision, acceptance and retry are current.

Parameters

idstringpathRequired
The counter-offer (cof_…).
waitintegerquery
Seconds to hold the read while an ask is open; it answers as soon as the ask ends.

Returns

The counter-offer. See the counter offer object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "purpose": "Book Maya'\''s Lisbon trip, 12 to 16 March",
    "constraints": {
      "max_amount": 1300,
      "budget_amount": 2400,
      "budget_window": "month",
      "currency": "USD",
      "accept_within": {
        "price_up_pct": 5,
        "date_later_minutes": 120
      },
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export GRANT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: brief-lisbon-flight-7" \
  -H "Content-Type: application/json" \
  -d "{
    \"grant_id\": \"$GRANT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      },
      \"terms\": {
        \"refundable\": true
      }
    }
  }" > step.json
export BRIEF_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/counter_offers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"brief_id\": \"$BRIEF_ID\",
    \"channel\": \"a2a\",
    \"counterparty\": {
      \"origin\": \"https://air.example\"
    },
    \"options\": [
      {
        \"offer\": {
          \"items\": [
            {
              \"name\": \"Seat LIS-JFK\",
              \"sku\": \"TP209-1240\",
              \"category\": \"flight\",
              \"quantity\": 1
            }
          ],
          \"total\": 648,
          \"currency\": \"USD\",
          \"dates\": {
            \"start\": \"2027-03-12T12:40:00Z\"
          },
          \"terms\": {
            \"refundable\": true
          },
          \"expires_at\": \"2027-03-01T00:00:00Z\"
        }
      }
    ]
  }" > step.json
export COUNTER_OFFER_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/authorize/counter_offers/$COUNTER_OFFER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "cof_01M8F9N81HP0WNGPSZCRKFJ2BM",
  "object": "counter_offer",
  "side": "asking",
  "status": "asking",
  "brief_id": "brf_01M8F9N81E1YCA70CGE39H7KE9",
  "grant_id": "grt_01M8F9N81BCXSW3T13DYG6XZCA",
  "run_id": null,
  "channel": "a2a",
  "counterparty": {
    "origin": "https://air.example",
    "verification": "declared"
  },
  "options": [
    {
      "index": 0,
      "source": "reported_by_agent",
      "offer": {
        "items": [
          {
            "name": "Seat LIS-JFK",
            "sku": "TP209-1240",
            "category": "flight",
            "quantity": 1
          }
        ],
        "total": 648,
        "currency": "USD",
        "dates": {
          "start": "2027-03-12T12:40:00Z"
        },
        "terms": {
          "refundable": true
        },
        "expires_at": "2027-03-01T00:00:00Z"
      },
      "offer_hash": "99e31a9716993e671300ef8761fac8261bafa8eefe8181edf48daa3d05877c6c",
      "differences": [
        {
          "field": "item",
          "part": "Seat LIS-JFK",
          "from": "Seat LIS-JFK",
          "to": "Seat LIS-JFK",
          "direction": "different",
          "category": "same"
        },
        {
          "field": "price",
          "from": 612,
          "to": 648,
          "delta": 36,
          "delta_pct": 5.9,
          "direction": "worse"
        },
        {
          "field": "dates",
          "from": "2027-03-12T09:05:00Z",
          "to": "2027-03-12T12:40:00Z",
          "delta": 215,
          "direction": "worse"
        }
      ],
      "result": "ask",
      "reason": "item_changed",
      "status": "open"
    }
  ],
  "retry": "wait_for_person",
  "approval_id": "appr_01M8F9N81J81PB7NA14FCN6N2C",
  "ask": {
    "to": "root_person",
    "expires_at": "2026-11-27T20:17:59.761Z",
    "on_timeout": "decline",
    "options": [
      0
    ]
  },
  "decision": null,
  "acceptance": null,
  "revises": null,
  "held": null,
  "call_id": null,
  "stopped_by": null,
  "created_by": {
    "via": "account_key",
    "agent_id": null
  },
  "created_at": "2026-11-27T20:02:59.761Z",
  "updated_at": "2026-11-27T20:02:59.762Z"
}

Read the counter-offer settings

GET/v1/authorize/settings/counter_offers

The account's counter-offer settings, with the defaults filled in. Any member.

Parameters

No parameters.

Returns

The settings.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/authorize/settings/counter_offers" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "counter_offer_settings",
  "accept_within_default": null,
  "unsigned": "ask",
  "unverified": "ask",
  "disclose": "agent",
  "collect_seconds": 0,
  "no_silent_accept": false,
  "ask_on_item_change": true,
  "ask_wait_minutes": 1440
}

Get an authority proof for an offer

POST/v1/authorize/authority_proofs

An offer-scoped authority+jwt (ES256) for the outside agent: "this agent may commit to this offer", with aud, sub, operator, the person's pairwise root_sub and covers, never a limit, budget, grant or purpose. Only for an option the agent may accept now or one a person accepted. At most 10 minutes; it holds only while its keyless status is active. Holder proof only.

No API key needed.

Parameters

counter_offer_idstringRequired
The counter-offer (cof_…).
optionintegerRequired
The option the agent will commit to.
audiencestringRequired
Who the proof is for: the outside agent's agent_id, a key thumbprint the counter-offer recorded, or its origin.
grant_tokenstring
Holder proof: the agent's own grant token, with its RFC 9421 signature over the request. Left out with a key restricted to the agent the counter-offer's grant names (or that agent's client-credentials sign-in on the MCP server), which stands in for its holder proof.

Returns

The signed proof. Keep it only as long as the exchange needs it; only its status is kept here.

Errors

curl -X POST "$PROVENANCE_API/v1/authorize/authority_proofs" \
  -H "Content-Type: application/json" \
  -d '{
    "counter_offer_id": "cof_01M8FT658VK09ZG0Q2C7B0CGCX",
    "option": 0,
    "audience": "https://air.example",
    "grant_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6Im1hbmRhdGUrand0In0.eyJqdGkiOiJncnRfMDEifQ.c2lnbmF0dXJl"
  }'

Response 201

{
  "object": "authority_proof",
  "jti": "atp_01M8FT65A4N7Q2W9E3R5T8Y1U6",
  "authority_proof": "eyJhbGciOiJFUzI1NiIsInR5cCI6ImF1dGhvcml0eStqd3QiLCJraWQiOiI0YzFmOWEyZTdiM2Q1YzhhIn0.eyJpc3MiOiJwcm92ZW5hbmNlLWF1dGhvcml6ZSIsImp0aSI6ImF0cF8wMU04RlQ2NUE0TjdRMlc5RTNSNVQ4WTFVNiIsImF1ZCI6Imh0dHBzOi8vYWlyLmV4YW1wbGUifQ.c2lnbmF0dXJl",
  "audience": "https://air.example",
  "covers": {
    "offer_hash": "9d2c4e1f7a3b5d8c0e6f2a4b6c8d0e1f3a5b7c9d1e3f5a7b9c1d3e5f7a9b1c3d",
    "amount": 598,
    "currency": "USD"
  },
  "expires_at": "2026-11-28T01:01:51.000Z",
  "status_url": "https://sandbox-api.provenanceauth.com/v1/public/authority_proofs/atp_01M8FT65A4N7Q2W9E3R5T8Y1U6/status"
}

Read the offer rules

GET/v1/authorize/offer_rules

The offering side's rules: the account default and each agent's own. Any member, or a key.

Parameters

No parameters.

Returns

The account default (null when none is set) and each agent's rules.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/authorize/offer_rules" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "offer_rule_list",
  "default": null,
  "agents": []
}

Read an agent's offer rules

GET/v1/authorize/offer_rules/{agent_id}

The agent's own rules (or the default it inherits, with inherited: true) and effective: the tightest of its rules and the default, which is what applies.

Parameters

No parameters.

Returns

The agent's rules.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/authorize/offer_rules/agt_01M8F9N81SDT2VDABK2Y1420BJ" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "offer_rule",
  "agent_id": "agt_01M8F9N81SDT2VDABK2Y1420BJ",
  "offer_within": {
    "discount_pct": 3
  },
  "approver": {
    "kind": "routes"
  },
  "on_timeout": "decline",
  "enforce_at_deal": true,
  "version": 1,
  "updated_by": "k_01M8F9N81WW0Q22RVRZ5NNPSX8",
  "created_at": "2026-11-28T10:00:00.000Z",
  "updated_at": "2026-11-28T10:00:00.000Z",
  "inherited": false,
  "effective": {
    "object": "offer_rule",
    "agent_id": "agt_01M8F9N81SDT2VDABK2Y1420BJ",
    "offer_within": {
      "discount_pct": 3,
      "date_earlier_minutes": 360,
      "date_later_minutes": 360
    },
    "approver": {
      "kind": "routes"
    },
    "on_timeout": "decline",
    "enforce_at_deal": true,
    "version": 1,
    "updated_by": "k_01M8F9N81WW0Q22RVRZ5NNPSX8",
    "created_at": "2026-11-28T10:00:00.000Z",
    "updated_at": "2026-11-28T10:00:00.000Z"
  }
}

Change the counter-offer settings

PUT/v1/authorize/settings/counter_offers

Changes the fields you send. An owner or admin, or an admin key. Loosening unsigned, unverified, disclose, no_silent_accept or ask_on_item_change is written to the account's ledger. accept_within_default: null clears the default.

Parameters

accept_within_defaultobject | any | null
The accept within default.
Show child attributes
price_up_pctnumber
The most the price may rise, as a percentage of the brief's price line.
price_up_amountnumber
The most the price may rise, in the grant's currency (major units). Both price fields must pass when both are set.
date_earlier_minutesinteger
How much earlier a date may move.
date_later_minutesinteger
How much later a date may move.
substitutesenum
Whether a substitute item in the brief line's category may be accepted. One of none, same_category.
quantity_shortenum
Whether an offer of part of the quantity may be accepted. One of none, partial.
terms_worseboolean
Whether worse terms (not refundable, an earlier cancellation deadline, a change fee, later delivery) may be accepted.
other_sellerboolean
Whether a seller other than the brief's counterparties may be accepted.
on_timeoutenum
What happens when the person doesn't answer an ask (default decline). Asks arrive in a later slice. One of decline, accept_within_tolerances.
unsignedenum
What a reported (unsigned) offer does: ask the person (the default), within_tolerances (a reported option inside every tolerance and limit, from an outside agent at a verified level, may be accepted alone; loosening it is recorded on the ledger) or refuse it. One of ask, within_tolerances, refuse.
unverifiedenum
The unverified. One of ask, refuse.
discloseenum
The disclose. One of agent, chain.
collect_secondsinteger
Hold the first ask this long to gather offers from several agents.
no_silent_acceptboolean
The no silent accept.
ask_on_item_changeboolean
The ask on item change.
ask_wait_minutesenum
Wait for an answer, in minutes: how long a proposal waits for the person (24 hours by default). One of 15, 60, 240, 1440.

Returns

The settings.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X PUT "$PROVENANCE_API/v1/authorize/settings/counter_offers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "unsigned": "ask", "accept_within_default": { "price_up_pct": 2 } }'

Response 200

{
  "object": "counter_offer_settings",
  "accept_within_default": {
    "price_up_pct": 2
  },
  "unsigned": "ask",
  "unverified": "ask",
  "disclose": "agent",
  "collect_seconds": 0,
  "no_silent_accept": false,
  "ask_on_item_change": true,
  "ask_wait_minutes": 1440
}

Set the account's offer rules

PUT/v1/authorize/offer_rules

What any selling or support agent may offer alone, as concessions from its standard offer. Narrowing: a member who approves, or a key. Widening (a looser offer_within, on_timeout: accept_within_tolerances, enforce_at_deal: false): an owner or admin, or an admin key; written to the account's ledger.

Parameters

offer_withinobjectRequired
Concessions the agent may make alone (see OfferRule): discount_pct, discount_amount, substitutes, quantity_short, date_earlier_minutes, date_later_minutes, terms_better, credit_instead_of_refund_max. Absent fields allow none.
approverobject
Who is asked past the rules: kind member, approver_link or routes (the default), with id; never an agent.
on_timeoutenum
What an unanswered ask does (default decline). One of decline, accept_within_tolerances.
enforce_at_dealboolean
A deal on an uncleared offer waits for your people (default true).
expected_versioninteger | null
Compare-and-set: the version you read (0: only if none is set yet). Leave it out to overwrite.

Returns

The rules as saved.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X PUT "$PROVENANCE_API/v1/authorize/offer_rules" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "offer_within": {
      "discount_pct": 5,
      "date_earlier_minutes": 360,
      "date_later_minutes": 360
    },
    "approver": {
      "kind": "routes"
    },
    "expected_version": 0
  }'

Response 200

{
  "object": "offer_rule",
  "agent_id": null,
  "offer_within": {
    "discount_pct": 5,
    "date_earlier_minutes": 360,
    "date_later_minutes": 360
  },
  "approver": {
    "kind": "routes"
  },
  "on_timeout": "decline",
  "enforce_at_deal": true,
  "version": 1,
  "updated_by": "k_01M8F9N81WW0Q22RVRZ5NNPSX8",
  "created_at": "2026-11-28T10:00:00.000Z",
  "updated_at": "2026-11-28T10:00:00.000Z"
}

Set an agent's offer rules

PUT/v1/authorize/offer_rules/{agent_id}

One agent's rules; never looser than the account default (400 naming the field). The same roles as the account default.

Parameters

offer_withinobjectRequired
Concessions the agent may make alone (see OfferRule): discount_pct, discount_amount, substitutes, quantity_short, date_earlier_minutes, date_later_minutes, terms_better, credit_instead_of_refund_max. Absent fields allow none.
approverobject
Who is asked past the rules: kind member, approver_link or routes (the default), with id; never an agent.
on_timeoutenum
What an unanswered ask does (default decline). One of decline, accept_within_tolerances.
enforce_at_dealboolean
A deal on an uncleared offer waits for your people (default true).
expected_versioninteger | null
Compare-and-set: the version you read (0: only if none is set yet). Leave it out to overwrite.

Returns

The rules as saved.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X PUT "$PROVENANCE_API/v1/authorize/offer_rules/agt_01M8F9N81SDT2VDABK2Y1420BJ" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "offer_within": { "discount_pct": 3 } }'

Response 200

{
  "object": "offer_rule",
  "agent_id": "agt_01M8F9N81SDT2VDABK2Y1420BJ",
  "offer_within": {
    "discount_pct": 3
  },
  "approver": {
    "kind": "routes"
  },
  "on_timeout": "decline",
  "enforce_at_deal": true,
  "version": 1,
  "updated_by": "k_01M8F9N81WW0Q22RVRZ5NNPSX8",
  "created_at": "2026-11-28T10:00:00.000Z",
  "updated_at": "2026-11-28T10:00:00.000Z"
}

List briefs

GET/v1/authorize/briefs

The account's briefs, newest first. Filters: status, grant_id, run_id.

Parameters

statusenumquery
The state. One of open, fulfilled, partly_fulfilled, abandoned, expired, stopped.
grant_idstringquery
The grant.
run_idstringquery
The agent-team run, when there is one.
limitintegerquery
Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid.
cursorstringquery
Opaque; pass a response's next_cursor back to get the next page.

Returns

A page of briefs.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "purpose": "Book Maya'\''s Lisbon trip, 12 to 16 March",
    "constraints": {
      "max_amount": 1300,
      "budget_amount": 2400,
      "budget_window": "month",
      "currency": "USD",
      "accept_within": {
        "price_up_pct": 5,
        "date_later_minutes": 120
      },
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export GRANT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: brief-lisbon-flight-2" \
  -H "Content-Type: application/json" \
  -d "{
    \"grant_id\": \"$GRANT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      },
      \"terms\": {
        \"refundable\": true
      }
    }
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/briefs?grant_id=$GRANT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "list",
  "data": [
    {
      "id": "brf_01M8DAEPKRTMP4780WCP5128GP",
      "object": "brief",
      "side": "asking",
      "status": "open",
      "grant_id": "grt_01M8DAEPKMNATQ3V0SN08BDBWD",
      "agent_id": null,
      "run_id": null,
      "purpose": "Book Maya's Lisbon trip, 12 to 16 March",
      "asked_by": {
        "kind": "root_person"
      },
      "wants": {
        "items": [
          {
            "name": "Seat LIS-JFK",
            "sku": "TP209-0905",
            "category": "flight",
            "quantity": 1
          }
        ],
        "max_total": 612,
        "currency": "USD",
        "dates": {
          "start": "2027-03-12T09:05:00Z"
        },
        "terms": {
          "refundable": true
        }
      },
      "remaining": [
        {
          "name": "Seat LIS-JFK",
          "sku": "TP209-0905",
          "category": "flight",
          "quantity": 1
        }
      ],
      "brief_hash": "608f7f9d74dbc512d32db37256f43d9efbf6679c9b0fa8190c2a193c96025a63",
      "deadline": null,
      "created_by": {
        "via": "account_key",
        "agent_id": null
      },
      "created_at": "2026-11-27T01:38:25.016Z",
      "updated_at": "2026-11-27T01:38:25.016Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

List counter-offers

GET/v1/authorize/counter_offers

The account's counter-offers, newest first. Filters: status, brief_id, grant_id, run_id.

Parameters

statusenumquery
The state. One of open, asking, accepted, declined, expired, stopped, withdrawn.
brief_idstringquery
The brief.
grant_idstringquery
The grant.
run_idstringquery
The agent-team run, when there is one.
limitintegerquery
Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid.
cursorstringquery
Opaque; pass a response's next_cursor back to get the next page.

Returns

A page of counter-offers.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "purpose": "Book Maya'\''s Lisbon trip, 12 to 16 March",
    "constraints": {
      "max_amount": 1300,
      "budget_amount": 2400,
      "budget_window": "month",
      "currency": "USD",
      "accept_within": {
        "price_up_pct": 5,
        "date_later_minutes": 120
      },
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export GRANT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: brief-lisbon-flight-6" \
  -H "Content-Type: application/json" \
  -d "{
    \"grant_id\": \"$GRANT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      },
      \"terms\": {
        \"refundable\": true
      }
    }
  }" > step.json
export BRIEF_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/counter_offers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"brief_id\": \"$BRIEF_ID\",
    \"channel\": \"a2a\",
    \"counterparty\": {
      \"origin\": \"https://air.example\"
    },
    \"options\": [
      {
        \"offer\": {
          \"items\": [
            {
              \"name\": \"Seat LIS-JFK\",
              \"sku\": \"TP209-1240\",
              \"category\": \"flight\",
              \"quantity\": 1
            }
          ],
          \"total\": 648,
          \"currency\": \"USD\",
          \"dates\": {
            \"start\": \"2027-03-12T12:40:00Z\"
          },
          \"terms\": {
            \"refundable\": true
          },
          \"expires_at\": \"2027-03-01T00:00:00Z\"
        }
      }
    ]
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/counter_offers?brief_id=$BRIEF_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "list",
  "data": [
    {
      "id": "cof_01M8F9N8158DKG3N82M4Q8A2Y9",
      "object": "counter_offer",
      "side": "asking",
      "status": "asking",
      "brief_id": "brf_01M8F9N813F1NYJMWC4G8R1CE8",
      "grant_id": "grt_01M8F9N811MD3TPVTRK00F4NYE",
      "run_id": null,
      "channel": "a2a",
      "counterparty": {
        "origin": "https://air.example",
        "verification": "declared"
      },
      "options": [
        {
          "index": 0,
          "source": "reported_by_agent",
          "offer": {
            "items": [
              {
                "name": "Seat LIS-JFK",
                "sku": "TP209-1240",
                "category": "flight",
                "quantity": 1
              }
            ],
            "total": 648,
            "currency": "USD",
            "dates": {
              "start": "2027-03-12T12:40:00Z"
            },
            "terms": {
              "refundable": true
            },
            "expires_at": "2027-03-01T00:00:00Z"
          },
          "offer_hash": "99e31a9716993e671300ef8761fac8261bafa8eefe8181edf48daa3d05877c6c",
          "differences": [
            {
              "field": "item",
              "part": "Seat LIS-JFK",
              "from": "Seat LIS-JFK",
              "to": "Seat LIS-JFK",
              "direction": "different",
              "category": "same"
            },
            {
              "field": "price",
              "from": 612,
              "to": 648,
              "delta": 36,
              "delta_pct": 5.9,
              "direction": "worse"
            },
            {
              "field": "dates",
              "from": "2027-03-12T09:05:00Z",
              "to": "2027-03-12T12:40:00Z",
              "delta": 215,
              "direction": "worse"
            }
          ],
          "result": "ask",
          "reason": "item_changed",
          "status": "open"
        }
      ],
      "retry": "wait_for_person",
      "approval_id": "appr_01M8F9N8151359BJFWVYXEAQJA",
      "ask": {
        "to": "root_person",
        "expires_at": "2026-11-27T20:17:59.749Z",
        "on_timeout": "decline",
        "options": [
          0
        ]
      },
      "decision": null,
      "acceptance": null,
      "revises": null,
      "held": null,
      "call_id": null,
      "stopped_by": null,
      "created_by": {
        "via": "account_key",
        "agent_id": null
      },
      "created_at": "2026-11-27T20:02:59.749Z",
      "updated_at": "2026-11-27T20:02:59.750Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Remove an agent's offer rules

DELETE/v1/authorize/offer_rules/{agent_id}

The agent then follows the account default, which may be looser: an owner or admin, or an admin key.

Parameters

No parameters.

Returns

Removed.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X DELETE "$PROVENANCE_API/v1/authorize/offer_rules/agt_01M8F9N81SDT2VDABK2Y1420BJ" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Record a brief

POST/v1/authorize/briefs

Records what a subagent was asked to get under a grant, and who is asked when an outside agent offers something else. A brief only narrows its grant. Holder proof, the holder of a grant above it, or the account. A retry with the same Idempotency-Key returns the first brief.

Parameters

Idempotency-KeystringheaderRequired
A retry with the same key returns the first brief.
sideenum
asking (the default): a subagent's brief under a grant. offering: a business records what a buyer's agent asked for (wants) and its own standard offer, with agent_id; the account's key or a console session, never a grant. One of asking, offering.
agent_idstring
Offering side: the selling or support agent that will make and sign the offer.
standardobject
Offering side: the offer the business would make by default, against which its agent's concessions are measured (a lower total is a discount; better terms are a concession).
Show child attributes
itemsarray of objectsRequired
The lines of the standard offer.
totalnumberRequired
Its total, in major units.
currencystringRequired
Three-letter currency code.
datesobject
When, as in wants.dates.
termsobject
Its terms, as in wants.terms.
requesterobject
Offering side: the buyer's agent that asked, as you recorded it.
Show child attributes
agent_idstring
Its registered agent id.
kidstring
Its key thumbprint.
originstring
Its origin.
namestring
Its name.
shareboolean
Asking side: share wants into the exchange record the outside agent's side can read (never limits, remaining, the grant or who decides). Default false.
grant_idstring
The grant the brief lives under (the holder's own when left out).
network_grant_idstring
Instead of grant_id: a person's network grant (ngr_…), or a helper's handed-on one, with the maker's key. Its proposals are decided by the person who granted it, never a member; grant_id on the brief then reads this id.
grant_tokenstring
Holder proof: the agent's own grant token (with its signature over the request); leave it out with an account key.
run_idstring
The agent-team run, when there is one.
purposestring
What the brief is for.
wantsobjectRequired
What the subagent was asked to get.
Show child attributes
itemsarray of objectsRequired
The lines.
Show child attributes
namestringRequired
Plain text: no links or phone numbers.
skustring
The seller's item code.
categorystring
Compared with a substitute's category.
quantitynumberRequired
How many.
unitstring
The unit the quantity is in.
max_totalnumber
The price line, in currency (major units). Within every cap and budget in the grant's chain. 0 asks for something that costs nothing, such as a cancellation.
currencystringRequired
ISO 4217; the grant's currency when it has one.
datesobject
The dates of what is offered.
Show child attributes
starttimestamp
When it starts.
endtimestamp
When it ends.
flexibleobject
How far the dates may move before it counts as a difference at all.
Show child attributes
earlier_minutesinteger
Minutes earlier that still count as the same date.
later_minutesinteger
Minutes later that still count as the same date.
termsobject
The offer's terms.
Show child attributes
refundableboolean
Whether it can be refunded.
cancellation_beforetimestamp
The last time it can be cancelled.
delivery_bytimestamp
The latest delivery the brief accepts.
change_feenumber
The fee to change it, in the currency.
counterpartiesarray of strings
Who may sell it; within the grant's allowed counterparties.
asked_byobject
Who is asked when an offer differs.
Show child attributes
kindenum
Who: root_person, member or approver_link. One of root_person, member, approver_link.
idstring
The object's id.
deadlinetimestamp
The time after which the brief does not apply.

Returns

The brief.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "purpose": "Book Maya'\''s Lisbon trip, 12 to 16 March",
    "constraints": {
      "max_amount": 1300,
      "budget_amount": 2400,
      "budget_window": "month",
      "currency": "USD",
      "accept_within": {
        "price_up_pct": 5,
        "date_later_minutes": 120
      },
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export GRANT_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: brief-lisbon-flight-1" \
  -H "Content-Type: application/json" \
  -d "{
    \"grant_id\": \"$GRANT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      },
      \"terms\": {
        \"refundable\": true
      }
    }
  }"

Response 201

{
  "id": "brf_01M8DASQS0K81T04RHT9PG73RX",
  "object": "brief",
  "side": "asking",
  "status": "open",
  "grant_id": "grt_01M8DASQRKK1W22960KMWJ59Y9",
  "agent_id": null,
  "run_id": null,
  "purpose": "Book Maya's Lisbon trip, 12 to 16 March",
  "asked_by": {
    "kind": "root_person"
  },
  "wants": {
    "items": [
      {
        "name": "Seat LIS-JFK",
        "sku": "TP209-0905",
        "category": "flight",
        "quantity": 1
      }
    ],
    "max_total": 612,
    "currency": "USD",
    "dates": {
      "start": "2027-03-12T09:05:00Z"
    },
    "terms": {
      "refundable": true
    }
  },
  "remaining": [
    {
      "name": "Seat LIS-JFK",
      "sku": "TP209-0905",
      "category": "flight",
      "quantity": 1
    }
  ],
  "brief_hash": "16098c66a08bf9b4b2396d37df8d103b5fc8cbc5c80e34deb3d762ac5caf4c0e",
  "deadline": null,
  "created_by": {
    "via": "account_key",
    "agent_id": null
  },
  "created_at": "2026-11-27T01:44:26.656Z",
  "updated_at": "2026-11-27T01:44:26.656Z"
}

Close a brief

POST/v1/authorize/briefs/{id}/close

Closes an open brief as fulfilled or abandoned. Holder proof or the account.

Parameters

idstringpathRequired
The brief (brf_…).
statusenumRequired
The state. One of fulfilled, abandoned.
grant_tokenstring
Holder proof: the agent's own grant token (with its signature over the request); leave it out with an account key.

Returns

The brief.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "purpose": "Book Maya'\''s Lisbon trip, 12 to 16 March",
    "constraints": {
      "max_amount": 1300,
      "budget_amount": 2400,
      "budget_window": "month",
      "currency": "USD",
      "accept_within": {
        "price_up_pct": 5,
        "date_later_minutes": 120
      },
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export GRANT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: brief-lisbon-flight-4" \
  -H "Content-Type: application/json" \
  -d "{
    \"grant_id\": \"$GRANT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      },
      \"terms\": {
        \"refundable\": true
      }
    }
  }" > step.json
export BRIEF_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/briefs/$BRIEF_ID/close" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "abandoned" }'

Response 200

{
  "id": "brf_01M8DAEPM60YRAD8ZSQ6JJ8VND",
  "object": "brief",
  "side": "asking",
  "status": "abandoned",
  "grant_id": "grt_01M8DAEPM3VJEK5GEQKKX84APN",
  "agent_id": null,
  "run_id": null,
  "purpose": "Book Maya's Lisbon trip, 12 to 16 March",
  "asked_by": {
    "kind": "root_person"
  },
  "wants": {
    "items": [
      {
        "name": "Seat LIS-JFK",
        "sku": "TP209-0905",
        "category": "flight",
        "quantity": 1
      }
    ],
    "max_total": 612,
    "currency": "USD",
    "dates": {
      "start": "2027-03-12T09:05:00Z"
    },
    "terms": {
      "refundable": true
    }
  },
  "remaining": [
    {
      "name": "Seat LIS-JFK",
      "sku": "TP209-0905",
      "category": "flight",
      "quantity": 1
    }
  ],
  "brief_hash": "8dd0d8b377e95e63355e5104fcfce5e285c4a30adbe87cd19ec7e4209d119cb7",
  "deadline": null,
  "created_by": {
    "via": "account_key",
    "agent_id": null
  },
  "created_at": "2026-11-27T01:38:25.030Z",
  "updated_at": "2026-11-27T01:38:25.032Z"
}

Post a counter-offer

POST/v1/authorize/counter_offers

Posts what an outside agent offered when it couldn't meet a brief: one to five options, signed (offer_jwt) or reported by your agent (offer). Provenance computes each option's differences and decides it at once: within_authority, ask or refused. The same options again return the first counter-offer.

Parameters

brief_idstringRequired
The brief.
grant_tokenstring
Holder proof: the agent's own grant token (with its signature over the request); leave it out with an account key.
run_idstring
The agent-team run, when there is one.
channelenumRequired
Where the offer came from. One of a2a, mcp, ucp, acp, ap2, web, voice, chat, email.
counterpartyobject
The outside agent, by agent_id, kid or origin.
Show child attributes
agent_idstring
The agent's registered id.
kidstring
The key id the outside agent signed with.
originstring
The outside agent's origin.
namestring
The name, as given.
card_urlstring
The outside agent's Agent Card URL.
call_idstring
The registered call the offer came on (voice).
optionsarray of objectsRequired
The options offered (one to five).
Show child attributes
labelstring
A short label for the option.
offer_jwtstring
A signed offer; its signed fields are the offer. An offer+jwt from a registered selling agent, or a compact JWS (EdDSA or ES256) over the offer's fields by a key in the outside agent's key directory at counterparty.origin. A key named inside the offer is never used.
offerobject
What one option offers. For a signed option these are the signed fields; fields sent beside a signed offer are ignored.
Show child attributes
itemsarray of objectsRequired
The lines.
Show child attributes
namestringRequired
The name, as given.
skustring
The seller's item code.
categorystring
The item's category.
quantitynumberRequired
How many.
unitstring
The unit the quantity is in.
unit_pricenumber
The price of one unit, in the offer's currency.
totalnumberRequired
The offer's total, in its currency (major units).
currencystringRequired
ISO 4217 currency code.
datesobject
The dates of what is offered.
Show child attributes
starttimestamp
When it starts.
endtimestamp
When it ends.
termsobject
The offer's terms.
Show child attributes
refundableboolean
Whether it can be refunded.
cancellation_beforetimestamp
The last time it can be cancelled.
change_feenumber
The fee to change it, in the currency.
deliveryobject
When it is delivered.
Show child attributes
bytimestamp
The delivery date.
sellerstring
The seller's id or origin.
expires_attimestampRequired
When the offer ends.
coverageenum
Whether the offer covers the whole brief (full) or part of it (partial). One of full, partial.
linesarray of objects
For a partial offer: how much of each brief line it covers.
Show child attributes
brief_lineinteger
The brief line's index.
quantity_offerednumber
How much of that line is offered.
tax_and_feesnumber
Tax and fees on top of the total, when declared.
external_refstring
The outside agent's own reference for the option.
notestring
The outside agent's own words, plain text.
action_hashstring
an intent bought for this option (counter_offer_id on POST /v1/mandate/intents) must carry this payload hash (sha256 hex of the canonical payload).
revisesstring
The counter-offer this one replaces.
collect_secondsinteger
Hold the first ask this long to gather offers from several agents.

Returns

The counter-offer, decided. See the counter offer object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "purpose": "Book Maya'\''s Lisbon trip, 12 to 16 March",
    "constraints": {
      "max_amount": 1300,
      "budget_amount": 2400,
      "budget_window": "month",
      "currency": "USD",
      "accept_within": {
        "price_up_pct": 5,
        "date_later_minutes": 120
      },
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export GRANT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: brief-lisbon-flight-5" \
  -H "Content-Type: application/json" \
  -d "{
    \"grant_id\": \"$GRANT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      },
      \"terms\": {
        \"refundable\": true
      }
    }
  }" > step.json
export BRIEF_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/counter_offers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"brief_id\": \"$BRIEF_ID\",
    \"channel\": \"a2a\",
    \"counterparty\": {
      \"origin\": \"https://air.example\",
      \"name\": \"The airline's booking agent\"
    },
    \"options\": [
      {
        \"label\": \"12:40\",
        \"offer\": {
          \"items\": [
            {
              \"name\": \"Seat LIS-JFK\",
              \"sku\": \"TP209-1240\",
              \"category\": \"flight\",
              \"quantity\": 1
            }
          ],
          \"total\": 648,
          \"currency\": \"USD\",
          \"dates\": {
            \"start\": \"2027-03-12T12:40:00Z\"
          },
          \"terms\": {
            \"refundable\": true
          },
          \"expires_at\": \"2027-03-01T00:00:00Z\"
        },
        \"note\": \"The 9:05 is full\"
      }
    ]
  }"

Response 201

{
  "id": "cof_01M8F9N80Q5D7W4S53G1744HDE",
  "object": "counter_offer",
  "side": "asking",
  "status": "asking",
  "brief_id": "brf_01M8F9N80B1BY758DGSKQZHH59",
  "grant_id": "grt_01M8F9N801BZ5DYQV0MEDYTW6B",
  "run_id": null,
  "channel": "a2a",
  "counterparty": {
    "origin": "https://air.example",
    "name": "The airline's booking agent",
    "verification": "declared"
  },
  "options": [
    {
      "index": 0,
      "label": "12:40",
      "source": "reported_by_agent",
      "offer": {
        "items": [
          {
            "name": "Seat LIS-JFK",
            "sku": "TP209-1240",
            "category": "flight",
            "quantity": 1
          }
        ],
        "total": 648,
        "currency": "USD",
        "dates": {
          "start": "2027-03-12T12:40:00Z"
        },
        "terms": {
          "refundable": true
        },
        "expires_at": "2027-03-01T00:00:00Z"
      },
      "offer_hash": "99e31a9716993e671300ef8761fac8261bafa8eefe8181edf48daa3d05877c6c",
      "differences": [
        {
          "field": "item",
          "part": "Seat LIS-JFK",
          "from": "Seat LIS-JFK",
          "to": "Seat LIS-JFK",
          "direction": "different",
          "category": "same"
        },
        {
          "field": "price",
          "from": 612,
          "to": 648,
          "delta": 36,
          "delta_pct": 5.9,
          "direction": "worse"
        },
        {
          "field": "dates",
          "from": "2027-03-12T09:05:00Z",
          "to": "2027-03-12T12:40:00Z",
          "delta": 215,
          "direction": "worse"
        }
      ],
      "result": "ask",
      "reason": "item_changed",
      "note": "The 9:05 is full",
      "status": "open"
    }
  ],
  "retry": "wait_for_person",
  "approval_id": "appr_01M8F9N80WH06X7T67MZVGFXRW",
  "ask": {
    "to": "root_person",
    "expires_at": "2026-11-27T20:17:59.735Z",
    "on_timeout": "decline",
    "options": [
      0
    ]
  },
  "decision": null,
  "acceptance": null,
  "revises": null,
  "held": null,
  "call_id": null,
  "stopped_by": null,
  "created_by": {
    "via": "account_key",
    "agent_id": null
  },
  "created_at": "2026-11-27T20:02:59.733Z",
  "updated_at": "2026-11-27T20:02:59.742Z"
}

Accept a counter-offer option

POST/v1/authorize/counter_offers/{id}/accept_option

Accepts one option that is within the agent's authority, checked again now (a grant revoked, lowered or spent since the decision refuses it). One acceptance per counter-offer; the same one again returns it. The acceptance carries the offer hash and amount a purchase must match.

Parameters

idstringpathRequired
The counter-offer (cof_…).
optionintegerRequired
The option's index.
grant_tokenstring
Holder proof: the agent's own grant token (with its signature over the request); leave it out with an account key.

Returns

The accepted counter-offer. See the counter offer object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/authorize/counter_offers/cof_01M8DA0Q5C2K7H9N4T6W1Y3R8B/accept_option" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "option": 0 }'

Response 200

{
  "id": "cof_01M8DA0Q5C2K7H9N4T6W1Y3R8B",
  "object": "counter_offer",
  "side": "asking",
  "status": "accepted",
  "brief_id": "brf_01M8DA0Q4Z8N2K5H7T9W1Y3R6C",
  "grant_id": "grt_01M8DA0Q4X6M1J4G6S8V0X2Q5D",
  "run_id": null,
  "channel": "a2a",
  "counterparty": {
    "agent_id": "agt_01M8DA0Q4V5L0H3F5R7U9W1P4E",
    "name": "TAP booking agent",
    "verification": "registered",
    "key_thumbprint": "f3Kq9xW1bC8m7Zf0vYH3eR5tU9sL6aJ1dG4hN2pQ0cA"
  },
  "options": [
    {
      "index": 0,
      "source": "signed",
      "offer": {
        "items": [
          {
            "name": "Seat LIS-JFK",
            "sku": "TP209-0905",
            "category": "flight",
            "quantity": 1,
            "unit_price": 598
          }
        ],
        "total": 598,
        "currency": "USD",
        "terms": {
          "refundable": true
        },
        "delivery": {
          "by": "2027-03-12T09:05:00.000Z"
        },
        "seller": "agt_01M8DA0Q4V5L0H3F5R7U9W1P4E",
        "expires_at": "2026-11-27T02:30:00.000Z"
      },
      "offer_hash": "9d2c4e1f7a3b5d8c0e6f2a4b6c8d0e1f3a5b7c9d1e3f5a7b9c1d3e5f7a9b1c3d",
      "differences": [
        {
          "field": "price",
          "from": 612,
          "to": 598,
          "delta": -14,
          "delta_pct": -2.3,
          "direction": "better"
        }
      ],
      "result": "within_authority",
      "reason": null,
      "status": "accepted"
    }
  ],
  "retry": null,
  "approval_id": null,
  "acceptance": {
    "option": 0,
    "offer_hash": "9d2c4e1f7a3b5d8c0e6f2a4b6c8d0e1f3a5b7c9d1e3f5a7b9c1d3e5f7a9b1c3d",
    "amount": 598,
    "currency": "USD",
    "expires_at": "2026-11-27T02:30:00.000Z",
    "accepted_by": {
      "kind": "authority",
      "tolerance": "no_worse"
    },
    "accepted_at": "2026-11-27T02:00:00.000Z",
    "consumed_at": null
  },
  "revises": null,
  "call_id": null,
  "stopped_by": null,
  "created_by": {
    "via": "holder",
    "agent_id": "agt_01M8DA0Q4T4K9G2E4Q6T8V0N3F"
  },
  "created_at": "2026-11-27T01:59:00.000Z",
  "updated_at": "2026-11-27T02:00:00.000Z"
}

Withdraw a counter-offer

POST/v1/authorize/counter_offers/{id}/withdraw

The agent stopped looking, or the outside agent withdrew: an open counter-offer closes as withdrawn.

Parameters

idstringpathRequired
The counter-offer (cof_…).
reasonenum
Why. One of agent_stopped, counterparty_withdrew.
grant_tokenstring
Holder proof: the agent's own grant token (with its signature over the request); leave it out with an account key.

Returns

The withdrawn counter-offer. See the counter offer object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "purpose": "Book Maya'\''s Lisbon trip, 12 to 16 March",
    "constraints": {
      "max_amount": 1300,
      "budget_amount": 2400,
      "budget_window": "month",
      "currency": "USD",
      "accept_within": {
        "price_up_pct": 5,
        "date_later_minutes": 120
      },
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export GRANT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: brief-lisbon-flight-8" \
  -H "Content-Type: application/json" \
  -d "{
    \"grant_id\": \"$GRANT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      },
      \"terms\": {
        \"refundable\": true
      }
    }
  }" > step.json
export BRIEF_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/counter_offers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"brief_id\": \"$BRIEF_ID\",
    \"channel\": \"a2a\",
    \"counterparty\": {
      \"origin\": \"https://air.example\"
    },
    \"options\": [
      {
        \"offer\": {
          \"items\": [
            {
              \"name\": \"Seat LIS-JFK\",
              \"sku\": \"TP209-1240\",
              \"category\": \"flight\",
              \"quantity\": 1
            }
          ],
          \"total\": 648,
          \"currency\": \"USD\",
          \"dates\": {
            \"start\": \"2027-03-12T12:40:00Z\"
          },
          \"terms\": {
            \"refundable\": true
          },
          \"expires_at\": \"2027-03-01T00:00:00Z\"
        }
      }
    ]
  }" > step.json
export COUNTER_OFFER_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/counter_offers/$COUNTER_OFFER_ID/withdraw" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "counterparty_withdrew" }'

Response 200

{
  "id": "cof_01M8F9N81WW0Q22RVRZ5NNPSX8",
  "object": "counter_offer",
  "side": "asking",
  "status": "withdrawn",
  "brief_id": "brf_01M8F9N81TBCPDYW352FQPV3MM",
  "grant_id": "grt_01M8F9N81SDT2VDABK2Y1420BJ",
  "run_id": null,
  "channel": "a2a",
  "counterparty": {
    "origin": "https://air.example",
    "verification": "declared"
  },
  "options": [
    {
      "index": 0,
      "source": "reported_by_agent",
      "offer": {
        "items": [
          {
            "name": "Seat LIS-JFK",
            "sku": "TP209-1240",
            "category": "flight",
            "quantity": 1
          }
        ],
        "total": 648,
        "currency": "USD",
        "dates": {
          "start": "2027-03-12T12:40:00Z"
        },
        "terms": {
          "refundable": true
        },
        "expires_at": "2027-03-01T00:00:00Z"
      },
      "offer_hash": "99e31a9716993e671300ef8761fac8261bafa8eefe8181edf48daa3d05877c6c",
      "differences": [
        {
          "field": "item",
          "part": "Seat LIS-JFK",
          "from": "Seat LIS-JFK",
          "to": "Seat LIS-JFK",
          "direction": "different",
          "category": "same"
        },
        {
          "field": "price",
          "from": 612,
          "to": 648,
          "delta": 36,
          "delta_pct": 5.9,
          "direction": "worse"
        },
        {
          "field": "dates",
          "from": "2027-03-12T09:05:00Z",
          "to": "2027-03-12T12:40:00Z",
          "delta": 215,
          "direction": "worse"
        }
      ],
      "result": "ask",
      "reason": "item_changed",
      "status": "open"
    }
  ],
  "retry": "find_another",
  "approval_id": "appr_01M8F9N81W44FQ5KCX1Y3NMG94",
  "ask": {
    "to": "root_person",
    "expires_at": "2026-11-27T20:17:59.772Z",
    "on_timeout": "decline",
    "options": [
      0
    ]
  },
  "decision": null,
  "acceptance": null,
  "revises": null,
  "held": null,
  "call_id": null,
  "stopped_by": null,
  "created_by": {
    "via": "account_key",
    "agent_id": null
  },
  "created_at": "2026-11-27T20:02:59.771Z",
  "updated_at": "2026-11-27T20:02:59.777Z"
}

Decline a counter-offer

POST/v1/authorize/counter_offers/{id}/decline

The requesting side declines an open counter-offer, with an optional reason the other side may see. It only tightens, so it never needs a person; an open ask to the person closes. The decision is written to the exchange record (decision, by: agent).

Parameters

idstringpathRequired
The counter-offer (cof_…).
reasonenum
Why, shared with the other side. One of price, terms, timing, other.
grant_tokenstring
Holder proof: the agent's own grant token (with its signature over the request); leave it out with an account key.

Returns

The declined counter-offer. See the counter offer object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/grants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "purpose": "Book Maya'\''s Lisbon trip, 12 to 16 March",
    "constraints": {
      "max_amount": 1300,
      "budget_amount": 2400,
      "budget_window": "month",
      "currency": "USD",
      "accept_within": {
        "price_up_pct": 5,
        "date_later_minutes": 120
      },
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export GRANT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: brief-lisbon-flight-decline" \
  -H "Content-Type: application/json" \
  -d "{
    \"grant_id\": \"$GRANT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      },
      \"terms\": {
        \"refundable\": true
      }
    }
  }" > step.json
export BRIEF_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/counter_offers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"brief_id\": \"$BRIEF_ID\",
    \"channel\": \"a2a\",
    \"counterparty\": {
      \"origin\": \"https://air.example\"
    },
    \"options\": [
      {
        \"offer\": {
          \"items\": [
            {
              \"name\": \"Seat LIS-JFK\",
              \"sku\": \"TP209-1240\",
              \"category\": \"flight\",
              \"quantity\": 1
            }
          ],
          \"total\": 648,
          \"currency\": \"USD\",
          \"dates\": {
            \"start\": \"2027-03-12T12:40:00Z\"
          },
          \"terms\": {
            \"refundable\": true
          },
          \"expires_at\": \"2027-03-01T00:00:00Z\"
        }
      }
    ]
  }" > step.json
export COUNTER_OFFER_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/counter_offers/$COUNTER_OFFER_ID/decline" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "price" }'

Response 200

{
  "id": "cof_01M8HWP6KHXQWF937FSP3Z1RYM",
  "object": "counter_offer",
  "side": "asking",
  "status": "declined",
  "brief_id": "brf_01M8HWP6KGGEP58RFH1JW5SGCM",
  "grant_id": "grt_01M8HWP6KFGKD5KWMJ1024YP20",
  "run_id": null,
  "channel": "a2a",
  "counterparty": {
    "origin": "https://air.example",
    "verification": "declared"
  },
  "options": [
    {
      "index": 0,
      "source": "reported_by_agent",
      "offer": {
        "items": [
          {
            "name": "Seat LIS-JFK",
            "sku": "TP209-1240",
            "category": "flight",
            "quantity": 1
          }
        ],
        "total": 648,
        "currency": "USD",
        "dates": {
          "start": "2027-03-12T12:40:00Z"
        },
        "terms": {
          "refundable": true
        },
        "expires_at": "2027-03-01T00:00:00Z"
      },
      "offer_hash": "99e31a9716993e671300ef8761fac8261bafa8eefe8181edf48daa3d05877c6c",
      "differences": [
        {
          "field": "item",
          "part": "Seat LIS-JFK",
          "from": "Seat LIS-JFK",
          "to": "Seat LIS-JFK",
          "direction": "different",
          "category": "same"
        },
        {
          "field": "price",
          "from": 612,
          "to": 648,
          "delta": 36,
          "delta_pct": 5.9,
          "direction": "worse"
        },
        {
          "field": "dates",
          "from": "2027-03-12T09:05:00Z",
          "to": "2027-03-12T12:40:00Z",
          "delta": 215,
          "direction": "worse"
        }
      ],
      "result": "ask",
      "reason": "item_changed",
      "status": "open"
    }
  ],
  "retry": null,
  "approval_id": "appr_01M8HWP6KJZQ0VHW717WPVSWFG",
  "ask": {
    "to": "root_person",
    "expires_at": "2026-11-29T20:14:02.865Z",
    "on_timeout": "decline",
    "options": [
      0
    ]
  },
  "decision": {
    "kind": "decline",
    "by": "agent",
    "at": "2026-11-28T20:14:02.868Z",
    "reason": "price"
  },
  "acceptance": null,
  "revises": null,
  "held": null,
  "call_id": null,
  "stopped_by": null,
  "created_by": {
    "via": "account_key",
    "agent_id": null
  },
  "created_at": "2026-11-28T20:14:02.864Z",
  "updated_at": "2026-11-28T20:14:02.869Z"
}

Check which options may be signed

POST/v1/authorize/counter_offers/{id}/sign_check

Offering side: which of your agent's options may be signed now (cleared by your offer rules, a staff member's yes, or the rules' timeout setting), each with the offer_hash to sign. Sign only those, with your agent's own key. The account's key or a console session.

Parameters

idstringpathRequired
The offering-side counter-offer (cof_…).

Returns

Each option, and whether it may be signed.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Kestrel Air booking agent" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/briefs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: offer-sample-signcheck" \
  -H "Content-Type: application/json" \
  -d "{
    \"side\": \"offering\",
    \"agent_id\": \"$AGENT_ID\",
    \"wants\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"max_total\": 612,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      }
    },
    \"standard\": {
      \"items\": [
        {
          \"name\": \"Seat LIS-JFK\",
          \"sku\": \"TP209-0905\",
          \"category\": \"flight\",
          \"quantity\": 1
        }
      ],
      \"total\": 650,
      \"currency\": \"USD\",
      \"dates\": {
        \"start\": \"2027-03-12T09:05:00Z\"
      }
    },
    \"requester\": {
      \"name\": \"Flights\"
    }
  }" > step.json
export BRIEF_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/counter_offers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"brief_id\": \"$BRIEF_ID\",
    \"channel\": \"a2a\",
    \"options\": [
      {
        \"label\": \"9:05 at list\",
        \"offer\": {
          \"items\": [
            {
              \"name\": \"Seat LIS-JFK\",
              \"sku\": \"TP209-0905\",
              \"category\": \"flight\",
              \"quantity\": 1
            }
          ],
          \"total\": 650,
          \"currency\": \"USD\",
          \"dates\": {
            \"start\": \"2027-03-12T09:05:00Z\"
          },
          \"expires_at\": \"2027-03-01T00:00:00Z\"
        }
      }
    ]
  }" > step.json
export COUNTER_OFFER_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/counter_offers/$COUNTER_OFFER_ID/sign_check" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "sign_check",
  "counter_offer_id": "cof_01M8GDJVVXHBYE3T6K6SPHJWR4",
  "status": "open",
  "options": [
    {
      "index": 0,
      "offer_hash": "c67b354508443ca58b8c567da1841332dcb2aad0a4a0657cb6466c9d2365903f",
      "may_sign": true,
      "cleared_by": "rules",
      "result": "within_authority",
      "reason": null
    }
  ]
}

Check an authority proof's status

GET/v1/public/authority_proofs/{jti}/status

Before an outside agent commits: active, used (a purchase used the acceptance), revoked (the counter-offer closed, another option was taken or the grant chain stopped) or expired. Nothing else. A proof is valid only after this answers active; an unknown proof is 404, which reads as revoked. No API key needed; 60 a minute per IP.

No API key needed.

Parameters

jtistringpathRequired
The proof's jti (atp_…).

Returns

The proof's status.

Errors

curl "$PROVENANCE_API/v1/public/authority_proofs/atp_01M8FT65A4N7Q2W9E3R5T8Y1U6/status"

Response 200

{
  "object": "authority_proof_status",
  "jti": "atp_01M8FT65A4N7Q2W9E3R5T8Y1U6",
  "status": "active"
}

Was this page helpful? Send us feedback

LLM? Read llms.txt.