View as Markdown

API reference

API conventions

Every Provenance endpoint follows the same rules for errors, lists, resources, deletes, retries and headers. Learn them once and every route behaves the way you expect.

Errors

Every 4xx and 5xx response has one shape. Branch on error.code, show error.message to a person, and log error.request_id.

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_missing",
    "message": "Missing required parameter 'action_description'.",
    "param": "action_description",
    "doc_url": "https://www.provenanceauth.com/docs/errors#parameter_missing",
    "request_id": "req_01HX…"
  }
}
TypeStatusTypical codes
invalid_request_error400, 404, 409, 413invalid_json, parameter_missing, parameter_invalid, resource_missing, route_not_found
authentication_error401authentication_required, invalid_api_key, session_expired
permission_error403insufficient_scope, insufficient_role, agent_suspended
billing_error402plan_required, usage_limit_reached, spend_limit_exceeded
rate_limit_error429rate_limit_exceeded (with details.limit and details.retry_after)
idempotency_error400idempotency_key_reused
unavailable_error503detector_not_configured, trace_backend_cold, service_unavailable_maintenance
api_errorother 5xxinternal_error, trace_backend_error, screening_provider_error

param names the input as a dotted path, such as provenance.session.agent_id. A missing resource is always resource_missing, whether it never existed, has expired or belongs to another account. Every code is on error codes.

Outcomes are reasons, not errors

A request that succeeds but reports a negative outcome returns 200. An intent verify that denies an action carries valid: false and a reason; a verification of a tampered asset carries risk factors. Every reason is lowercase snake_case and listed on reason codes. Your own policy rules can return their own reason strings.

Resources

Every resource carries object and its own key as id. A reference to another resource keeps the <resource>_id name.

{ "id": "appr_01HX…", "object": "approval", "status": "pending", "jti": "4f1c…", "matched_rule_id": "big-wire" }

Every ID starts with a prefix for its type:

PrefixResource
appr_Approval
dec_Decision
agt_Agent
case_Case
lnk_Approver link
grt_Grant
we_, evt_, dlv_Webhook endpoint, event, delivery
trc_Traced inference
rcpt_Receipt
acct_Account
key_API key
dev_Device
cses_Capture session
att_Attestation
car_Carrier

A token's jti is a UUID. Older IDs without a prefix keep working, except for the six kinds above that were UUIDs: use their prefixed form. An action returns the updated resource plus its outcome.

Every receipt endpoint (decisions, agreements, orders and the receipt embed) returns the same object. claims is the signed payload, decoded; token is the ES256 JWS that carries it; verify_url opens the console's Verify a proof page with the receipt filled in.

{ "object": "receipt", "id": "rcpt_9c1e…", "claims": { "receipt_id": "rcpt_9c1e…", "decision_id": "mas_01HX…" }, "token": "eyJhbGciOiJFUzI1NiIs…", "verify_url": "https://…/developers/verify?receipt=eyJhbGciOiJFUzI1NiIs…" }

Lists

Every list endpoint returns the same envelope:

{ "object": "list", "data": [ { "id": "agt_01HX…", "object": "agent" } ], "has_more": true, "next_cursor": "eyJpZCI6…" }

Pass limit from 1 to 100 (default 20). A value outside that range returns 400 parameter_invalid instead of being clamped. Pass a response's next_cursor back as cursor to get the next page; cursors are opaque.

Deletes

A DELETE returns 200 with { "id": "…", "object": "…", "deleted": true }. A revoke (POST …/revoke) returns the updated resource with its new status.

Idempotent retries

Send Idempotency-Key on a create POST to retry it safely. A V4 UUID works; keys are 1–255 printable characters and are kept for 24 hours per account.

export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5

curl -X POST $PROVENANCE_API/v1/mandate/agents \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Idempotency-Key: 8b1f2c4e-0f7a-4a1d-9d3e-2b6c5a7e9f10" \
  -H "Content-Type: application/json" \
  -d '{ "name": "invoice-bot" }'
{
  "id": "agt_01M5Q9W1T8BH6JYGCNGRTPE8E6",
  "object": "agent",
  "name": "invoice-bot",
  "status": "active"
}
  • The same key with the same request returns the stored response with Idempotent-Replayed: true.
  • The same key with a different request returns 400 idempotency_key_reused.
  • A retry while the first request still runs returns 409 idempotency_key_in_use.
  • Only a 2xx response is stored, so a corrected retry after an error runs again.

The TypeScript and Python SDKs add a key to every POST automatically, so their own retries never create a resource twice.

Headers

HeaderDirectionMeaning
X-Request-Idresponsereq_ + ULID on every response, also in error.request_id
Provenance-Versionrequest and responsethe API version date: send it to choose a version, else your account's pinned version; every response names the version used (versioning)
X-RateLimit-Limit, -Remaining, -Resetresponseyour current rate-limit window
Retry-Afterresponseseconds to wait, on 429 and 503
Idempotency-Keyrequestmakes a create POST safe to retry
Idempotent-Replayedresponsetrue on a stored replay

Product namespaces

Every product route is /v1/{product}/{resource}, with snake_case segments, in the product order Identify, Authorize, Attest, Mandate, Trace and Personal. Account, webhook, embed, sign-in and organization routes stay at the top level. An old path answers 404 with route_moved, and details names the new method and path:

