Platform · API reference

Embeds

Publishable keys, embed tokens and the endpoints behind the widgets.

Related guide: Set up

The publishable key object

Attributes

idstringRequired
Unique identifier for the object.
objectenumRequired
The type of object. One of publishable_key.
publishable_keystring
The publishable key, for your web pages.
key_prefixstring
The key's first characters, for recognizing it.
namestring
A name you choose.
environmentstring
sandbox or live.
allowed_originsarray of strings | null
The sites the key may run on; null means any site.
created_attimestamp
When it was created.
revoked_attimestamp | null
When it was revoked, or null.
deletedboolean
Always true for a deleted object.

The publishable key object

{
  "id": "01M6VQBCVW0TERKDZEA5GBQ84E",
  "object": "publishable_key",
  "key_prefix": "prv_pub_3eNk21Ir",
  "name": "customer-portal",
  "environment": "sandbox",
  "allowed_origins": null,
  "created_at": "2026-11-07T19:21:46.620Z",
  "revoked_at": null,
  "publishable_key": "prv_pub_3eNk21IraxgfYA70pJsvx1Ua0fVyZoQS"
}

Create a publishable key

POST/v1/embed/publishable_keys

Creates a publishable key for your web pages. It identifies your account to the embed endpoints and reads no data, so it's safe in a browser.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
namestring
A name you choose.
allowed_originsarray of strings | null
The sites the key may run on (see updatePublishableKey). Omit for any site.

Returns

The publishable key. It's shown only once. See the publishable key object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/embed/publishable_keys" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "customer-portal" }'

Response 201

{
  "id": "01M6VQBCVW0TERKDZEA5GBQ84E",
  "object": "publishable_key",
  "key_prefix": "prv_pub_3eNk21Ir",
  "name": "customer-portal",
  "environment": "sandbox",
  "allowed_origins": null,
  "created_at": "2026-11-07T19:21:46.620Z",
  "revoked_at": null,
  "publishable_key": "prv_pub_3eNk21IraxgfYA70pJsvx1Ua0fVyZoQS"
}

Create an embed token

POST/v1/embed/tokens

