Mandate · API reference

Runs

An orchestrator agent and its subagents, halted with one call, and the guard that watches them.

Related guide: Halt a run

The run detail object

Attributes

idstring
Unique identifier for the object.
objectenum
The type of object. One of run.
namestring | null
Your name for the run.
statusenum
halted until a person resumes it; an ended run takes no new members. One of active, halted, ended.
root_grant_idstring | null
The person's mandate the run works under (its budget feeds the guard's budget pressure).
created_attimestamp
When it was created.
halted_attimestamp | null
When it was halted.
halt_reasonstring | null
Why it was halted.
halted_bystring | null
Who halted it: user:<id>, api_key:<prefix> or guard:<rule>.
resumed_attimestamp | null
When a person last resumed it.
ended_attimestamp | null
When it ended.
members_countinteger
Sessions in the run.
titlestring | null
The run's heading: its name, else the root grant's purpose; null when it has neither (show the ID). Derived, never stored. On the list and the run page.
outside_proposalsinteger
Outside agents' proposals (counter-offers) on this run, in any status except withdrawn. On the list and the run page.
outside_briefsinteger
Briefs this run sent to an outside agent. On the list and the run page.
latest_outside_proposalobject | null
The proposal a list row stands for: the one waiting on a person, else the accepted one, else the newest. Null when the run has none.
Show child attributes
counter_offer_idstring
The counter-offer.
counterparty_namestring | null
The outside agent's name (its origin when it gave none).
offer_linestring | null
The offer in one short line: the items of the option the row stands for (the accepted one, else the one waiting on a person, else the first), at most 80 characters. As the outside agent named them.
statusenum
The counter-offer's status. One of open, asking, accepted, declined, expired, stopped, not_chosen.
waiting_onstring | null
Who a running run waits on while one of its approvals is open (an escalation or a delegation proposal): the approver's name you sent with the newest open approval that has one (Maya Chen), else a person. Null when nothing is open or the run isn't active.
depthinteger
The deepest member's level below the person's mandate.
membersarray of objects
The team, orchestrator first.
Show child attributes
agent_session_idstring
The member's session.
agentobject | null
The registered agent, or null.
depthinteger
Its level below the person's mandate.
joined_attimestamp
When it joined.
integrationstring | null
The framework integration its client declared when it joined (claude_agent_sdk, openai_agents, …), or null.
mandateobject | null
The mandate it works under: id, parent, status, purpose and constraints, and its spend: spent in the current window (its subagents' purchases included), share (its own budget, or null) and available (what its chain lets it spend now, with other children's reservations held, or null when nothing caps it). A child adds budget (allocation, at_limit, ask_up_to) and reserved (its reserved amount, or null).
escalationsarray of objects
The approvals opened because a member's purchase went over its grant's limit, newest first (at most 50): a cart approval a store opened (surface: checkout, by the member's grant, in any store's account) and a step-up approval opened at verify (surface: verify, by the member's session). Each carries how the person decided.
Show child attributes
surfaceenumRequired
Where the purchase was asked about. One of checkout, verify.
approval_idstringRequired
The cart approval (coap_) or the step-up approval it opened.
agent_session_idstring | nullRequired
The member's session.
grant_idstring | nullRequired
The member's grant.
lockstring | nullRequired
The lock the purchase went past (amount, budget, counterparty, …).
limitnumber | nullRequired
The lock's limit (null for a lock that isn't an amount).
amountnumber | nullRequired
The purchase's amount.
currencystring | nullRequired
The amount's currency.
decisionenumRequired
Where it stands: blocked is a yes the chain couldn't take by then (nothing was spent). One of pending, in_review, approved, declined, blocked, expired, changes_requested.
approver_linkenumRequired
Who decided: same_person when it was the passkey of the person whose grant is at the top of the chain; null while undecided. One of same_person, unlinked.
approver_namestring
The approver's name you sent: approver.name on the check, or the cart approval's own contact.name when the store is your account. Absent when none was sent.
created_attimestampRequired
When it was opened.
decided_attimestamp | nullRequired
When it was decided.
approval_contextobject | any | nullRequired
How the person decided: the object the approval's own read returns. Null while pending and after a server's decision. A cart approval in another account (the store's) leaves out the IP and the billing address.
Show child attributes
objectenum
The type of object. One of approval_context.
idstring
Unique identifier for the object (apc_…).
subjectobject
What the person decided.
Show child attributes
typeenumRequired
The decided object's type: a cart approval, a step-up approval, a grant, an intent token the person approved with the device's passkey when it was minted, a delegation proposal or a captured item. One of checkout_approval, mandate_approval, mandate_grant, intent_token, delegation_proposal, capture_item.
idstringRequired
Its id (an intent token is its jti; a captured item is capr_…:<index>).
decisionenum
The person's own answer; captured for a capture. One of approved, declined, captured.
decided_attimestamp
When the person decided.
methodobject
How the person decided.
Show child attributes
kindenumRequired
A passkey, the Provenance app's device key, the keypad on a confirmation call, a confirmation given outside Provenance, a signed-in console member, or a browser page with no passkey (a decline, a capture page). One of passkey, device_key, voice_keypad, external, console_session, browser_session.
authenticatorenumRequired
With a passkey: where it lives, as the browser reported when it was created; null otherwise or when unknown. One of platform_passkey, cross_device_passkey, security_key.
user_verifiedbooleanRequired
True when the assertion's user-verification flag was set (face, fingerprint or the screen lock).
step_upobject | nullRequired
What confirmed the customer contact for a new passkey under step_up_contact, when it applied.
Show child attributes
methodenum
contact_code: a 6-digit code sent to the customer contact matched. link_contact: the person opened the link from the email or text sent to that same contact, so no code was sent. One of contact_code, link_contact.
channelenum
Where the code went, or which message carried the link. One of sms, email.
verified_attimestamp
When the code matched, or when the passkey approved through that link.
passkeyobject | null
The passkey that decided; null for any other method.
Show child attributes
statusenum
new when it was younger than the store's minimum age or set up during the approval. One of new, existing.
ageobject
Its age at the decision: whole days, and the minutes past them.
Show child attributes
daysinteger
Whole days.
minutesinteger
Minutes past the whole days.
created_during_approvalboolean
Set up on this approval's page.
syncedboolean | null
A synced (backed-up) passkey; null when the authenticator didn't say.
providerstring | null
The provider its AAGUID names (the authenticator's own claim); null when unknown.
provider_attestedenum
Always false: the provider is the authenticator's own claim. One of false.
deviceobject | null
The device the person decided on, as it reported itself (or, with the app's device key, as it enrolled).
Show child attributes
osstring | null
ios, ipados, android, macos, windows, linux or other.
os_versionstring | null
The OS version, for phones (desktop browsers freeze theirs).
browserstring | null
safari, chrome, edge, firefox, samsung or other; null in an app.
sourceenum
Where the device facts came from. One of user_agent, app_attestation.
verifiedboolean
True only when the server verified the device's attestation.
time_zoneobject | null
The device's time zone, as reported (never verified).
Show child attributes
namestring
IANA name (America/Los_Angeles).
utc_offset_minutesinteger
Its offset at the decision.
sourceenum
Who reported it. One of browser, app.
verifiedenum
Always false. One of false.
localestring | null
The language tag (en-US).
networkobject | null
The connection the decision came from: a provider's estimate of its place, and its flags.
Show child attributes
countrystring | null
ISO 3166-1 alpha-2.
regionstring | null
ISO 3166-2 (US-OR).
citystring | null
The city, only while the network city switch is on.
city_statusenum
Whether the city switch is on. One of enabled, not_enabled.
flagsobject
What the published lists and the IP lookup say about the network.
Show child attributes
vpnboolean
A VPN service.
proxyboolean
A proxy.
hosting_providerboolean
A cloud or hosting provider's range.
torboolean
A Tor exit.
private_relayboolean
iCloud Private Relay (a privacy feature, never counted as a VPN).
asninteger | null
The network's AS number, from the IP lookup provider; null without one.
sourceenum
Where the place and flags came from. One of published_lists, ip_intel.
ipstring | null
The address, only while your IP sharing switch is on and the sealed copy is kept; null otherwise.
location_matchenum
A cart approval's only: whether where the person approved from matches the billing address the store sent. The same value the approval.location rule fact reads: matches_billing needs the network region (or city) to agree with nothing contradicting it, a time-zone match alone is never a match; differs when a known comparison differs; unavailable with its reason in unavailable.location_match (no IP lookup, no time zone); no_billing when the store sent no address. The distance and the per-field comparisons stay rule facts and are never returned. Absent on other approvals. One of matches_billing, differs, unavailable, no_billing.
location_match_basisarray of enums
With location_match: the inputs that agreed (matches_billing) or disagreed (differs); empty otherwise. time_zone_network: the device's time zone is in another country than the network.
browser_detailsobject
The 3-D Secure browser fields the approval page or embed reported, with the request's User-Agent and Accept headers; null for a decision outside a browser page (the app, a keypad, a console member) or recorded before they were collected.
Show child attributes
screen_widthinteger | nullRequired
The screen's width in CSS pixels (screen.width).
screen_heightinteger | nullRequired
The screen's height in CSS pixels (screen.height).
color_depthenumRequired
Bits per pixel (screen.colorDepth). One of 1, 4, 8, 15, 16, 24, 30, 32, 48.
languagestring | nullRequired
The browser's language (navigator.language).
java_enabledboolean | nullRequired
Whether Java is enabled (navigator.javaEnabled()).
javascript_enabledboolean | nullRequired
Whether JavaScript ran (true when the page sent the block).
utc_offset_minutesinteger | nullRequired
Local time minus UTC, in minutes.
user_agentstring | nullRequired
The request's User-Agent header (at most 2,048 characters).
accept_headerstring | nullRequired
The request's Accept header (at most 2,048 characters).
sourceenumRequired
Where the fields came from. One of browser.
verifiedenumRequired
Always false: as the browser reported them. One of false.
billingobject
A cart approval's context only: the full billing address you sent, to your own key and console (never on a webhook); null otherwise.
Show child attributes
line1string | nullRequired
The street line.
line2string | nullRequired
The second line.
citystring | nullRequired
The city.
regionstring | nullRequired
ISO 3166-2 (US-OR) where the region table maps it (US, Canada, Australia); else as you sent it.
postal_codestring | nullRequired
The postal code as you sent it.
countrystringRequired
ISO 3166-1 alpha-2.
sourceenumRequired
Always merchant: your store attested it. One of merchant.
personobject
Who decided, as far as Provenance can say without identifying them.
Show child attributes
pseudonymstring | null
A per-store pseudonym for the passkey, on cart approvals.
linkenum
Over a grant's limit: whether the passkey is the grant's own person's. One of same_person, unlinked, not_applicable.
externalobject | null
With method.kind: external: the confirmation given outside Provenance.
Show child attributes
kindenum
The kind of outside confirmation. One of ap2_user_mandate, spc, platform.
issuerstring | null
Who issued it.
evidence_hashstring | null
The hash of the evidence verified.
unavailableobject
Each fact that is null and why (not_collected, no_ip, ip_intel_not_configured, ip_intel_failed, network_relayed, network_vpn, network_hosting, network_tor), keyed by field (device.time_zone, network.country).
delegation_proposalsarray of objects
The structures a member proposed under its grant or the run's root grant, newest first (at most 50), each with how the person decided.
Show child attributes
idstringRequired
The proposal's ID (dgp_).
statusenumRequired
Where it stands. One of pending, approved, declined, expired, stale, superseded.
parent_grant_idstringRequired
The grant it proposes under.
agent_idstring | nullRequired
The agent that proposed it.
proposed_bystringRequired
How it was proposed (holder, account_key or console).
childrenintegerRequired
How many children it proposed.
editedbooleanRequired
Whether the person changed anything.
decided_viaenumRequired
Where the person decided. One of link, console.
approver_namestring
The approver's name you sent with the proposal (approver.name); absent when none.
created_attimestampRequired
When it was proposed.
decided_attimestamp | nullRequired
When it was decided.
approval_contextobject | any | nullRequired
How the person decided (subject delegation_proposal); null while pending and when nobody decided it.
Show child attributes
objectenum
The type of object. One of approval_context.
idstring
Unique identifier for the object (apc_…).
subjectobject
What the person decided.
Show child attributes
typeenumRequired
The decided object's type: a cart approval, a step-up approval, a grant, an intent token the person approved with the device's passkey when it was minted, a delegation proposal or a captured item. One of checkout_approval, mandate_approval, mandate_grant, intent_token, delegation_proposal, capture_item.
idstringRequired
Its id (an intent token is its jti; a captured item is capr_…:<index>).
decisionenum
The person's own answer; captured for a capture. One of approved, declined, captured.
decided_attimestamp
When the person decided.
methodobject
How the person decided.
Show child attributes
kindenumRequired
A passkey, the Provenance app's device key, the keypad on a confirmation call, a confirmation given outside Provenance, a signed-in console member, or a browser page with no passkey (a decline, a capture page). One of passkey, device_key, voice_keypad, external, console_session, browser_session.
authenticatorenumRequired
With a passkey: where it lives, as the browser reported when it was created; null otherwise or when unknown. One of platform_passkey, cross_device_passkey, security_key.
user_verifiedbooleanRequired
True when the assertion's user-verification flag was set (face, fingerprint or the screen lock).
step_upobject | nullRequired
What confirmed the customer contact for a new passkey under step_up_contact, when it applied.
Show child attributes
methodenum
contact_code: a 6-digit code sent to the customer contact matched. link_contact: the person opened the link from the email or text sent to that same contact, so no code was sent. One of contact_code, link_contact.
channelenum
Where the code went, or which message carried the link. One of sms, email.
verified_attimestamp
When the code matched, or when the passkey approved through that link.
passkeyobject | null
The passkey that decided; null for any other method.
Show child attributes
statusenum
new when it was younger than the store's minimum age or set up during the approval. One of new, existing.
ageobject
Its age at the decision: whole days, and the minutes past them.
Show child attributes
daysinteger
Whole days.
minutesinteger
Minutes past the whole days.
created_during_approvalboolean
Set up on this approval's page.
syncedboolean | null
A synced (backed-up) passkey; null when the authenticator didn't say.
providerstring | null
The provider its AAGUID names (the authenticator's own claim); null when unknown.
provider_attestedenum
Always false: the provider is the authenticator's own claim. One of false.
deviceobject | null
The device the person decided on, as it reported itself (or, with the app's device key, as it enrolled).
Show child attributes
osstring | null
ios, ipados, android, macos, windows, linux or other.
os_versionstring | null
The OS version, for phones (desktop browsers freeze theirs).
browserstring | null
safari, chrome, edge, firefox, samsung or other; null in an app.
sourceenum
Where the device facts came from. One of user_agent, app_attestation.
verifiedboolean
True only when the server verified the device's attestation.
time_zoneobject | null
The device's time zone, as reported (never verified).
Show child attributes
namestring
IANA name (America/Los_Angeles).
utc_offset_minutesinteger
Its offset at the decision.
sourceenum
Who reported it. One of browser, app.
verifiedenum
Always false. One of false.
localestring | null
The language tag (en-US).
networkobject | null
The connection the decision came from: a provider's estimate of its place, and its flags.
Show child attributes
countrystring | null
ISO 3166-1 alpha-2.
regionstring | null
ISO 3166-2 (US-OR).
citystring | null
The city, only while the network city switch is on.
city_statusenum
Whether the city switch is on. One of enabled, not_enabled.
flagsobject
What the published lists and the IP lookup say about the network.
Show child attributes
vpnboolean
A VPN service.
proxyboolean
A proxy.
hosting_providerboolean
A cloud or hosting provider's range.
torboolean
A Tor exit.
private_relayboolean
iCloud Private Relay (a privacy feature, never counted as a VPN).
asninteger | null
The network's AS number, from the IP lookup provider; null without one.
sourceenum
Where the place and flags came from. One of published_lists, ip_intel.
ipstring | null
The address, only while your IP sharing switch is on and the sealed copy is kept; null otherwise.
location_matchenum
A cart approval's only: whether where the person approved from matches the billing address the store sent. The same value the approval.location rule fact reads: matches_billing needs the network region (or city) to agree with nothing contradicting it, a time-zone match alone is never a match; differs when a known comparison differs; unavailable with its reason in unavailable.location_match (no IP lookup, no time zone); no_billing when the store sent no address. The distance and the per-field comparisons stay rule facts and are never returned. Absent on other approvals. One of matches_billing, differs, unavailable, no_billing.
location_match_basisarray of enums
With location_match: the inputs that agreed (matches_billing) or disagreed (differs); empty otherwise. time_zone_network: the device's time zone is in another country than the network.
browser_detailsobject
The 3-D Secure browser fields the approval page or embed reported, with the request's User-Agent and Accept headers; null for a decision outside a browser page (the app, a keypad, a console member) or recorded before they were collected.
Show child attributes
screen_widthinteger | nullRequired
The screen's width in CSS pixels (screen.width).
screen_heightinteger | nullRequired
The screen's height in CSS pixels (screen.height).
color_depthenumRequired
Bits per pixel (screen.colorDepth). One of 1, 4, 8, 15, 16, 24, 30, 32, 48.
languagestring | nullRequired
The browser's language (navigator.language).
java_enabledboolean | nullRequired
Whether Java is enabled (navigator.javaEnabled()).
javascript_enabledboolean | nullRequired
Whether JavaScript ran (true when the page sent the block).
utc_offset_minutesinteger | nullRequired
Local time minus UTC, in minutes.
user_agentstring | nullRequired
The request's User-Agent header (at most 2,048 characters).
accept_headerstring | nullRequired
The request's Accept header (at most 2,048 characters).
sourceenumRequired
Where the fields came from. One of browser.
verifiedenumRequired
Always false: as the browser reported them. One of false.
billingobject
A cart approval's context only: the full billing address you sent, to your own key and console (never on a webhook); null otherwise.
Show child attributes
line1string | nullRequired
The street line.
line2string | nullRequired
The second line.
citystring | nullRequired
The city.
regionstring | nullRequired
ISO 3166-2 (US-OR) where the region table maps it (US, Canada, Australia); else as you sent it.
postal_codestring | nullRequired
The postal code as you sent it.
countrystringRequired
ISO 3166-1 alpha-2.
sourceenumRequired
Always merchant: your store attested it. One of merchant.
personobject
Who decided, as far as Provenance can say without identifying them.
Show child attributes
pseudonymstring | null
A per-store pseudonym for the passkey, on cart approvals.
linkenum
Over a grant's limit: whether the passkey is the grant's own person's. One of same_person, unlinked, not_applicable.
externalobject | null
With method.kind: external: the confirmation given outside Provenance.
Show child attributes
kindenum
The kind of outside confirmation. One of ap2_user_mandate, spc, platform.
issuerstring | null
Who issued it.
evidence_hashstring | null
The hash of the evidence verified.
unavailableobject
Each fact that is null and why (not_collected, no_ip, ip_intel_not_configured, ip_intel_failed, network_relayed, network_vpn, network_hosting, network_tor), keyed by field (device.time_zone, network.country).
guardobject
The run guard's counters in the current window, its trips and the shadow copy's would-have-tripped counts.
Show child attributes
window_minutesinteger
The counting window.
countersobject
Counts by rule.
tripsarray of objects
Each trip: rule, mode (flag or halt), count, time.
shadow_tripsobject
The shadow copy's crossings by rule. It never acts.
counters_sharedboolean
Whether every server counts the same windows.
recordobject | null
The run's record: valid, batches, signed, checkpoints, first_break when broken, and the last 50 batches as timeline. Null when this deployment keeps no records.
grants_revokedinteger
On a halt: mandates it revoked.
sessions_lockedinteger
On a halt: sessions it locked.

The run detail object

{
  "id": "run_01M8H7BG244N4TF2A7EDS0PQFD",
  "object": "run",
  "name": "Restock printer paper",
  "title": "Restock printer paper",
  "outside_proposals": 0,
  "outside_briefs": 0,
  "latest_outside_proposal": null,
  "status": "active",
  "root_grant_id": null,
  "created_at": "2026-11-28T14:01:12.004Z",
  "halted_at": null,
  "halt_reason": null,
  "halted_by": null,
  "resumed_at": null,
  "ended_at": null,
  "members_count": 0,
  "waiting_on": null,
  "record": {
    "valid": true,
    "batches": 0,
    "signed": 0,
    "checkpoints": 0,
    "timeline": []
  },
  "members": [],
  "depth": 0,
  "escalations": [],
  "delegation_proposals": [],
  "guard": {
    "window_minutes": 10,
    "counters": {
      "denials": 0,
      "out_of_scope": 0,
      "fan_out": 0,
      "off_task": 0
    },
    "trips": [],
    "shadow_trips": {},
    "counters_shared": true
  }
}

Events

Sent to your webhook endpoints when they subscribe:

  • mandate.run.halted
  • mandate.run.resumed
  • mandate.run.flagged

Start a run

POST/v1/mandate/runs

Starts a run for an orchestrator and its subagents. Sessions join by passing run_id to authorize and to delegate; a child mandate inherits its parent's run. Free.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
namestring
A name for the run.
root_grant_idstring
The person's mandate the team works under.

Returns

The run.

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": "Restock printer paper for the office",
    "constraints": {
      "max_amount": 80,
      "budget_amount": 200,
      "budget_window": "month",
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export MANDATE_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/runs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{ \"name\": \"Restock printer paper\", \"root_grant_id\": \"$MANDATE_ID\" }"

Response 201

{
  "id": "run_01M8H7BG1Y3R5FQTWA024X4BA3",
  "object": "run",
  "name": "Restock printer paper",
  "status": "active",
  "root_grant_id": "grt_01M8H7BG1MRVJ80JPS9JF9R1KW",
  "created_at": "2026-11-28T14:01:11.998Z",
  "halted_at": null,
  "halt_reason": null,
  "halted_by": null,
  "resumed_at": null,
  "ended_at": null,
  "members_count": 0
}

Add spans to a run's record

POST/v1/mandate/runs/{id}/record

Accepts OTLP/HTTP JSON (resourceSpans) or SDK batches (spans), optionally signed by the agent's key, and appends them to the run's hash-chained record. At most 1,000 spans and 1 MB. Pro and up; storage is included.

Parameters

idstringpathRequired
The run's ID.
resourceSpansarray of objects
OTLP/HTTP JSON, as an OpenTelemetry collector's otlphttp exporter sends it.
spansarray of objects
Or spans in the record's form (what RecordExporter sends).
Show child attributes
namestring
The span's name.
kindstring
internal, server, client, producer, consumer or unspecified.
start_timetimestamp
When it started.
end_timetimestamp | null
When it ended.
statusobject
{ code, message? }; code is unset, ok or error.
trace_idstring | null
The trace.
span_idstring | null
The span.
parent_span_idstring | null
The parent span.
attributesobject
At most 64 scalar attributes.
agent_idstring
For a signed batch: the registered agent whose key signed it.
signatureobject
For a signed batch: Ed25519 over the canonical JSON of { run_id, spans }.
Show child attributes
kidstring
The agent signing key's ID.
sigstring
The signature, base64url.

Returns

The batch's place in the chain.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/runs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Restock printer paper" }' > step.json
export RUN_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/runs/$RUN_ID/record" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "resourceSpans": [
      {
        "resource": {
          "attributes": [
            {
              "key": "service.name",
              "value": {
                "stringValue": "paperfinder"
              }
            }
          ]
        },
        "scopeSpans": [
          {
            "scope": {
              "name": "paperfinder.tools",
              "version": "1.0.0"
            },
            "spans": [
              {
                "traceId": "5b8efff798038103d269b633813fc60c",
                "spanId": "eee19b7ec3c1b174",
                "name": "search_prices",
                "kind": 3,
                "startTimeUnixNano": "1798761600000000000",
                "endTimeUnixNano": "1798761601000000000",
                "attributes": [
                  {
                    "key": "tool.name",
                    "value": {
                      "stringValue": "search_prices"
                    }
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }'

Response 201

{
  "object": "run_record_batch",
  "run_id": "run_01M6VQBCRKEHXG9XB2DHP6SBGK",
  "seq": 1,
  "spans": 1,
  "prev_hash": "0000000000000000000000000000000000000000000000000000000000000000",
  "batch_hash": "02b7aea416c7e8e31568906622e403fcc5907210f5b235f22c2af8f6a1f2b019",
  "signed_by": null,
  "created_at": "2026-11-07T19:21:46.517Z"
}

Get a run

GET/v1/mandate/runs/{id}

Returns the run with its team (each member's mandate, purpose and limits), the run guard's counters and trips, and its escalations and delegation proposals, each with how the person decided (approval_context).

Parameters

idstringpathRequired
The run's ID.

Returns

The run. See the run detail object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/runs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Restock printer paper" }' > step.json
export RUN_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/mandate/runs/$RUN_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "run_01M8H7BG244N4TF2A7EDS0PQFD",
  "object": "run",
  "name": "Restock printer paper",
  "title": "Restock printer paper",
  "outside_proposals": 0,
  "outside_briefs": 0,
  "latest_outside_proposal": null,
  "status": "active",
  "root_grant_id": null,
  "created_at": "2026-11-28T14:01:12.004Z",
  "halted_at": null,
  "halt_reason": null,
  "halted_by": null,
  "resumed_at": null,
  "ended_at": null,
  "members_count": 0,
  "waiting_on": null,
  "record": {
    "valid": true,
    "batches": 0,
    "signed": 0,
    "checkpoints": 0,
    "timeline": []
  },
  "members": [],
  "depth": 0,
  "escalations": [],
  "delegation_proposals": [],
  "guard": {
    "window_minutes": 10,
    "counters": {
      "denials": 0,
      "out_of_scope": 0,
      "fan_out": 0,
      "off_task": 0
    },
    "trips": [],
    "shadow_trips": {},
    "counters_shared": true
  }
}

Read a run's record

GET/v1/mandate/runs/{id}/record

Returns the batches with their spans, hashes and signatures. ?format=jsonl exports them one per line for verifyRunRecord in @provenance/core.

Parameters

idstringpathRequired
The run's ID.
formatenumquery
jsonl for the offline export. One of jsonl.

Returns

The batches, oldest first.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/runs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Restock printer paper" }' > step.json
export RUN_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/mandate/runs/$RUN_ID/record" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "spans": [
      {
        "name": "search_prices",
        "kind": "client",
        "start_time": "2027-01-01T00:00:00.000Z",
        "end_time": "2027-01-01T00:00:01.000Z",
        "status": {
          "code": "ok"
        },
        "trace_id": null,
        "span_id": null,
        "parent_span_id": null,
        "attributes": {
          "tool.name": "search_prices"
        }
      }
    ]
  }' > /dev/null
curl "$PROVENANCE_API/v1/mandate/runs/$RUN_ID/record" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "list",
  "data": [
    {
      "object": "run_record_batch",
      "run_id": "run_01M6VQBCRNZMPMR5WNR24V27W8",
      "seq": 1,
      "prev_hash": "0000000000000000000000000000000000000000000000000000000000000000",
      "created_at": "2026-11-07T19:21:46.517Z",
      "source": "agent",
      "signed_by": null,
      "signature": null,
      "spans_hash": "a61c75507ac4e838fabf4b76a9d3c1f7e6ac1c540aee22658c4724105aa065cf",
      "batch_hash": "f29f1a021cc813959017fc7c3ce9894ef99a48f8a2b905b18cc0151909c10423",
      "spans": [
        {
          "name": "search_prices",
          "kind": "client",
          "start_time": "2027-01-01T00:00:00.000Z",
          "end_time": "2027-01-01T00:00:01.000Z",
          "status": {
            "code": "ok"
          },
          "trace_id": null,
          "span_id": null,
          "parent_span_id": null,
          "attributes": {
            "tool.name": "search_prices"
          }
        }
      ]
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Get the run guard

GET/v1/mandate/settings/run_guard

Returns the account's run guard rules, the shadow copy and whether counters are shared across servers.

Parameters

No parameters.

Returns

The run guard.

Errors

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

Response 200

{
  "object": "run_guard",
  "window_minutes": 10,
  "rules": {
    "denials": {
      "mode": "flag",
      "threshold": 5
    },
    "out_of_scope": {
      "mode": "halt",
      "threshold": 3
    },
    "budget_pressure": {
      "mode": "flag",
      "threshold": 80
    },
    "fan_out": {
      "mode": "flag",
      "threshold": 20
    },
    "canary": {
      "mode": "flag",
      "threshold": 1
    },
    "off_task": {
      "mode": "halt",
      "threshold": 2
    }
  },
  "shadow": null,
  "counters_shared": true
}

Set the run guard

PUT/v1/mandate/settings/run_guard

Changes rules, the window or the shadow copy. Needs an admin key or an owner or admin session.

Parameters

window_minutesinteger
The counting window.
rulesobject
Per rule: mode (off, flag, halt) and threshold.
shadowobject | null
{ rules: { <rule>: { threshold } } }, evaluated and never enforced; null removes it.

Returns

The run guard.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X PUT "$PROVENANCE_API/v1/mandate/settings/run_guard" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "rules": { "out_of_scope": { "mode": "halt", "threshold": 3 } } }'

Response 200

{
  "object": "run_guard",
  "window_minutes": 10,
  "rules": {
    "denials": {
      "mode": "flag",
      "threshold": 5
    },
    "out_of_scope": {
      "mode": "halt",
      "threshold": 3
    },
    "budget_pressure": {
      "mode": "flag",
      "threshold": 80
    },
    "fan_out": {
      "mode": "flag",
      "threshold": 20
    },
    "canary": {
      "mode": "flag",
      "threshold": 1
    },
    "off_task": {
      "mode": "halt",
      "threshold": 2
    }
  },
  "shadow": null,
  "counters_shared": true
}

List runs

GET/v1/mandate/runs

Lists your account's runs, newest first. Filter with the status, a search on the name or ID, the created range and whether an outside agent took part; sort by when it started or what it spent; page with cursor. Each run carries its title and its outside agent's counts; if those can't be read the list answers 503 rather than zeros.

Parameters

sortenumquery
The order of the list: created, or spent (what the run's root grant spent this budget window), with - in front for descending. Newest first when omitted. Another order sorts the newest 1,000 runs that match the filters, and a run with no root grant or no budget sorts last. A next_cursor carries its order; pass it back with the same sort. One of created, -created, spent, -spent.
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.
statusarray of enumsquery
Only runs in these statuses. One value, or several separated by commas.
qstringquery
Search text. Matches when the run's ID or name contains it, ignoring case. At most 200 characters.
created_gtetimestampquery
Only runs started at or after this time.
created_ltetimestampquery
Only runs started at or before this time.
outside_agentenumquery
Only runs where an outside agent made a proposal (proposed), took part at all (took_part: a proposal or a brief the run sent it), or neither (none). Combines with the other filters and pages with the same cursor. One of proposed, took_part, none.

Returns

The runs.

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": "Restock printer paper for the office",
    "constraints": {
      "max_amount": 80,
      "budget_amount": 200,
      "budget_window": "month",
      "expires_at": "2027-12-31T23:59:59Z"
    }
  }' > step.json
export MANDATE_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/mandate/runs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{ \"root_grant_id\": \"$MANDATE_ID\" }" > /dev/null
curl "$PROVENANCE_API/v1/mandate/runs" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "list",
  "data": [
    {
      "id": "run_01M8H7BG21Y821YA94W4FSE1A2",
      "object": "run",
      "name": null,
      "title": "Restock printer paper for the office",
      "outside_proposals": 0,
      "outside_briefs": 0,
      "latest_outside_proposal": null,
      "status": "active",
      "root_grant_id": "grt_01M8H7BG201VFBY2NWJK6BHYWH",
      "created_at": "2026-11-28T14:01:12.001Z",
      "halted_at": null,
      "halt_reason": null,
      "halted_by": null,
      "resumed_at": null,
      "ended_at": null,
      "members_count": 0,
      "waiting_on": null
    },
    {
      "id": "run_01M8H7BG1Y3R5FQTWA024X4BA3",
      "object": "run",
      "name": "Restock printer paper",
      "title": "Restock printer paper",
      "outside_proposals": 0,
      "outside_briefs": 0,
      "latest_outside_proposal": null,
      "status": "active",
      "root_grant_id": "grt_01M8H7BG1MRVJ80JPS9JF9R1KW",
      "created_at": "2026-11-28T14:01:11.998Z",
      "halted_at": null,
      "halt_reason": null,
      "halted_by": null,
      "resumed_at": null,
      "ended_at": null,
      "members_count": 0,
      "waiting_on": null
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Pause a run

POST/v1/mandate/runs/{id}/pause

Halts the run: one run revocation, every mandate in it (and below) revoked, every member session locked. Every member's next verify is run_halted. Only a person resumes it. Free.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired
The run's ID.
reasonstringRequired
Why you're halting it (on the ledger and the mandate.run.halted event).

Returns

The halted run, with how many mandates and sessions the halt stopped. See the run detail object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/runs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Restock printer paper" }' > step.json
export RUN_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/runs/$RUN_ID/pause" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "The paper subagent kept trying a store it wasn'\''t allowed to use"
  }'

Response 200

{
  "id": "run_01M6VQBCRFSNZJ52YP1ZVEDMVE",
  "object": "run",
  "name": "Restock printer paper",
  "status": "halted",
  "root_grant_id": null,
  "created_at": "2026-11-07T19:21:46.511Z",
  "halted_at": "2026-11-07T19:21:46.512Z",
  "halt_reason": "The paper subagent kept trying a store it wasn't allowed to use",
  "halted_by": "api_key:prv_test",
  "resumed_at": null,
  "ended_at": null,
  "members_count": 0,
  "waiting_on": null,
  "record": {
    "valid": true,
    "batches": 1,
    "signed": 0,
    "checkpoints": 1,
    "timeline": [
      {
        "seq": 1,
        "source": "server",
        "signed_by": null,
        "created_at": "2026-11-07T19:21:46.512Z",
        "spans": 1,
        "name": "provenance.run.halted"
      }
    ]
  },
  "members": [],
  "depth": 0,
  "escalations": [],
  "delegation_proposals": [],
  "guard": {
    "window_minutes": 10,
    "counters": {
      "denials": 0,
      "out_of_scope": 0,
      "fan_out": 0,
      "off_task": 0
    },
    "trips": [],
    "shadow_trips": {},
    "counters_shared": true
  },
  "grants_revoked": 0,
  "sessions_locked": 0
}

Resume a halted run

POST/v1/mandate/runs/{id}/resume

Unlocks the run's sessions. Revoked mandates stay revoked. An owner or admin in the console only, never an API key; ledgered.

Parameters

idstringpathRequired
The run's ID.

Returns

The run, active again. See the run detail object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/mandate/runs/run_01M69T2GJ4N8V5X7Y3Z6A1B2C3/resume" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "run_01M69T2GJ4N8V5X7Y3Z6A1B2C3",
  "object": "run",
  "name": "Restock printer paper",
  "status": "active",
  "root_grant_id": null,
  "created_at": "2026-10-31T20:00:00.000Z",
  "halted_at": "2026-10-31T20:05:00.000Z",
  "halt_reason": "The paper subagent kept trying a store it wasn't allowed to use",
  "halted_by": "user:usr_01M69T2GJ4N8V5X7Y3Z6A1B2C4",
  "resumed_at": "2026-10-31T20:20:00.000Z",
  "ended_at": null,
  "members_count": 0,
  "waiting_on": null,
  "members": [],
  "depth": 0,
  "escalations": [],
  "delegation_proposals": [],
  "guard": {
    "window_minutes": 10,
    "counters": {
      "denials": 0,
      "out_of_scope": 0,
      "fan_out": 0,
      "off_task": 0
    },
    "trips": [],
    "shadow_trips": {},
    "counters_shared": true
  }
}

End a run

POST/v1/mandate/runs/{id}/end

Ends the run so it takes no new members. Its mandates keep working until they expire or are revoked.

Parameters

idstringpathRequired
The run's ID.

Returns

The ended run. See the run detail object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/runs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Restock printer paper" }' > step.json
export RUN_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/runs/$RUN_ID/end" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "run_01M6VQBCRJEWSZEX3F4679FQ89",
  "object": "run",
  "name": "Restock printer paper",
  "status": "ended",
  "root_grant_id": null,
  "created_at": "2026-11-07T19:21:46.514Z",
  "halted_at": null,
  "halt_reason": null,
  "halted_by": null,
  "resumed_at": null,
  "ended_at": "2026-11-07T19:21:46.514Z",
  "members_count": 0,
  "waiting_on": null,
  "record": {
    "valid": true,
    "batches": 0,
    "signed": 0,
    "checkpoints": 0,
    "timeline": []
  },
  "members": [],
  "depth": 0,
  "escalations": [],
  "delegation_proposals": [],
  "guard": {
    "window_minutes": 10,
    "counters": {
      "denials": 0,
      "out_of_scope": 0,
      "fan_out": 0,
      "off_task": 0
    },
    "trips": [],
    "shadow_trips": {},
    "counters_shared": true
  }
}

Verify a run's record

GET/v1/mandate/runs/{id}/record/verify

Recomputes the record's chain, each signed batch's signature against the agent's registered key, and the checkpoints in the decision ledger. Free.

Parameters

idstringpathRequired
The run's ID.

Returns

The verification.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/runs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Restock printer paper" }' > step.json
export RUN_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/mandate/runs/$RUN_ID/record" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "spans": [
      {
        "name": "search_prices",
        "kind": "client",
        "start_time": "2027-01-01T00:00:00.000Z",
        "end_time": "2027-01-01T00:00:01.000Z",
        "status": {
          "code": "ok"
        },
        "trace_id": null,
        "span_id": null,
        "parent_span_id": null,
        "attributes": {
          "tool.name": "search_prices"
        }
      }
    ]
  }' > /dev/null
curl "$PROVENANCE_API/v1/mandate/runs/$RUN_ID/record/verify" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "run_record_verification",
  "run_id": "run_01M6VQBCRPNXMD1RNFS7NW64AB",
  "valid": true,
  "batches": 1,
  "signed": 0,
  "checkpoints": 0
}

Was this page helpful? Send us feedback

LLM? Read llms.txt.