Self-hosting · Reference
Server configuration
These are the environment variables a self-hosted Provenance API reads. Every setting is optional unless marked required; an unset integration reports itself as not configured instead of returning made-up results.
Core
| Variable | Default | What it controls |
|---|---|---|
NODE_ | development | production hardens the posture: weak secrets refuse boot and development routes are off. |
API_ | sandbox | sandbox seeds the fixtures on boot; live is for real data. |
PORT, HOST | 8080, 0. | Where the API listens. |
DATABASE_ | unset | A Postgres URL. Unset uses the in-memory store. |
DATABASE_ | 10 | Postgres connections per replica. Keep replicas × pool under the database's limit. |
RATE_ | memory | Where rate-limit windows and single sign-on state live. memory is per process, right for one replica; pg shares them through Postgres so several replicas enforce one limit. |
SESSION_ | 100 | Requests a minute for one signed-in console session. API keys and addresses keep their own limits. |
DEMO_ | 1000 | Requests a minute for each of Provenance's own live demo keys, on a sandbox that runs the demos (DEMO_). Every other key keeps its own limit; a live deployment ignores it. |
REPLICAS | 1 | How many API replicas you run. More than one with the memory backend logs a startup warning. |
JWT_ | dev value | Required in production: at least 32 characters. |
DOCS_ | https:/ | The base of doc_ in error bodies. A localhost value refuses boot in live. |
EMAIL_ | https:/ | The Provenance mark beside "Powered by Provenance" in emails when NEXT_ is unset, not an absolute URL, or localhost. Otherwise the mark comes from the site. |
E2E_ | unset | On a sandbox with NODE_ (a staging stack), turns on the operator route that deletes and re-seeds the synthetic test accounts before an end-to-end run. Callers send it in X-World-Reset-Token. Never served in live. |
Signing keys
| Variable | Default | What it controls |
|---|---|---|
INTENT_ | ephemeral in sandbox | Required in production. The EC P-256 key that signs intent tokens, receipts and manifests; its public half is published at /. |
INTENT_ | unset | The previous key during a rotation, kept in the JWKS until its tokens expire. |
AP2_ | off | on signs AP2 mandates after a passkey approval and serves /. |
AP2_ | made at boot in sandbox | Required in production while AP2_ is on. A separate EC P-256 key that signs AP2 mandates only. |
AP2_ | 600 | How long each issued copy of a closed AP2 mandate lives (never past the intent token inside). |
AP2_ | 120 | How long an approval opened from the Provenance app waits for the app's key before the issuer key signs. |
ISSUER_ | 250 | How long before a card processor hook's budget an issuer decision must answer; past it the program's fail mode answers. |
ISSUER_ | https:/ | Where a decoupled 3-D Secure challenge's answer goes for a Lithic card program that set its API key. |
ISSUER_ | 168 | How long an authorization's hold counts against an agent's card limit when the processor sends no clearing, reversal or expiry for it. |
INTENT_ | provenance-authorize | The iss claim; set it to your API's public URL. |
INTENT_ | unset | 32 random bytes, base64. Keys every token's sub: pairwise per audience (psub_) or per token (anon_), never the device id. Required in live; elsewhere a key derived from JWT_ is used. Rotating it gives every device a new subject, and a new pseudonym, at every site. |
RISK_ | unset | 32 random bytes, base64. Encrypts risk providers' lookup secrets. In live, adding a provider answers 503 risk_ until it's set; elsewhere a key derived from JWT_ is used. |
RISK_ | unset | The old RISK_ during a rotation: values sealed under it still open, new ones use the new key. Run node apps/ to re-seal the rest, then unset it. |
TSA_ | unset | An RFC 3161 timestamp authority for evidence exports and the transparency log. Unset marks timestamps not_. |
Trace worker
| Variable | Default | What it controls |
|---|---|---|
TRACE_ | fixture in a sandbox, else none | remote uses your worker; none answers 503 trace_. fixture is refused in production. |
TRACE_, TRACE_ | unset | Your worker's URL (https and a public host in production) and its bearer token. |
TRACE_ | — | Required in production: at least 16 random characters, salting the opaque IDs of masked neurons. |
TRACE_, TRACE_ | 30000, 120000 | Worker request timeouts. |
TRACE_ | 900 | How old a reading can be for verify and check. |
TRACE_, TRACE_, TRACE_ | 1, 1, 5 | Active sidecar worker keys per plan; Enterprise has no limit. |
FREE_ | 1000 | Signed readings across the Free trial. |
PRICE_ | 10000000:0. | The signed-reading tiers, up_ by monthly volume, ending in inf. |
TRACE_ | 32000 | The prompt size limit. |
TRACE_ | qwen3-8b | The hosted model when a request names none. |
TRACE_ | 0 | Pings a serverless worker's / on this interval to keep the model loaded. |
TRACE_, TRACE_ | 30, 0. | When a learned baseline goes stale, and the smallest sigma used for z-scores. |
TRACE_, TRACE_, TRACE_ | unset, unset, 20000 | The endpoint behind AI trip summaries. It receives POST {instructions, explanations} and answers {text, model}. |
TRACE_ | unset | 32 random bytes, base64 (openssl rand -base64 32). Encrypts eval-suite prompt text with AES-256-GCM. Required in live when a trace backend is on; elsewhere a key derived from JWT_ is used, with a startup warning. Replacing it without TRACE_ makes stored suite prompts unreadable. |
TRACE_ | unset | The old TRACE_ during a rotation: values sealed under it still open, new ones use the new key. Run node apps/ to re-seal the rest, then unset it. |
TRACE_, TRACE_ | 50, 30 | Prompts per eval suite, and suite runs an account may start per hour. |
TRACE_ | unset | The Anthropic key behind neuron labels. Unset (or TRACE_), label requests answer 503 trace_. |
TRACE_, TRACE_ | claude-haiku-5-5, claude-sonnet-5-5 | The first-pass model and the model that re-checks a canary member's label. A model without a list price in the API is refused, so a label is never billed at a guessed price. |
TRACE_ | 30 | The margin over model cost on each label. |
TRACE_, TRACE_ | 200, 20 | New labels an account may get an hour, and neurons one request may name. |
TRACE_, TRACE_ | 30000, unset | The labeller call timeout, and a base URL for a proxy in front of the Anthropic API. |
TRACE_ | 90 | How long hourly canary counts are kept. |
TRACE_, TRACE_ | 5, 3 | The default spike alert every canary family has until someone changes it: at least this many trips in an hour and this many times the usual rate. |
TRACE_ | off | on once your worker serves POST /, the read the canary family builder ranks neurons from. Off, building a family from examples answers 503 trace_. |
TRACE_, TRACE_ | 1000, 10 | Proposed labels and plain-words generations an account may have a day in each environment. Both use the explainer endpoint (TRACE_). |
TRACE_ | 30 | Try-a-sample readings one member may ask for a minute. |
PUBLIC_ | unset | The API's public https base. Hosted agent key directories and cards are published under it, and Twilio's signed webhooks are checked against it. Required in live (the API refuses to boot without it); elsewhere, unset, each request's host is used. |
IDENTIFY_ | unset | 32 random bytes, base64. The root of every per-site pseudonym. Required in live; elsewhere a key derived from JWT_ is used. Rotating it gives every person a new pseudonym at every site. |
IDENTIFY_ | unset | The old IDENTIFY_ during a rotation: lookups match pseudonyms and contact hashes under either key, sealed values open under either, new ones use the new key. Run node apps/, then unset it at the end of the announced window. |
IDENTIFY_, IDENTIFY_ | 300, 60 | How often the middleware refreshes its policy bundle, and the oldest signature it accepts. |
IDENTIFY_, IDENTIFY_ | 30, 2000 | Default decision retention, and the timeout for fetching another operator's key directory. |
IDENTIFY_ | unset | The card network agent programs' key directories, as JSON: [{ "program": "mastercard_ (type is directory, jwks_ or key_). Their signatures verify only against these; a program with none reads unverified. |
IDENTIFY_ | 480 | The longest a card network signature may live (expires - created), 60 to 3600. |
The worker reads its own settings:
| Variable | What it controls |
|---|---|
TRACE_ | hf to run a Hugging Face model, fixture to replay the sandbox recordings |
TRACE_ | The Hugging Face model ID to load |
TRACE_ | The bearer token the API sends |
LABELER_ | An agent labeler for registry builds; unset uses the heuristic labeler |
TRACE_, TRACE_, TRACE_, PROVENANCE_ | Sidecar mode |
TRACE_ | The share of sidecar requests to read, 0 to 1 (default 1); see sampling |
Attest
| Variable | Default | What it controls |
|---|---|---|
SIGHTENGINE_, SIGHTENGINE_ | unset | The synthetic-media detector. Unset answers 503 detector_. |
SCREENING_, SCREENING_ | 300, 20 | Detector calls per month and per day. |
EXIF_, GEOFENCE_ | 600, 5 | Tolerances for the EXIF time and geofence risk factors. |
DOCUMENT_, DOCUMENT_ | unset | The hosted classifier for the document type check on ID shots. Unset, every ID shot's check reads not_ (document_). |
DOCUMENT_, DOCUMENT_ | 2000, 2000 | The time after which a document check reads not_ (document_) and the shot goes on, and the classifier calls one account makes per UTC day. |
ATTEST_, ATTEST_, ATTEST_ | on, 0., 1500 | The screen-or-print check on each photo: off skips it, the probability at which it fires, and the time after which a photo reads "Not checked". |
CLAIM_, CLAIM_ | 250, 168 | The distance and time window for linking claims by GPS. |
INTEGRITY_ | off | on verifies iOS App Attest and Android Play Integrity evidence at device enrollment. |
APP_, PLAY_, PLAY_ | unset | The app identities those checks verify against. |
ANDROID_ | Google's attestation status URL | With integrity checks on, the revoked and suspended Android attestation certificates. off skips the check in sandbox; in live, Android hardware tiers then count as unverified. |
ANDROID_, ANDROID_ | 3600, 86400 | How often the list is fetched, and how old it may get before Android hardware tiers count as unverified. |
CAPTURE_ | off | on shows the capture release before every camera and refuses face and ID captures without an agreement. |
CAPTURE_ | off | Where capture links open: development lets development and test builds of the Provenance app take link captures; on makes it ready on each platform whose store listing is set. See where the link opens. |
CAPTURE_, APP_ | off, unset | on with the clip's bundle id and APP_ makes the App Clip ready on iPhone. |
CAPTURE_ | off | on offers Provenance's store listing (APP_, PLAY_) on capture links. |
TERMS_ | draft-2026-11-11 | The Terms of Service version served and recorded; its texts ship with the API. A live API refuses to boot with the release on and a draft- version. |
TERMS_ | unset | The public Terms of Service page the sheet links to. Required in live with the release on. |
REMINDER_ | 3 | The most reminders one request can get (3 at most; 0 turns them off). |
REMINDER_ | 600 | The least time between the last message to a person and a reminder for the same request. |
REMINDER_, REMINDER_ | 21, 8 | The local hours between which a text reminder is held and sent when they end. |
CONTACT_ | 365 | A capture request or cart approval goes to a person's Provenance app instead of a text only when they verified that phone within this many days (details). |
REQUEST_ | true | The operator switch for follow-up texts after an app notification (details). false stops every follow-up text at once: none is scheduled, and a waiting one ends paused when it comes due. No account can see or change it. |
TEXT_ | draft-2026-11-14 | The consent to text wording version recorded with each consent; its texts ship with the API. |
TEXT_ | 1461 | How long a withdrawn consent to text is kept before the daily sweep deletes it. |
TEXT_ | on | A company's text goes only to a phone with a consent on record (no_ otherwise, details). off skips the check and keeps the records as evidence only. No account can see or change it. |
TEXT_ | 500 | Consent box ticks one account can record in a day, each of which may send the company's confirmation text. Past it the box answers 429 and records nothing. |
PHONE_ | 10 | Verification texts to an account's own phones (the account's and each member's) in a day. A person can also send only five in 15 minutes. At the cap the phone routes answer 429 and send nothing. |
PHONE_ | 3 | Verification texts one number can get in a day, from any account. |
PHONE_ | 1000 | Verification texts to account phones across the deployment in a day. At this cap no account can send one until the day's window ends. |
Authorize
| Variable | Default | What it controls |
|---|---|---|
APPROVAL_ | 600 | How long a step-up approval stays actionable. |
STEPUP_ | 1 | Pending checkout step-ups per person per store; 0 turns the rule off. |
STEPUP_, STEPUP_ | 5, 20 | Checkout step-ups per person per store in an hour and in a day. |
STEPUP_ | 30 | Checkout step-ups per operator account in an hour. |
APPROVAL_ | 900 | How long a signed mobile approval link stays valid. |
DECISION_ | 10000 | Ledger records the in-memory store keeps per environment. Postgres keeps them all. |
ORDER_, ORDER_ | 3, 90 | How many refunds for the same shopper or agent, inside how many days, mark an order's ending refund_. A single refund reads refunded. |
GRANT_ | 1800000 | How long an adjust link from a refused order lasts. An ask's link lasts as long as the ask. |
GRANT_ | 86400000 | The most a near-limit notice's adjust link lasts; otherwise it lasts until the budget window resets. |
DELEGATION_ | 86400000 | How long a proposed delegation plan waits for the person before it expires (it is never accepted by silence), at most until the parent grant ends. |
COUNTER_ | 86400000 | The ceiling on how long a counter-offer ask waits for the person. The wait itself is the person's setting, else the account's, else 24 hours; it also ends 30 seconds before the offer does and at the brief's deadline. |
COUNTER_ | 10,10 | Asks per brief per day, then open asks per person. Past either, the option is refused with counter_ and still recorded. |
COUNTER_ | 120 | The longest a collect window (collect_ on a counter-offer or the account setting) gathers offers from several outside agents before one ask goes out. |
AUTHORITY_ | 600 | The longest an offer-scoped authority proof (authority+jwt) lives, 30 to 600 seconds. It never outlives the offer or the acceptance it covers. |
RESPONDER_ | 5 | How many proposals one responder agent may try on one request in an hour over MCP, dry runs included, 1 to 20. |
AGENT_ | 900 | The life of a client-credentials MCP token (an agent signing in with its own key, or a party with no account signing in with its website key), 60 to 3600 seconds. |
PERSONAL_ | none | 32 random bytes, base64. Keys the hash of a bank card's token on a person's card list. Without it a live API refuses bank card links with 503; the sandbox derives one. |
WEBAUTHN_, WEBAUTHN_ | local dashboard | The origin and relying-party ID passkey ceremonies run under. |
APPROVER_ | on | off pauses new approver invites; existing links keep working. |
THREEDS_ | off | on serves an approval's 3DS Requestor data (the FIDO data and browser fields) for a payment provider; off answers 503 threeds_. |
THREEDS_ | off | on (with THREEDS_) runs the bank check on the approval page; off answers 503 threeds_. |
THREEDS_ | unset | The providers whose adapters you confirmed in their sandboxes, comma-separated: checkout_, adyen, cybersource, stripe. Any other answers 503 threeds_. |
THREEDS_ | 600 | How long a bank check or its challenge waits for the store's result (60 to 3600). |
GUARANTEE_, GUARANTEE_ | 30, 0 | The internal loss ledger shown in Ops: the rate each passkey-approved order is priced at, in basis points, and the monthly limit in cents (0: none). Nothing reaches a merchant. |
GUARANTEE_, GUARANTEE_, GUARANTEE_, GUARANTEE_, GUARANTEE_, GUARANTEE_, GUARANTEE_ | off, hold, 5000000:50,25000000:40,:30, 50000:25000:10000, 60, 90, 2026-11-21-draft | The merchant program on top of that ledger, off by default: on allows enrolment and new orders, hold keeps cash payments for operator review, the monthly fee steps (cents:basis points), the per-order limits in cents (device passkey, synced passkey, standing permission), the waiting periods in days and the terms version. With GUARANTEE_ at 0 nothing is paid. |
UCP_, UCP_, UCP_, UCP_ | on in the sandbox environment and off on live, the site URL, 3000, 262144 | The Universal Commerce Protocol routes (off: 503 ucp_), where the extension schema is served (its host must bind com., or the profile routes answer 503), the profile fetch deadline in milliseconds and the body cap in bytes. |
PRESCRIBER_, PRESCRIBER_, SAM_, PRESCRIBER_, PRESCRIBER_ | NPPES only | The prescriber credential sources for clinician ordering. An unset source caps the reachable tier. |
RUN_ | unset | 32 random bytes, base64 (openssl rand -base64 32). Seals run-record spans at rest with AES-256-GCM. In live, the run-record routes answer 503 run_ until it's set (runs, halts and the run guard still work); elsewhere a key derived from JWT_ is used. |
RUN_ | unset | The old RUN_ during a rotation: values sealed under it still open, new ones use the new key. Run node apps/ to re-seal the rest, then unset it. |
DISPUTE_ | unset | 32 random bytes, base64 (openssl rand -base64 32). Seals evidence added to agent disputes with AES-256-GCM. In live, adding evidence answers 503 dispute_ until it's set (the automatic bundle, findings and outcomes still work); elsewhere a key derived from JWT_ is used. |
DISPUTE_ | unset | The old DISPUTE_ during a rotation: values sealed under it still open, new ones use the new key. Run node apps/ to re-seal the rest, then unset it. |
Verified calls
AI agents register their phone calls and businesses check them (verified calls).
| Variable | Default | What it controls |
|---|---|---|
VOICE_ | on in a sandbox, off in live | Turns verified calls on. Off, every call route answers 503 calls_. |
CALL_ | unset | 32 random bytes, base64 (openssl rand -base64 32). Seals each registered call credential, which holds both phone numbers, with AES-256-GCM. Required in live while VOICE_ is on; elsewhere a key derived from JWT_ is used. |
CALL_ | unset | The old CALL_ during a rotation: values sealed under it still open, new ones use the new key. Run node apps/ to re-seal the rest, then unset it. |
CALLS_ | the site's host + / | The short address, without a scheme, a person types a relayed call code at. |
CALLS_ | 20 | How long a call check waits for the operator's proof after a challenge, unless the request sets wait (at most 30). |
CALLS_ | 120 | How long a confirmation to the person stays open while the call holds, unless the request sets wait (10 to 300). |
TWILIO_ | TWILIO_ | A voice-capable Twilio number for placed calls, used to read a number-verification code out on a call. Unset with no SMS number, a verification by call reports channel_. |
Twilio reports on the calls it places to /webhooks/twilio/voice on PUBLIC_API_URL. Each callback must carry a valid X-Twilio-Signature for TWILIO_AUTH_TOKEN and a signed single-use token, or it answers 401 voice_callback_invalid.
Delivery
| Variable | Default | What it controls |
|---|---|---|
WEBHOOKS_ | on | Runs the outbound webhook worker. In production, endpoint URLs must be https and public. Off, resend and replay answer 503 webhooks_. |
DEVLOG_ | unset | 32 random bytes, base64 (openssl rand -base64 32). Seals request-log bodies with AES-256-GCM. Unset, a sandbox seals under a key made at boot (bodies readable until a restart) and live keeps metadata only. |
DEVLOG_ | unset | The old DEVLOG_ during a rotation: values sealed under it still open, new ones use the new key. Run node apps/ to re-seal the rest, then unset it. |
DEVLOG_ | on | off stops logging requests; events are still stored. |
DEVLOG_ | 10000 | Request-log records waiting to be written before new ones are dropped and counted. |
DEVLOG_, DEVLOG_ | unset, 365 | Longer request-log and event windows for named Enterprise accounts (acct_), capped at the maximum. |
DEVTOOLS_ | 60 | How often an open live tail or provenance listen stream re-checks its console session or key; a signed-out session, removed member or revoked key ends the stream at the next check. |
CONSOLE_ | on | off turns off the console's live updates: GET / answers 503 and the console checks every 15 seconds instead. |
CONSOLE_ | 2000 | How often the one poller per account and environment reads the store for the account stream (at least 250). |
CONSOLE_ | 4 | Open account streams per console member; one more ends the oldest. |
RESEND_, MAIL_ | unset | Transactional email. Unset logs mail in a sandbox and answers 503 mailer_ in production. |
TWILIO_, TWILIO_, TWILIO_ | unset | SMS delivery of approval requests. Point the TWILIO_ number's "A message comes in" webhook at / on PUBLIC_ (HTTP POST) so STOP and START replies reach the stop list; a reply without a valid X-Twilio-Signature answers 401 sms_. |
SHORT_ | unset | The origin that serves short links at / (the site, e.g. https:/). Set, approval, capture and hosted page links in texts become <origin>/ and POST / answers a short_. The site asks the API named by the code's first letter: NEXT_ for t, NEXT_ for l. Unset, texts keep the long link. |
SHOPIFY_ | unset | The Shopify app's client ID, from the Shopify Partner Dashboard, for Shopify stores. With it and SHOPIFY_ unset, the Shopify routes answer 503 store_. |
SHOPIFY_ | unset | The Shopify app's client secret. It also checks Shopify's webhook and redirect signatures. |
SHOPIFY_ | read_ | The access the app asks a shop for, comma-separated. |
SHOPIFY_ | 2026-10 | The Shopify Admin API version the app calls. |
SHOPIFY_ | on, off in production | Marks every charge billed through Shopify as a test charge, never billed. Set off to bill for real. |
SHOPIFY_ | 50000 | The usage cap a new Shopify plan asks the merchant to approve when the account has no spend cap of its own, in cents for a 30-day cycle. |
SHOPIFY_ | off | on asks connecting shops for Shopify Payments' dispute scopes and answers their chargebacks with staged text (chargeback responses). read asks only for reading disputes: chargebacks are matched and the merchant pastes the prepared text. Leave it off until Shopify approves the scopes for your app. |
WOOCOMMERCE_ | on | The Provenance for WooCommerce plugin's routes. It needs no credential: each store gets its own secret, sealed under the Identify vault. off answers 503 store_ on them. |
CHARGEBACK_ | on | Stripe connections with a merchant's restricted key, for chargeback responses; off answers 503 payment_. The key and its webhook secret are sealed under the Identify vault. |
STRIPE_ | (unset) | The restricted key of your Stripe App's backend (kept apart from the billing key; a test key on sandbox, a live key only on live). With the two below, merchants can connect by installing the App. |
STRIPE_ | (unset) | The signing secret of the webhook endpoint at / that listens to connected accounts. |
STRIPE_ | (unset) | The Stripe App's OAuth client id (ca_). Without all three, the App path answers 503 payment_. |
STRIPE_, PAYMENT_ | 2026-09-30., 5000 | The Stripe API version the shared payment token read sends, and the most a checkout assessment waits for Stripe before the payment facts stay as reported (500 to 10000). |
CHARGEBACK_ | 300000 | How often the chargeback sweep runs: retries, submits before the deadline, review reminders and the daily reconcile. |
IDENTIFY_ | 600 | The most storefront check events one site may send a minute (10 to 100,000); over it the beacon answers 429. |
IDENTIFY_ | 20000 | The most recorded decisions one traffic backtest replays, newest first (100 to 200,000); past it the answer says truncated. |
OPS_ | 10 | Store webhooks with a bad signature in an hour that raise store_ (0 disables). |
OPS_ | 3 | Failed Shopify token refreshes in an hour that raise store_ (0 disables). |
OPS_ | 3 | Usage charges to Shopify that failed in an hour that raise store_ (0 disables). |
OPS_ | 3 | Chargeback responses that failed on one platform in an hour that raise chargeback_ (0 disables; a missed deadline always raises it). |
OPS_ | 10 | UCP completions refused with binding_ in an hour that raise ucp_ (0 disables). |
EMAIL_, EMAIL_, EMAIL_ | unset | Approval and invite emails to approvers outside an account. EMAIL_ is postmark or resend. Unset, nothing is sent and deliveries report channel_. |
EMAIL_ | approvals | The Postmark message stream for approver emails. |
EMAIL_ | unset | Postmark's account token, for companies' sending domains. Unset, adding a domain returns 502 email_. |
IP_, IP_, IP_ | unset | An IP-intelligence lookup on approver decisions and on every captured shot: commercial VPN and proxy signals, the country behind timezone_, and a shot's network country and region. GET <url>?ip=<ip> with a Bearer key, answering { vpn, proxy, country } and optionally region, city, lat, lng, accuracy_ and asn. One request per decision or shot with a 300 ms budget; a slow answer falls back to the published lists. |
CHECKOUT_ | off | on keeps the network city name the IP lookup gives, on approvals and on captured shots. Off, the city is dropped and reads city_. |
GEOCODER_, GEOCODER_, GEOCODER_ | unset | A geocoder for billing addresses on cart approvals. GEOCODER_ with GEOCODER_ (a self-hosted Nominatim), and GEOCODER_ when a proxy in front wants a Bearer key. One lookup per distinct address per account, cached, with a 1 s budget; only the postal code, city, region and country are sent. Unset, the distance facts read geocoder_ and the billing time zone comes from the region table. |
EMAIL_ | unset | More domains a company can't register as a sending domain, comma-separated. EMAIL_'s domain and the console and API domains are always refused. |
VAPID_, VAPID_, VAPID_ | unset | Web push delivery. |
APNS_, APNS_, APNS_, APNS_, APNS_ | unset, production | Push to the Provenance app on iPhone (token-based APNs). Unset, the app channel is skipped. |
FCM_, FCM_ | unset | Push to the Provenance app on Android (FCM HTTP v1 with a service account). Unset, the app channel is skipped. |
APP_, APP_, APP_ | unset | What / and / declare; unset, they answer 404. |
WEBAUTHN_ | unset | Extra passkey origins the Android app reports (android:apk-key-hash:…), comma-separated. |
APP_, PLAY_ | unset | The store listings an approver invite links to, and a capture link's store listing. |
Tool gateway
People connect their services once and their assistants use them through the Provenance MCP server (Connect your tools).
| Variable | Default | What it controls |
|---|---|---|
TOOL_ | on in sandbox, off in live | on serves the tool routes and adds connected tools to a person's tools on the MCP server. Off, the routes answer 503 tool_. |
TOOL_ | unset | 32 random bytes, base64 (openssl rand -base64 32). Seals connected services' OAuth tokens and the opt-in call details with AES-256-GCM. Required in live while TOOL_ is on: the API refuses to start without it. Elsewhere a key derived from JWT_ is used. |
TOOL_ | unset | The old TOOL_ during a rotation. Run node apps/ to re-seal the rest, then unset it. |
TOOL_ | every service in sandbox, none in live | The catalog services offered, comma-separated (github,notion). |
TOOL_ | <public API base>/ | The gateway's Client ID Metadata Document, which is also its client ID at services that take metadata documents. |
MCP_ | unset | The public address of the Provenance MCP server (https:/), which the API also answers at / (Provenance MCP). Every MCP sign-in token carries it as its audience. Unset, MCP sign-in answers 503 and only API keys reach /. |
MCP_ | 60 | The tool calls, reads and writes alike, one connected app may make a minute; past it the call answers rate_ with Retry-After. 0 turns the limit off. |
MCP_ | 10 | The member writes (previews and dry runs) one connected app may start a minute; past it the call answers rate_ with Retry-After. 0 turns the limit off. |
MCP_ | on | Serve MCP 2026-07-28 statelessly beside the earlier versions; off answers 2026-07-28 with -32022. |
MCP_ | unset (read) | The last day (YYYY-MM-DD) a grant under the old provenanceauth. key is read. |
MCP_ | 24 | A record_ handle with no request for this long ends. |
MCP_ | unset | Hosts whose Client ID Metadata Documents can't sign in, comma-separated. |
MCP_ | 30 | Metadata document fetches per host per hour. |
DEVELOPER_ | on | The developer tools on the MCP server, for a console sign-in with developer access (Developer tools). Sandbox only, and it needs MCP_; off turns them off in sandbox too. |
DOCS_ | NEXT_ + / | The docs MCP server the MCP server forwards its docs tools to; off for none (the docs tools then answer docs_). |
DOCS_ | 5000 | The forward's deadline. |
TOOL_, TOOL_ | unset | Your OAuth app for a service without dynamic client registration (GitHub: TOOL_; Slack: TOOL_). Its callback is {DASHBOARD_. |
TOOL_ | 10000 | Tool calls a person may make each month. |
TOOL_, TOOL_ | 60000, 10485760 | The deadline for a service's whole answer, and the largest answer passed through. |
OPS_ | 80 | Added time on allowed calls over which the tool_ alert fires (more than 5% of calls); 0 disables it. |
OPS_ | 0. | Upstream errors over allowed calls in 15 minutes that fire tool_; 0 disables it. |
OPS_ | 20 | Failed token refreshes in an hour that fire tool_; 0 disables it. |
Console and access
| Variable | Default | What it controls |
|---|---|---|
DASHBOARD_ | local dashboard | The console origin allowed to send credentialed requests. |
DASHBOARD_ | empty (open) | Emails allowed to sign up and sign in to the console, by any method. Set, it pauses sign-up for everyone else: they get 403 beta_, which gives the contact address. |
GOOGLE_, GOOGLE_ | unset | Google sign-in. Register <DASHBOARD_ as the redirect URI. Unset hides the button and answers 503 oauth_. |
GITHUB_, GITHUB_ | unset | GitHub sign-in, from a GitHub OAuth app whose callback URL is <DASHBOARD_. |
HIBP_ | off | on checks new passwords against Have I Been Pwned's range API; off, signup reports breach_. |
OPS_ | 100 | Failed console sign-ins in an hour that fire the auth_ alert; 0 disables it. |
AUTH_ | unset | 32 random bytes, base64 (openssl rand -base64 32). Encrypts authenticator-app secrets with AES-256-GCM. Required in live; elsewhere a key derived from JWT_ is used, with a startup warning. Replacing it without AUTH_ breaks every authenticator app already set up. |
AUTH_ | unset | The old AUTH_ during a rotation: values sealed under it still open, new ones use the new key. Run node apps/ to re-seal the rest, then unset it. |
AUTH_ | Provenance | The name authenticator apps show for the account. |
OPS_ | 100 | Failed second-factor checks in an hour that fire the two_ alert; 0 disables it. |
OPS_ | 50 | Rate-limited checkout step-ups in an hour that fire the approval_ alert; 0 disables it. |
OPS_ | 20 | Card authorizations answered after the processor's deadline in an hour that fire the issuer_ alert; 0 disables it. |
OPS_ | 0. | The answered share of issuer approvals asked in an hour (at least 20) under which the issuer_ alert fires; 0 disables it. |
OPS_ | 0. | The failed share of approver texts (at least 10 sent in 15 minutes) that fires the network_ alert; 0 disables it. |
OPS_ | 0. | The share of document type checks on ID shots that couldn't reach the classifier (at least 10 in 15 minutes) that fires the capture_ alert; 0 disables it. |
OPS_ | 0. | The failed share of IP lookups on cart approval decisions (at least 10 in 15 minutes) that fires the approver_ alert; 0 disables it. |
ACCOUNT_ | 20 | New accounts one IP can create in a day. |
ACCOUNT_, ACCOUNT_ | empty | Which email domains can sign up. |
SIGNUP_ | 10 | Sign-ups one IP can start in an hour (a password sign-up, or an emailed link sent from the Sign up page). The per-email limits still apply. |
SIGNUP_ | flag | Sign-ups from a throwaway-inbox domain on the bundled list: flag marks the sign-up, block refuses it with 400, off ignores the list. |
SIGNUP_ | on | An account created through sign-up answers About you in the console before any other page opens, and can't create or rotate an API key until its name and company are saved (403 profile_). off turns both off. Accounts created before About you existed, seeded and synthetic accounts, and members who joined by invite are never asked. |
SIGNUP_ | 13 | The UTC hour (0–23) from which the daily sign-up summary goes to INTERNAL_, once a day across every replica. off sends none. |
SIGNUP_ | 3 | Days without progress, before the first API call (or a person's passkey), after which the admin Sign-ups list and the summary call a sign-up stalled. |
OPS_ | 200 | New sign-ups in an hour that fire the signup_ alert; 0 disables it. |
LAUNCH_ | unset | The launch day, YYYY-MM-DD in UTC, for the Since launch range of Console › Ops › Launch. Unset, that range is hidden and range=launch answers 400. |
PEOPLE_ | invite | open lets anyone set up Provenance for themselves at /: a verified email, a verified mobile, then a passkey. invite pauses that; a person invite link still works. |
SIGNUP_ | 3 | Code texts one personal sign-up can send after its email is verified. |
SIGNUP_ | 3 | Sign-up code texts one mobile number can get in a day. |
SIGNUP_ | 500 | Sign-up code texts across the deployment in a day. At this cap the mobile step answers 429 and the signup_ alert fires. Without Twilio the mobile step is deferred: the person is created with a verified email and asked for the mobile once texting is set up. |
SIGNUP_ | draft-2026-11-10 | The wording version of the consent line above the mobile step's send button, recorded with each sign-up. Set it when the wording is signed. |
SIGNUP_ | off | on shows "By creating an account you agree to the Terms of Service, which include an arbitration agreement and a class action waiver." under the Sign up buttons, company and personal, on the web and in the app, with one link to the Terms of Service page (TERMS_, else NEXT_ + /), and records TERMS_ with each acceptance. A person who signed up under another version is asked once at the next open of the home or the app. Off, the line isn't shown and nothing is recorded or asked. |
PERSONAL_ | US | The countries a personal account's mobile number comes from, at sign-up and when one is added later, comma-separated two-letter codes. US covers Puerto Rico, Guam, the US Virgin Islands, American Samoa and the Northern Mariana Islands. Another number answers 400 and gets no text; numbers already on an account stay. Approval requests from companies reach people anywhere. |
CONSOLE_ | 14 | An account that ticked no product at Your products sees every product. Once it is this many days old, the products it used lead the console's sidebar and Get started and the rest sit under More products; with no activity, nothing changes. 0 applies it from the first day. |
API_ | off | on answers 503 service_ on every route except health. |
AI assists
The model endpoint behind AI assists: checkout and traffic rule suggestions. With no provider set, every assist route answers 503 ai_assist_unconfigured, the console says the assists aren't available on this deployment, and the nightly draft job skips.
| Variable | Default | What it controls |
|---|---|---|
AI_ | none | none, anthropic (the Claude API), http (any other model host, the contract below) or fake (test drafts with no network, refused in a live posture). |
AI_ | unset | With anthropic, an optional base URL for a proxy in front of the Claude API. With http, the endpoint every assist call is sent to; it must pass the outbound URL guard. |
AI_ | unset | The Claude API key (anthropic) or the bearer token (http). A secret: never logged. Without a token the provider counts as unconfigured. |
AI_ | claude-haiku-5-5 | The model for every assist call. With anthropic, a model without a list price in the API leaves the assists unconfigured, so a call is never metered at a guessed price. |
AI_ | claude-sonnet-5-5 | One retry per account run when the first answer is declined, cut off, not JSON or doesn't match the schema. none turns the retry off. |
AI_ | 30000 | The deadline for one model call (1,000 to 120,000). |
AI_ | 4000 | The most tokens one answer may use (256 to 16,000). An answer cut off at the limit drops that run's drafts. |
AI_ | 2 | Model cost per account per month, at list prices, after which that account's runs stop until the next month. A guard behind the draft cap. |
AI_ | 25 | Model cost across the deployment per day. At the budget the job stops for the day. |
AI_, AI_, AI_ | 20, 100, 0 | Drafts shown per account per month on each plan. 0 means no cap. A Free account's trial allowance is fixed. |
AI_ | 0. | A checkout draft whose rule would decide more than this share of the orders in its 30-day backtest is dropped, and so is a traffic draft that would challenge, require an intent or block more than this share of requests. |
AI_ | on | The nightly job that drafts for every account with an assist on. off leaves only the console's and the API's refresh. |
OPS_ | 5 | Model calls that timed out or failed since the last alert check that raise ai_ (0 disables). Reaching the daily budget raises ai_. |
OPS_ | 5 | Investigation model calls that timed out or failed since the last alert check that raise investigation_ (0 disables). |
Only aggregated counts and rule conditions are sent; the prompt, the input and the raw answer are never stored or logged, only their hashes (what is sent).
The HTTP contract
With AI_ASSIST_PROVIDER=http, each assist call is one POST to AI_ASSIST_URL:
POST /your/assist/endpoint HTTP/1.1
Authorization: Bearer <AI_ASSIST_TOKEN>
Content-Type: application/json
{
"assist": "checkout_rule_drafts",
"instructions": "The fixed instructions for this assist, versioned.",
"input": { "totals": { "orders": 260, "flagged": 16 }, "segments": [] },
"schema": { "type": "object" },
"model": "claude-haiku-5-5"
}
| Field | What it is |
|---|---|
assist | checkout_ or traffic_. |
instructions | The fixed instructions for the assist. Use them as the system prompt. |
input | The account's aggregated input: totals, candidate segments with their counts, the field catalog and the current rules as conditions. |
schema | The JSON schema the answer must match. |
model | AI_, or AI_ on the retry. Your endpoint may map it to its own model. |
Answer 200 with the answer and what the call used:
{
"output": { "drafts": [], "none_reason": "no segment makes a sensible rule" },
"model": "your-model-id",
"usage": { "input_tokens": 9800, "output_tokens": 1200, "cache_read_tokens": 0 }
}
| Field | What it is |
|---|---|
output | The answer object, or the same object as JSON text. Every draft in it is checked again before it is shown; one that fails is dropped. |
model | The model that answered (at most 100 characters). Left out, the requested model is recorded. |
usage | input_ and output_; cache_ is optional. Missing counts read as 0. |
To decline, answer any 2xx with {"error": "declined"}; for an answer cut off at the token limit, {"error": "truncated"}. Either gets one retry on the retry model; a second failure drops the run's drafts. Any other status, an answer that isn't JSON, or no output is a failed call: no draft is shown and the failure is counted.
The call goes through the same outbound guard as webhooks: in a production posture the host must resolve to public addresses only, redirects aren't followed, and the whole call has one deadline (AI_ASSIST_TIMEOUT_MS).
Custom risk scores
The answering model behind custom risk scores: plain-English questions with the answers an account chooses, and a probability for each answer that rules read. Reasons for an answer are written through the AI assists endpoint above, under its cost guards; with no assist endpoint, answers still work and reasons read unavailable.
| Variable | Default | What it controls |
|---|---|---|
RISK_ | none | Custom risk scores' answering model: none, typed_ (Jev's System One API) or mock (deterministic test answers with no network, refused in a live posture). With none, every risk score fact reads unavailable and each rule's setting for that case decides. |
RISK_ | jev_ | Which host's API typed_ speaks: jev_ (POST {RISK_) or typesafe (POST {RISK_). Moving host changes this, the URL, the token, the model and the two limits, and nothing else. |
RISK_ | unset | The host's base URL. It must pass the outbound URL guard. |
RISK_ | unset | The host's bearer token. A secret: never logged. Without it the provider counts as unconfigured. |
RISK_ | unset | A versioned model id such as jev-1.. An alias that moves when a release ships is refused in a live posture, and an answer from any other version is never used. A model without a list price leaves risk scores unconfigured. |
RISK_ | 400 | The default answering deadline (50 to 10,000). Past it the risk score reads unavailable. |
RISK_, RISK_ | 25, 25 | Model cost across the deployment per UTC day, and per account per month, at list prices. At either, calls stop before they are made. |
RISK_, RISK_ | 10000, 60 with jev_; no limit with typesafe | The key's limits. The day counts questions, not requests, and resets at 00:00 UTC; shadow, replay and eval runs stop at 80% of it. 0 means no limit. |
RISK_ | unset | With mock only: a JSON file of fixed answers by risk score key, each {"probabilities": {. by answer value or {"fail": "timeout"}, for demos and local runs. |
RISK_ | unset | Seals the reasons a model writes for risk score answers (32 bytes, base64). Unset: a key derived from JWT_ outside live; in live, reasons read unavailable until it is set. Answers are unaffected. |
RISK_ | unset | on lets live risk scores bind raw personal fields (names, email addresses, free text) once the account accepted the data terms. Sandbox accepts them either way. |
ANALYSIS_ | unset | A read replica analysis queries read the account's records from (queries themselves run in a per-query sandbox, never on the database). Unset, the read runs on the primary with a 2-second timeout instead of 5. |
INVESTIGATION_ | AI_, else claude-sonnet-5-5 | The model Investigations answer with, through the assist endpoint above. Without a list price for it, Investigations answer 503 investigation_. |
INVESTIGATION_, INVESTIGATION_ | 60000, 4000 | The input and output token budgets of one question, across its model calls. At either, the answer is what the queries found so far. |
INVESTIGATION_ | 1000 | Answers are billed at the model's list price plus this many basis points (1000 is 10%). |
INVESTIGATION_, INVESTIGATION_ | 5, 25 | The monthly spend cap on Free, and on a trial with a card on file. Paid plans have no cap. |
INVESTIGATION_ | 50,100,250,500 | The month's spend at which a paid account is notified, once each a month. An account can set its own. |
INVESTIGATION_ | unset | Seals questions, answers and query results at rest (32 bytes, base64). Unset, a key derived from JWT_ outside live; in live, Investigations answer 503 without it. INVESTIGATION_ opens values sealed before a rotation. |
The model sees each answer under a neutral option name (a, b, …) defined by the account's words, and only the
fields a risk score binds. The question, the case and the answer are never logged.
Billing
| Variable | Default | What it controls |
|---|---|---|
STRIPE_ | test | Which Stripe key set is active: test or live. Live mode needs a live API environment and a complete live set. |
STRIPE_, STRIPE_ | unset | The test-mode Stripe keys. The live set uses the STRIPE_ prefix. Unset answers 503 billing_ on billing routes. |
STRIPE_, STRIPE_ | unset | The meter and price for each metered event, printed by the Stripe bootstrap script. |
Create the Stripe product, meters and prices with the bootstrap script. It's safe to re-run, and prints the variable lines to set:
pnpm --filter @provenance/api stripe:bootstrap --mode test
pnpm --filter @provenance/api stripe:bootstrap --mode live --confirm-live
Register /webhooks/stripe as a webhook endpoint in both Stripe modes; events from the inactive mode are acknowledged and ignored. GET /health/deep reports which Stripe mode is active, or names the variable that's missing.