Mints a short-lived token that lets one widget render one object, for up to 15 minutes. Call it from your backend with a secret key. A key mints only its own products' widgets (see widget); without the scope it gets 403 insufficient_scope, which names it.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
widgetenumRequired
The widget, such as approve or receipt. capture, capture_result, capture_request, capture_list and appeal need a key with the attest scope; checkout_result, checkout_list and chargeback_protection need authorize; run_result, run_list and the proposals widget ('counter_offers') need mandate; traffic_list and traffic_result need identify; rules needs the scope of its kind's product (authorize for checkout, mandate for intent and mandate_limits, attest for capture); embed and text_consent take any account key; the rest need authorize or mandate.
object_idstring
The single object this token may touch: a draft (mdr_…) or, with mode checkin, a mandate for mandate; a claim for appeal (minted with a verify key); your account's box_id (GET /v1/account/text_consent) for text_consent, the consent box; a capture request (capr_…) of your account for capture_result (another kind of id is 400 embed_object_kind_mismatch); a checkout assessment (cas_…) or a cart approval (coap_…) of your account for checkout_result; an agent run (run_…) of your account for run_result and for 'counter_offers'; a traffic assessment (tas_…, a hosted check) of your account for traffic_result; your case reference (1 to 200 characters, the requests' case_id) for capture_request, the request composer; the kind of rules, checkout, intent, capture or mandate_limits, for rules. Required for every widget except agent_access, approvals, capture_list, checkout_list, run_list and traffic_list (a list takes none: it is scoped to your account and its filters) and chargeback_protection (scoped to your account).
subjectobject
agent_access and approvals only: the one person the token shows. The response's object_id is then a pairwise value, never the device or approver.
Show child attributes
device_idstring
agent_access: the person's device.
approver_link_idstring
approvals: one of your accepted approver links; the token lists that approver's requests from your company.
ttlinteger
Seconds (≤ 900).
modestring
The widget's mode, such as consent, or checkin for a mandate check-in. A result widget's mode is view; the request composer's is send; rules takes view (the default), edit or publish; a console session minting edit or publish needs Manage policies and a recent step-up, as a direct policy write does (403 manage_policies_required, recent_two_factor_required).
publishable_key_idstring
Optional binding to one publishable key: the token then works only with that key (another key of the account gets 401 embed_token_invalid).
showarray of enums
capture_result only: also show the request's case_id or metadata in the embed. capture_list takes case_id only, shown on each row. Nothing else is ever shown.
authorobject
capture_request only, required: who is using the composer, as you report it. Recorded on each request the session sends (author); Provenance doesn't check it.
Show child attributes
idstringRequired
Your reference for the staff member (1 to 200 characters).
display_namestringRequired
Their display name (1 to 120 characters).
requestobject
capture_request only, required: the options every send of the session stays within. A send outside them is 400 embed_request_out_of_scope.
Show child attributes
kindsarray of enumsRequired
What the session may send: an ID session, a claim session, or your own items.
accepted_documentsarray of enums
capture.id: the document kinds accepted (one: the person isn't asked to choose).
photosobject
capture.claim: { min, max, until_done } photos.
videosobject
capture.claim: { min, max, max_duration_s } videos.
itemsarray of objects
capture.items (required with it): the items, as on a create.
require_tierobject
{ default: any | hardware, editable }: the hardware requirement, and whether staff may change it (not by default).
expires_inobject
{ default, max } in seconds: the expiry and the longest staff may pick.
remindersenum
account (default): the account's schedule, which staff may turn off. One of account, off.
contactobject
A phone or email to send to. It stays on the server; the element shows it masked.
contact_editableboolean
Whether staff may replace a prefilled contact (not by default).
entryenum
Who types the contact: staff (default) or person (a kiosk or counter, where the person ticks their own consent box). One of staff, person.
qrboolean
Whether **Show a QR** is offered (default true).
max_sendsinteger
Requests the session may send (default 3).
reference_addressesarray of objects
Up to five addresses every send carries, as reference_addresses on a capture request create (one of each kind, other up to two; an address or a location, never both), so capture rules can compare each shot's place with them: a bank's application address as a person reference, for example. The element shows each by its label (or kind), never the address.
Show child attributes
kindenumRequired
What the address is. One of loss, person, business, shipping, other.
labelstring | null
Your label for it; the element shows it.
addressobject
A postal address.
Show child attributes
line1stringRequired
The street line.
line2string | null
A second line.
citystringRequired
The city.
regionstring | null
The ISO 3166-2 subdivision code (OH or US-OH).
postal_codestring | null
The postal code.
countrystringRequired
ISO 3166-1 alpha-2.
locationobject
Coordinates (no geocoder needed).
Show child attributes
latnumberRequired
Latitude.
lngnumberRequired
Longitude.
rulesobject
rules only, required: everything a rules session may show and touch, passed on every mint (nothing is saved between sessions). Strict: an unknown key is 400 parameter_invalid, so a typo never widens a session. At most 16 KB. The response echoes it as stored, every default written out.
Show child attributes
showarray of objectsRequired
The rules the session sees, by id. They show in the policy's own order; rules not listed stay hidden.
Show child attributes
rule_idstringRequired
A rule of the kind's live policy (else 400 rules_embed_rule_missing). For mandate_limits, a row: cap, budget, allowed_mcc, named_merchants, blocked_mcc, blocked_merchants, refuse_over_cap, refuse_over_share or ask_over_cap.
templatestring
A template id of the kind the row reads as.
fieldsarray of objects
The values that are blanks, each a path into the rule (when.0.value) with its bounds.
Show child attributes
pathstringRequired
A condition's value: when.N.value, when.items.N.value or when.items.N.conditions.M.value. For mandate_limits: amount on cap, allocation (shared, reserved) and at_limit (stop, ask, continue) on budget, value on a margin row (with advanced, its unit, a percentage or a fixed amount, is offered beside it; the bounds bound a percentage).
minnumber
A number blank's lowest value.
maxnumber
A number blank's highest value.
valuesarray of strings
The words a word blank may take (the field's own values).
can_turn_offboolean
Whether the session may turn the rule off (not by default).
lockedboolean
Shown read-only: no blanks, no turning off.
add_from_templatesarray of strings
Template ids of the kind the session may add (none by default).
advancedboolean
Whether an edit or publish session may open the Advanced view (not by default): whole rules from the kind's catalog (GET /v1/embed/rules/catalog), a shown rule replaced or a new one added. On mandate_limits, a margin row's unit: a fixed amount instead of a percentage. On every plan.
visibilityenum
Which rules the session shows besides those in show: every rule of the policy (all, the default with manage; with full control each can be changed like a listed rule, without it they're read-only) or only the rules the session itself added (session, the default without manage). Not on mandate_limits. One of all, session.
manageboolean
Full control (not by default): in an edit or publish session, every shown rule that isn't locked can be moved (order), turned off, deleted (remove), duplicated (copy_of) and have every value edited; with advanced, its conditions and outcome too, the default rows included. A listed rule missing from the policy is left out of the session rather than refused. Not on mandate_limits.
advanced_fieldsarray of strings
With advanced: the catalog fields the Advanced view's field picker offers, by key (order.amount, agent.bot_likelihood_score; the keys of GET /v1/embed/rules/catalog), each listed once. A new condition in the session reads one of them; a rule it edits keeps the fields it already reads (anything else is 400 rules_embed_out_of_scope). Absent: every field of the kind's catalog. Not on mandate_limits.
savesenum
draft (the default): a save waits to be published. publish needs mode publish. One of draft, publish.
draft_groupstring | null
Sandbox only (400 in live): an opaque label up to 64 characters that keeps one group's drafts from another's.
filtersobject
The list widgets only: filters pinned for the session, which the browser can't change (another value is 400 embed_filter_pinned). capture_list: any of status, item_type, source, destination, case_id, created_gte and created_lte, with the values the capture request list takes. checkout_list: any of outcome (which also takes in_review), approval_status, order_id, created_gte and created_lte, with the values the checkout assessment list takes. run_list: any of status (one value, or several separated by commas), q, created_gte and created_lte, with the values the run list takes. traffic_list: any of outcome, class and bot_likelihood (each one value, or several separated by commas), signed, created_gte and created_lte, with the values the traffic assessment list takes.
Show child attributes
statusstring
capture_list: the request's status (pending, in_progress, completed, expired, cancelled). run_list: the run's status (active, halted, ended), one or several separated by commas.
item_typeenum
An item type the request asks for. One of photo, selfie, id_document, video.
sourceenum
How an item was taken. One of browser, native_sdk.
destinationenum
Where the link opened. One of company_app, provenance_app, app_clip, web.
case_idstring
Your case reference, for example one case's requests.
created_gtetimestamp
Created at or after this time.
created_ltetimestamp
Created at or before this time.
outcomestring
checkout_list: the outcome (allow, challenge, reject; frictionless is still accepted), or in_review (an approval waiting for your review). traffic_list: the decision (allow, block, log_only, rate_limit, challenge, require_intent), one or several separated by commas.
approval_statusenum
checkout_list: the cart approval's status. One of pending, in_review, approved, denied, expired.
order_idstring
checkout_list: orders whose reference contains this text.
qstring
run_list: runs whose name or ID contains this text.
classstring
traffic_list: Identify's class (signed_agent, declared_bot, suspected_bot, likely_human, unknown), one or several separated by commas.
signedenum
traffic_list: the agent signature verified, or didn't. One of true, false.
bot_likelihoodstring
traffic_list: the bot likelihood band (low, medium, high, unclassified), one or several separated by commas.

Returns

The embed token, what it allows and when it expires.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/embed/tokens" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "widget": "embed", "object_id": "portal-check", "ttl": 600 }'

Response 201

{
  "id": "01M7PR98M85EQ5R7KN5G0NMQQA",
  "object": "embed_token",
  "embed_token": "emb_t8_BVFyYgWWvSKe643GUUTBtBPeuOJH7JTCez2_QsCk",
  "widget": "embed",
  "object_id": "portal-check",
  "mode": null,
  "expires_at": "2026-11-18T07:27:34.984Z"
}

Create a hosted page link

POST/v1/embed/links

Mints a link to a Provenance-hosted page, laid out for phones, that shows one result view, the request composer or your rules (rules, the hosted rules page). Same body and checks as POST /v1/embed/tokens; call it from your backend. The link opens once within ttl, and the page then works for session_ttl. Pro and up; the rules page is open on any plan in sandbox.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
widgetenumRequired
The page's element. capture_result and capture_request need a key with the attest scope; checkout_result needs authorize; run_result needs mandate; traffic_result needs identify; rules needs the scope of its kind's product (authorize for checkout, mandate for intent, attest for capture). Another widget is 400 parameter_invalid. One of capture_result, capture_request, checkout_result, run_result, rules, traffic_result.
object_idstringRequired
As for the token: a capture request (capr_…) for capture_result, a checkout assessment (cas_…) or cart approval (coap_…) for checkout_result, an agent run (run_…) for run_result, a traffic assessment (tas_…) for traffic_result, your case reference for capture_request, the kind of rules (checkout, intent, capture or mandate_limits) for rules.
modestring
view for a result view, send for the composer (the defaults); rules takes view (the default), edit or publish (with rules.saves: publish).
rulesobject
rules only, required: everything a rules session may show and touch, passed on every mint (nothing is saved between sessions). Strict: an unknown key is 400 parameter_invalid, so a typo never widens a session. At most 16 KB. The response echoes it as stored, every default written out.
Show child attributes
showarray of objectsRequired
The rules the session sees, by id. They show in the policy's own order; rules not listed stay hidden.
Show child attributes
rule_idstringRequired
A rule of the kind's live policy (else 400 rules_embed_rule_missing). For mandate_limits, a row: cap, budget, allowed_mcc, named_merchants, blocked_mcc, blocked_merchants, refuse_over_cap, refuse_over_share or ask_over_cap.
templatestring
A template id of the kind the row reads as.
fieldsarray of objects
The values that are blanks, each a path into the rule (when.0.value) with its bounds.
Show child attributes
pathstringRequired
A condition's value: when.N.value, when.items.N.value or when.items.N.conditions.M.value. For mandate_limits: amount on cap, allocation (shared, reserved) and at_limit (stop, ask, continue) on budget, value on a margin row (with advanced, its unit, a percentage or a fixed amount, is offered beside it; the bounds bound a percentage).
minnumber
A number blank's lowest value.
maxnumber
A number blank's highest value.
valuesarray of strings
The words a word blank may take (the field's own values).
can_turn_offboolean
Whether the session may turn the rule off (not by default).
lockedboolean
Shown read-only: no blanks, no turning off.
add_from_templatesarray of strings
Template ids of the kind the session may add (none by default).
advancedboolean
Whether an edit or publish session may open the Advanced view (not by default): whole rules from the kind's catalog (GET /v1/embed/rules/catalog), a shown rule replaced or a new one added. On mandate_limits, a margin row's unit: a fixed amount instead of a percentage. On every plan.
visibilityenum
Which rules the session shows besides those in show: every rule of the policy (all, the default with manage; with full control each can be changed like a listed rule, without it they're read-only) or only the rules the session itself added (session, the default without manage). Not on mandate_limits. One of all, session.
manageboolean
Full control (not by default): in an edit or publish session, every shown rule that isn't locked can be moved (order), turned off, deleted (remove), duplicated (copy_of) and have every value edited; with advanced, its conditions and outcome too, the default rows included. A listed rule missing from the policy is left out of the session rather than refused. Not on mandate_limits.
advanced_fieldsarray of strings
With advanced: the catalog fields the Advanced view's field picker offers, by key (order.amount, agent.bot_likelihood_score; the keys of GET /v1/embed/rules/catalog), each listed once. A new condition in the session reads one of them; a rule it edits keeps the fields it already reads (anything else is 400 rules_embed_out_of_scope). Absent: every field of the kind's catalog. Not on mandate_limits.
savesenum
draft (the default): a save waits to be published. publish needs mode publish. One of draft, publish.
draft_groupstring | null
Sandbox only (400 in live): an opaque label up to 64 characters that keeps one group's drafts from another's.
showarray of enums
capture_result only: also show the request's case_id or metadata.
authorobject
capture_request only, required: who will use the page, as you report it.
Show child attributes
idstringRequired
Your reference for the staff member.
display_namestringRequired
Their display name.
requestobject
capture_request only, required: the send options, as on POST /v1/embed/tokens. max_sends counts every send of the page session.
ttlinteger
Seconds the link may be opened in (≤ 900, default 900).
session_ttlinteger
Seconds the opened page works for (60 to 3600, default 3600).

Returns

The link: open it on a phone, send it by email or text, or open it in an in-app browser.

Errors

export PROVENANCE_KEY=prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x
curl -s -X POST "$PROVENANCE_API/v1/attest/capture_requests" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "case_id": "LMB-20418", "delivery": "self", "session_type": "id" }' > step.json
export CAPTURE_REQUEST_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/embed/links" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"widget\": \"capture_result\",
    \"object_id\": \"$CAPTURE_REQUEST_ID\",
    \"show\": [
      \"case_id\"
    ]
  }"

Response 201

{
  "id": "01M7KCG7JZ4PJHKB38QFV7FR74",
  "object": "embed_link",
  "url": "http://localhost:5173/r?t=embl_BteyFysm89vLOrxixijtnuDO9ZMKLtfBKxSFSE5rqMM",
  "widget": "capture_result",
  "object_id": "capr_01M7KCG7JX0KTQ9NR3NXB5AZDM",
  "mode": "view",
  "show": [
    "case_id"
  ],
  "expires_at": "2026-11-17T00:08:57.087Z",
  "session_ttl": 3600
}

Update a publishable key

PATCH/v1/embed/publishable_keys/{id}

Renames a publishable key or sets the sites it may run on. With allowed_origins, embed requests from any other site get 403 embed_origin_not_allowed, and only those sites can frame the passkey page. null allows any site again.

Parameters

idstringpathRequired
The object's ID.
namestring
A name you choose.
allowed_originsarray of strings | null
Up to 10 origins (https://host[:port], no path). Sandbox keys may also list http://localhost:<port> or http://localhost:*. null allows any site.

Returns

The updated publishable key. See the publishable key object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/embed/publishable_keys" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "customer-portal" }' > step.json
export PUBLISHABLE_KEY_ID=$(jq -r '.id' step.json)
curl -X PATCH "$PROVENANCE_API/v1/embed/publishable_keys/$PUBLISHABLE_KEY_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "allowed_origins": ["https://portal.example.com"] }'

Response 200

{
  "id": "01M6VQBCW1C07AFKTHV5NKQT10",
  "object": "publishable_key",
  "key_prefix": "prv_pub_LdlTvft9",
  "name": "customer-portal",
  "environment": "sandbox",
  "allowed_origins": [
    "https://portal.example.com"
  ],
  "created_at": "2026-11-07T19:21:46.625Z",
  "revoked_at": null
}

List publishable keys

GET/v1/embed/publishable_keys

Lists your account's publishable keys.

Parameters

No parameters.

Returns

The publishable keys.

Errors

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

Response 200

{
  "object": "list",
  "data": [],
  "has_more": false,
  "next_cursor": null
}

Revoke a publishable key

DELETE/v1/embed/publishable_keys/{id}

Revokes a publishable key. Widgets using it stop rendering.

Parameters

idstringpathRequired
The object's ID.

Returns

The object, now revoked. See the publishable key object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/embed/publishable_keys" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "customer-portal" }' > step.json
export PUBLISHABLE_KEY_ID=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/embed/publishable_keys/$PUBLISHABLE_KEY_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "01M6VQBCVXG52HSP65RKNY0M02",
  "object": "publishable_key",
  "deleted": true
}

Was this page helpful? Send us feedback

LLM? Read llms.txt.