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.
environmentstringsandboxorlive.allowed_originsarray of strings | null- The sites the key may run on;
nullmeans 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" }'const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/publishable_keys`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "name": "customer-portal" }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/embed/publishable_keys", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"name": "customer-portal"
}).json()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
approveorreceipt.capture,capture_result,capture_request,capture_listandappealneed a key with theattestscope;checkout_result,checkout_listandchargeback_protectionneedauthorize;run_result,run_listand the proposals widget ('counter_offers') needmandate;traffic_listandtraffic_resultneedidentify;rulesneeds the scope of its kind's product (authorizeforcheckout,mandateforintentandmandate_limits,attestforcapture);embedandtext_consenttake any account key; the rest needauthorizeormandate. object_idstring- The single object this token may touch: a draft (
mdr_…) or, with modecheckin, a mandate formandate; a claim forappeal(minted with averifykey); your account'sbox_id(GET /v1/account/text_consent) fortext_consent, the consent box; a capture request (capr_…) of your account forcapture_result(another kind of id is400 embed_object_kind_mismatch); a checkout assessment (cas_…) or a cart approval (coap_…) of your account forcheckout_result; an agent run (run_…) of your account forrun_resultand for'counter_offers'; a traffic assessment (tas_…, a hosted check) of your account fortraffic_result; your case reference (1 to 200 characters, the requests'case_id) forcapture_request, the request composer; the kind of rules,checkout,intent,captureormandate_limits, forrules. Required for every widget exceptagent_access,approvals,capture_list,checkout_list,run_listandtraffic_list(a list takes none: it is scoped to your account and itsfilters) andchargeback_protection(scoped to your account). subjectobjectagent_accessandapprovalsonly: the one person the token shows. The response'sobject_idis then a pairwise value, never the device or approver.Show child attributes
device_idstringagent_access: the person's device.approver_link_idstringapprovals: 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, orcheckinfor a mandate check-in. A result widget's mode isview; the request composer's issend;rulestakesview(the default),editorpublish; a console session mintingeditorpublishneeds 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 enumscapture_resultonly: also show the request'scase_idormetadatain the embed.capture_listtakescase_idonly, shown on each row. Nothing else is ever shown.authorobjectcapture_requestonly, 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).
requestobjectcapture_requestonly, required: the options every send of the session stays within. A send outside them is400 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 enumscapture.id: the document kinds accepted (one: the person isn't asked to choose).photosobjectcapture.claim:{ min, max, until_done }photos.videosobjectcapture.claim:{ min, max, max_duration_s }videos.itemsarray of objectscapture.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.remindersenumaccount(default): the account's schedule, which staff may turn off. One ofaccount,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) orperson(a kiosk or counter, where the person ticks their own consent box). One ofstaff,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_addresseson a capture request create (one of each kind,otherup to two; anaddressor alocation, never both), so capture rules can compare each shot's place with them: a bank's application address as apersonreference, 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 (
OHorUS-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.
rulesobjectrulesonly, required: everything a rules session may show and touch, passed on every mint (nothing is saved between sessions). Strict: an unknown key is400 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). Formandate_limits, a row:cap,budget,allowed_mcc,named_merchants,blocked_mcc,blocked_merchants,refuse_over_cap,refuse_over_shareorask_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.valueorwhen.items.N.conditions.M.value. Formandate_limits:amountoncap,allocation(shared,reserved) andat_limit(stop,ask,continue) onbudget,valueon a margin row (withadvanced, 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
editorpublishsession 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. Onmandate_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 withmanage; 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 withoutmanage). Not onmandate_limits. One ofall,session. manageboolean- Full control (not by default): in an
editorpublishsession, every shown rule that isn't locked can be moved (order), turned off, deleted (remove), duplicated (copy_of) and have every value edited; withadvanced, 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 onmandate_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 ofGET /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 is400 rules_embed_out_of_scope). Absent: every field of the kind's catalog. Not onmandate_limits. savesenumdraft(the default): a save waits to be published.publishneeds modepublish. One ofdraft,publish.draft_groupstring | null- Sandbox only (
400in 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 ofstatus,item_type,source,destination,case_id,created_gteandcreated_lte, with the values the capture request list takes.checkout_list: any ofoutcome(which also takesin_review),approval_status,order_id,created_gteandcreated_lte, with the values the checkout assessment list takes.run_list: any ofstatus(one value, or several separated by commas),q,created_gteandcreated_lte, with the values the run list takes.traffic_list: any ofoutcome,classandbot_likelihood(each one value, or several separated by commas),signed,created_gteandcreated_lte, with the values the traffic assessment list takes.Show child attributes
statusstringcapture_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.
outcomestringcheckout_list: the outcome (allow,challenge,reject;frictionlessis still accepted), orin_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_statusenumcheckout_list: the cart approval's status. One ofpending,in_review,approved,denied,expired.order_idstringcheckout_list: orders whose reference contains this text.qstringrun_list: runs whose name or ID contains this text.classstringtraffic_list: Identify's class (signed_agent,declared_bot,suspected_bot,likely_human,unknown), one or several separated by commas.signedenumtraffic_list: the agent signature verified, or didn't. One oftrue,false.bot_likelihoodstringtraffic_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 }'const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/tokens`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "widget": "embed", "object_id": "portal-check", "ttl": 600 }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/embed/tokens", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"widget": "embed",
"object_id": "portal-check",
"ttl": 600
}).json()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_resultandcapture_requestneed a key with theattestscope;checkout_resultneedsauthorize;run_resultneedsmandate;traffic_resultneedsidentify;rulesneeds the scope of its kind's product (authorizeforcheckout,mandateforintent,attestforcapture). Another widget is400 parameter_invalid. One ofcapture_result,capture_request,checkout_result,run_result,rules,traffic_result. object_idstringRequired- As for the token: a capture request (
capr_…) forcapture_result, a checkout assessment (cas_…) or cart approval (coap_…) forcheckout_result, an agent run (run_…) forrun_result, a traffic assessment (tas_…) fortraffic_result, your case reference forcapture_request, the kind of rules (checkout,intent,captureormandate_limits) forrules. modestringviewfor a result view,sendfor the composer (the defaults);rulestakesview(the default),editorpublish(withrules.saves: publish).rulesobjectrulesonly, required: everything a rules session may show and touch, passed on every mint (nothing is saved between sessions). Strict: an unknown key is400 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). Formandate_limits, a row:cap,budget,allowed_mcc,named_merchants,blocked_mcc,blocked_merchants,refuse_over_cap,refuse_over_shareorask_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.valueorwhen.items.N.conditions.M.value. Formandate_limits:amountoncap,allocation(shared,reserved) andat_limit(stop,ask,continue) onbudget,valueon a margin row (withadvanced, 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
editorpublishsession 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. Onmandate_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 withmanage; 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 withoutmanage). Not onmandate_limits. One ofall,session. manageboolean- Full control (not by default): in an
editorpublishsession, every shown rule that isn't locked can be moved (order), turned off, deleted (remove), duplicated (copy_of) and have every value edited; withadvanced, 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 onmandate_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 ofGET /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 is400 rules_embed_out_of_scope). Absent: every field of the kind's catalog. Not onmandate_limits. savesenumdraft(the default): a save waits to be published.publishneeds modepublish. One ofdraft,publish.draft_groupstring | null- Sandbox only (
400in live): an opaque label up to 64 characters that keeps one group's drafts from another's.
showarray of enumscapture_resultonly: also show the request'scase_idormetadata.authorobjectcapture_requestonly, 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.
requestobjectcapture_requestonly, required: the send options, as onPOST /v1/embed/tokens.max_sendscounts 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\"
]
}"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/capture_requests`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x", "Content-Type": "application/json" },
body: JSON.stringify({ "case_id": "LMB-20418", "delivery": "self", "session_type": "id" }),
})).json();
const captureRequestId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/links`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"widget": "capture_result",
"object_id": captureRequestId,
"show": [
"case_id"
]
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/attest/capture_requests", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}, json={
"case_id": "LMB-20418",
"delivery": "self",
"session_type": "id"
}).json()
capture_request_id = step1["id"]
data = httpx.post(f"{api}/v1/embed/links", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}, json={
"widget": "capture_result",
"object_id": capture_request_id,
"show": [
"case_id"
]
}).json()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 listhttp://localhost:<port>orhttp://localhost:*.nullallows 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"] }'const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/publishable_keys`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "name": "customer-portal" }),
})).json();
const publishableKeyId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/publishable_keys/${publishableKeyId}`, {
method: "PATCH",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "allowed_origins": ["https://portal.example.com"] }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/embed/publishable_keys", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"name": "customer-portal"
}).json()
publishable_key_id = step1["id"]
data = httpx.patch(f"{api}/v1/embed/publishable_keys/{publishable_key_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"allowed_origins": [
"https://portal.example.com"
]
}).json()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"const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/publishable_keys`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/embed/publishable_keys", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()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"const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/publishable_keys`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "name": "customer-portal" }),
})).json();
const publishableKeyId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/publishable_keys/${publishableKeyId}`, {
method: "DELETE",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/embed/publishable_keys", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"name": "customer-portal"
}).json()
publishable_key_id = step1["id"]
data = httpx.delete(f"{api}/v1/embed/publishable_keys/{publishable_key_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()Response 200
{
"id": "01M6VQBCVXG52HSP65RKNY0M02",
"object": "publishable_key",
"deleted": true
}