{ "error": { "type": "invalid_request_error", "code": "route_moved", "message": "This endpoint moved to POST /v1/mandate/intents.", "details": { "method": "POST", "path": "/v1/mandate/intents" } } }
BeforeNow
POST /v1/intent/authorizePOST /v1/mandate/intents
POST /v1/intent/verifyPOST /v1/mandate/assessments (agent builders), POST /v1/authorize/verifications (merchants) or the free POST /v1/verify
POST /v1/intent/revoke, GET /v1/intent/status/{jti}POST /v1/mandate/revocations, GET /v1/mandate/intents/{jti}
/v1/mandates/*/v1/mandate/grants/* (and grant_drafts)
/v1/approvals, /v1/approval-links, /v1/approval-routes, /v1/approver-*, /v1/agreements, /v1/runs, /v1/decisions, /v1/policies, /v1/risk-signals, /v1/takeover-eventsthe same resource under /v1/mandate/, snake_case
/v1/agents/v1/mandate/agents (your agents) and /v1/identify/agents (signed agents)
/v1/network/*/v1/mandate/network_grants, /v1/mandate/grant_requests, /v1/mandate/network_orders, and the store's /v1/authorize/network_orders/accept
/v1/checkout-approvals, /v1/deals, /v1/tabs, /v1/disputesthe same resource under /v1/authorize/
/v1/claims/attest, /v1/claims/verify, /v1/claims/*/v1/attest/attestations, /v1/attest/verifications, /v1/attest/claims/*
/v1/cases, /v1/appeals, /v1/media, /v1/analytics, /v1/batches, /v1/capture-*the same resource under /v1/attest/, snake_case
/v1/people/*, /v1/assistant/*/v1/personal/*
/v1/trace/canary-sets and every other hyphenated Trace pathsnake_case: /v1/trace/canary_sets
/v1/webhook-endpoints, /v1/pending-changes/v1/webhook_endpoints, /v1/pending_changes
product settings under /v1/account/*/v1/{product}/settings/*

Intent tokens carry the free claims only. How the person approved (the method, the biometric, the device tier, the agent's registration) comes from POST /v1/authorize/verifications with your key; Provenance keeps it on its side by the token's jti.

ClaimsIn the token
iss, jti, sub, iat, exp, audThe issuer, the token, the subject and the times
action_hash, payload_hash, orderWhat the person approved
confirmed, agent.name, display_summaryWhen a person approved, and what they saw
mandate_id, option_group_id, revisesThe grant, option group or earlier token it belongs to
riskA coarse risk read at mint

Webhook events are named product.resource.event, and existing endpoint subscriptions moved to the new names. The webhooks guide lists every event.

BeforeNow
approval.requestedmandate.approval.created
approval.resolvedOne event per outcome: mandate.approval.approved, mandate.approval.declined, mandate.approval.expired; for checkout approvals, authorize.checkout_approval.approved, .declined, .expired
intent.deniedmandate.assessment.denied

SDKs follow the paths:

BeforeNow
prov.intent.authorize()prov.mandate.intents.create()
prov.intent.verify()prov.mandate.assessments.create()
prov.mandates.grant()prov.mandate.grants.create()
prov.claims.attest()prov.attest.attestations.create()
prov.authorize.verifications.create() (paid) and prov.verify() (free, no key)

Migrating from the beta API

The beta API changed shapes in one release. The SDKs moved to 1.0.0 with these changes; update raw HTTP integrations with the tables below.

Error codes

BetaNow
missing_required_field (422)parameter_missing (400)
invalid_field_value (422)parameter_invalid (400)
(500 on a malformed body)invalid_json (400)
every *_not_found code, such as claim_not_found or approval_not_foundresource_missing (404, with param)
attestation_not_found on an unknown pathroute_not_found (404)
idempotency_conflict (409)idempotency_key_reused (400 idempotency_error)
usage_limit_exceeded, screening_quota_exhaustedusage_limit_reached (402)
invite_rate_exceeded, invite_cooldownrate_limit_exceeded (429)
no_manifest_found, signature_invalid, sensor_hash_mismatch, device_revoked, cert_unknown_ca (200)read the risk factors instead
types invalid_request, not_foundinvalid_request_error
type authorization_errorpermission_error
503 api_errorunavailable_error
session_expired 410, chunk_index_conflict 422401, 409
agent_suspended 422, disclosure_requires_human 401403 permission_error

Reasons and risk factors: every value is lowercase (POLICY_DENIED is now policy_denied, NO_MANIFEST is now no_manifest). Decision-ledger records written before the change keep their original spelling.

Shapes

BetaNow
a resource's own <resource>_id (approval_id on an approval)id, plus object
{ data, pagination: { has_more, next_cursor, prev_cursor, total_count } } and other list shapes{ object: "list", data, has_more, next_cursor }
limit above 100 clamped400 parameter_invalid
delete responses in several shapes{ id, object, deleted: true }
X-Idempotent-ReplayedIdempotent-Replayed
receipts as { receipt: <claims>, token } (decisions, agreements, the receipt embed) or { claims, receipt: <JWS> } (orders){ object: "receipt", id, claims, token, verify_url } everywhere

Paths

BetaNow
/v1/policy, /v1/policy/*/v1/mandate/policies, /v1/mandate/policies/*
/v1/batch/verifications, /v1/batch/{id}POST /v1/attest/batches, /v1/attest/batches/{id}
GET /v1/appeal, POST /v1/appealGET /v1/attest/appeals/context, POST /v1/attest/appeals
/v1/approval-link/{token}/v1/mandate/approval_links/{token}
/v1/verifications/*/v1/attest/claims/* (set case_type on attest)

Signed artifacts (intent tokens, receipts, manifests and sidecar readings) are unchanged, so tokens and receipts you already hold still verify. Only the JSON around a receipt changed.