# Traffic checks

The hosted check and the middleware's policy bundle.

Related guide: [Verify signed agents](https://provenanceauth.com/docs/identify/guides/verify-signed-agents.md)

## Endpoints

- `GET /v1/identify/assessments/{id}`: [Retrieve a traffic assessment](#get-v1-identify-assessments-id)
- `GET /v1/identify/policy_bundle`: [Get the policy bundle](#get-v1-identify-policy-bundle)
- `GET /v1/identify/assessments`: [List traffic assessments](#get-v1-identify-assessments)
- `POST /v1/identify/assessments`: [Assess a request](#post-v1-identify-assessments)
- `GET /v1/identify/storefront.js`: [Load the storefront check script](#get-v1-identify-storefront-js)
- `POST /v1/identify/storefront_events`: [Record a storefront event](#post-v1-identify-storefront-events)

## The traffic assessment object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `network_signals` | object | no | What the Provenance network knows about a passkey or an agent, from other companies' events. Every value is a count, a rate (0 to 1, three significant figures) or a fixed bucket. A value is null and `sufficient_data` false until it rests on at least 50 events from at least 5 companies other than you. See [network signals](https://provenanceauth.com/docs/authorize/concepts/network-signals.md). |
| `network_signals.object` | enum | yes | The type of object. One of `network_signals`. |
| `network_signals.contributing` | boolean | yes | False when your account doesn't share with the network: then no values are returned. |
| `network_signals.as_of` | timestamp | no | When the values were last counted (hourly). |
| `network_signals.passkey` | object | no | The approving passkey, across companies. |
| `network_signals.passkey.first_seen_at` | timestamp \| null | no | When the network first saw it. |
| `network_signals.passkey.companies_count` | integer \| null | no | Companies other than you that saw it. |
| `network_signals.passkey.decisions_count` | integer \| null | no | Decisions made with it. |
| `network_signals.passkey.denials_count` | integer \| null | no | Requests it denied. |
| `network_signals.passkey.unrecognized_denials_count` | integer \| null | no | Denials with `deny_reason: unrecognized`. |
| `network_signals.passkey.fraud_reports_count` | integer \| null | no | Active fraud reports. |
| `network_signals.passkey.sufficient_data` | boolean | no | Whether the minimums are met. |
| `network_signals.agent` | object | no | The agent, across companies. Returned for verified agents. |
| `network_signals.agent.agent_id` | string | no | The agent. |
| `network_signals.agent.verified` | boolean | no | Whether the agent has a registered signing key. |
| `network_signals.agent.months_active` | integer \| null | no | Months since the network first saw it. |
| `network_signals.agent.companies_count_bucket` | enum | no | A fixed count bucket; null below the minimums. One of `0`, `1_9`, `10_99`, `100_999`, `1000_9999`, `10000_99999`, `100000_plus`. |
| `network_signals.agent.requests_30d_bucket` | enum | no | A fixed count bucket; null below the minimums. One of `0`, `1_9`, `10_99`, `100_999`, `1000_9999`, `10000_99999`, `100000_plus`. |
| `network_signals.agent.approval_rate` | number \| null | no | Approved decisions over all decisions. |
| `network_signals.agent.unrecognized_rate` | number \| null | no | Unrecognized denials over all decisions. |
| `network_signals.agent.off_task_rate` | number \| null | no | "Not what I asked for" denials over all decisions. |
| `network_signals.agent.fraud_report_rate` | number \| null | no | Fraud reports over orders and decisions. |
| `network_signals.agent.network_mandates_active_bucket` | enum | no | A fixed count bucket; null below the minimums. One of `0`, `1_9`, `10_99`, `100_999`, `1000_9999`, `10000_99999`, `100000_plus`. |
| `network_signals.agent.sufficient_data` | boolean | no | Whether the minimums are met. |
| `network_signals.agent.takeover_confirmed_30d` | integer | no | Takeovers the agent's owner confirmed in the last 30 days, shown whatever the minimums. Present only when there's at least one. |
| `external_risk` | object | no | Present when one of your risk providers covers the agent, its directory or its key: their combined verdict (your account only). |
| `external_risk.risk` | enum | no | The highest risk across providers, or `unavailable`. One of `none`, `low`, `medium`, `high`, `critical`, `unavailable`. |
| `external_risk.categories` | array of strings | no | The flagging verdicts' categories. |
| `external_risk.providers_flagging` | integer | no | Providers with a verdict above none. |
| `external_risk.providers` | array of objects | no | Each covering provider's answer. |
| `object` | enum | no | The type of object. One of `traffic_assessment`. |
| `id` | string | no | Unique identifier for the object. |
| `class` | enum | no | The request's class. Only a verified signature makes a signed_agent. One of `signed_agent`, `declared_bot`, `suspected_bot`, `likely_human`, `unknown`. |
| `agent` | object \| null | no | The signing agent, when the request carries a Web Bot Auth signature. |
| `agent.id` | string \| null | no | The registered agent ID. |
| `agent.name` | string \| null | no | The agent's name. |
| `agent.category` | string \| null | no | The agent's category. |
| `agent.operator` | string \| null | no | The operator. |
| `agent.verified` | boolean | no | The signature verified against keys its Signature-Agent URL publishes. |
| `agent.directory` | string \| null | no | The directory the signature resolved to. |
| `agent.key_id` | string \| null | no | On a read: the signing key's ID. |
| `agent.signature` | object | no | The signature. |
| `agent.signature.valid` | boolean | no | Whether it verified. |
| `agent.signature.key_id` | string \| null | no | The keyid. |
| `agent.signature.created` | integer \| null | no | When it was made (Unix seconds). |
| `agent.signature.expires` | integer \| null | no | When it expires (Unix seconds). |
| `agent.signature.covers` | array of strings | no | The covered components. |
| `agent.purpose` | enum | no | Verified signatures only: what the agent signed the request for. `general` for Web Bot Auth; `browse` or `pay` for a card network agent program's tag (`agent-browser-auth`, `agent-payer-auth`, `agent-pay-auth`). One of `general`, `browse`, `pay`. |
| `agent.program` | object | no | Present only on a verified card network signature: the program whose tag it carries, what it signed for, and whether the program's body objects carry the signature's nonce. A program is not an agent platform. |
| `agent.program.name` | enum | no | The card network agent program. One of `visa_tap`, `mastercard_agent_pay`. |
| `agent.program.purpose` | enum | no | What the agent signed for. One of `browse`, `pay`. |
| `agent.program.objects` | object | no | Whether each body object (the consumer object and the payment object) carries the verified signature's nonce: `match`, `mismatch`, or null when it isn't there. Their contents are never read or kept. |
| `agent.program.objects.consumer` | enum | no | The consumer object. One of `match`, `mismatch`. |
| `agent.program.objects.payment` | enum | no | The payment object. One of `match`, `mismatch`. |
| `agent.card` | object | no | Present when a verified signature's key came from a Signature Agent card: its name (cleaned, at most 80 characters) and its site's host, with its `purpose` and `trigger` when they are short strings. Never its contacts or logo. |
| `agent.card.name` | string \| null | no | The card's `client_name`. |
| `agent.card.site` | string \| null | no | The host of the card's `client_uri`. |
| `agent.card.purpose` | string | no | The card's `web_bot_auth.purpose`. |
| `agent.card.trigger` | string | no | The card's `web_bot_auth.trigger`. |
| `agent.operator_kind` | enum | no | How a verified agent is run, present only when your own edge passes it to the middleware (an `operatorKind` reader): `direct` (its own operator) or `intermediary` (a service for many users). The hosted check never reads a header for it. One of `direct`, `intermediary`. |
| `human` | object \| null | no | The person behind the agent, when the request carries an Authorize approval. |
| `human.backed` | boolean | no | A person approved this agent's action. |
| `human.pseudonym` | string \| null | no | The person's pseudonym at your site (hum_…). |
| `human.approved_at` | string \| null | no | When they approved. |
| `human.method` | string \| null | no | How: passkey, device_biometric, device or mandate. |
| `human.biometric_bound` | boolean | no | A biometric was verified. |
| `human.device_trust_tier` | string \| null | no | The approving device's tier. |
| `human.intent_valid` | boolean | no | The intent token verified. |
| `human.intent_reason` | string | no | Why it didn't: token_invalid, token_expired, token_revoked, audience_mismatch, payload_unbound, payload_hash_mismatch, grant_not_applicable, approval_required or approval_too_weak. |
| `human.intent_jti` | string \| null | no | The token's ID. |
| `human.approval_id` | string \| null | no | The Authorize approval the token carries, when a person approved this exact action. |
| `human.source` | enum | no | The header the token came from: intent (Provenance-Intent) or mandate (Provenance-Mandate). One of `intent`, `mandate`. |
| `bot_score` | integer | no | Identify's rules, additive and advisory. |
| `signals` | array of objects | no | The named signals behind bot_score. |
| `signals.code` | string | no | The signal. |
| `signals.description` | string | no | What it means. |
| `vendor_score` | object | no | Your vendor's score through your own key, or `{status: not_configured}`. Never fabricated. |
| `vendor_score.vendor` | string | no | The vendor. |
| `vendor_score.status` | enum | no | The outcome. One of `ok`, `not_configured`, `error`, `quota_exhausted`, `absent`. |
| `vendor_score.score` | number | no | The score (0–1). |
| `vendor_score.message` | string | no | The vendor's message. |
| `protocol` | object \| null | no | The payment-protocol object the request carried (AP2, which maps to AP2 0.2; ACP; x402 v2), and whether it verified. Null when there is none, which is normal. |
| `protocol.name` | enum | yes | The protocol. One of `ap2`, `acp`, `x402`. |
| `protocol.kind` | enum | yes | What arrived. One of `checkout_mandate`, `payment_mandate`, `checkout_session`, `payment`. |
| `protocol.status` | enum | yes | `unverified` means no verifier, no claim to check or missing facts; an unconfigured AP2 verifier is never `verified`. One of `verified`, `unverified`, `invalid`. |
| `protocol.reason` | string | no | Why it isn't verified: ap2_verifier_not_configured, ap2_verifier_unavailable, ap2_signature_invalid, no_expected_checkout, no_expected_order, no_intent, payload_hash_mismatch, … |
| `protocol.amount` | integer | no | The verified amount: minor units, or the asset's atomic units for x402. |
| `protocol.currency` | string | no | The verified currency (lowercase ISO 4217), or the x402 asset. |
| `protocol.payee` | string | no | The payee the verified object names. |
| `protocol.provenance_intent` | boolean | yes | The object carries a Provenance intent claim. |
| `decision` | object | no | What your traffic policy decided. |
| `decision.action` | enum | no | The action. One of `allow`, `reject`, `log_only`, `rate_limit`, `challenge`, `require_intent`. |
| `decision.shadow` | object \| null | no | What the shadow policy would have done. |
| `decision.rate_limit` | object | no | The window that applied. |
| `decision.bundle_stale` | boolean | no | The middleware's bundle was past its TTL. |
| `decision.respond` | object | no | On a reject or an exceeded rate limit: what the client received (the rule's `respond`, by default `not_possible`), so you can tell a disguised answer from a real one. Absent when the request passed. |
| `decision.respond.kind` | enum | no | The kind the client received. `not_possible` is the generic blocked body with no rule id or reason. One of `not_possible`, `message`, `status_only`, `page`, `empty`, `alternate`. |
| `decision.respond.alternate_id` | string \| null | no | The alternate the rule named, or null. |
| `decision.respond.fallback` | enum | no | Why the rule's kind wasn't served, or null when it was. One of `not_read_action`, `template_missing`, `content_type_mismatch`, `snapshot_unavailable`, `snapshot_too_old`, `snapshot_timeout`, `guarded`. |
| `policy` | object \| null | no | The rule that decided, the same block on every product's assessment and simulation: your policy's ID and the version that decided, the rule's ID and name, when it ran, what it did, and each of its conditions with the value the engine compared (`actual`). Only the deciding rule is listed. A computed comparison (a location match, a distance) appears in a result only here. Null when no rule decided; `reason` then says what did. |
| `policy.id` | string \| null | yes | The product's policy (`pol_…`), one per account and product, the same on every version. |
| `policy.version` | integer \| null | yes | The version that decided: null on the built-in default rules, 0 when a simulation runs a draft. |
| `policy.rule` | object | yes | The rule, and what it compared. |
| `policy.rule.id` | string | yes | The rule's ID (`rul_…`, or `rul_default_…` for a default row), kept across versions. |
| `policy.rule.ref` | string \| null | no | The rule's short display ID (`R-103`, or `R-04` outside checkout), the one the console shows beside the rule. Checkout rules carry their phase digit first: `R-1nn` at checkout, `R-2nn` after the customer answers. Kept across versions and never reused in the policy. Null when the rule's text is gone. |
| `policy.rule.name` | string \| null | yes | The rule's name in the builder, when it has one. |
| `policy.rule.phase` | enum | yes | When it ran: `assess`, or `after_approval` (a store's checkout rule run once the person decided); a Trace rule runs at `action` (before a tool call) or `completion` (on model output). One of `assess`, `after_approval`, `action`, `completion`. |
| `policy.rule.action` | enum | yes | What the rule did: Approve, Challenge (ask a person), Reject or Review. See [outcome words](https://provenanceauth.com/docs/reference/outcomes.md). One of `approve`, `challenge`, `reject`, `review`. |
| `policy.rule.conditions` | array of objects | yes | Each condition of the rule, with the value compared. |
| `policy.rule.conditions.fact` | string | yes | The fact (`order.amount`, `approval.location`, `class`, …). |
| `policy.rule.conditions.op` | string | yes | The operator. |
| `policy.rule.conditions.value` | any | yes | The value the condition compares with. |
| `policy.rule.conditions.actual` | any | yes | The value the engine compared; null when the fact was absent. |
| `policy.rule.conditions.unavailable` | string | no | Why `actual` is null: `not_collected`, `not_recorded` on a result read back from a record that didn't keep the value, or `withheld` for a raw field-timing fact (`agent.typing_interval_ms`, `agent.checkout_fill_seconds`), which rules read but no result returns. |
| `policy.rule.conditions.metric` | string | no | A velocity condition's counter (`verify_count`, `amount_sum`). |
| `policy.rule.conditions.window` | string | no | A velocity condition's window. |
| `policy.rule.conditions.per` | string | no | A velocity condition's subject. |
| `policy.rule.conditions.set` | string | no | A canary or prediction condition's family or probe. |
| `policy.rule.conditions.baseline` | string | no | A relative canary condition's baseline. |
| `policy.rule.conditions.path` | string | no | A field condition's path in the request. |
| `policy.trace` | object | no | The deciding rule's path, however deep: its groups, conditions, signals, scorecards with their rows, rule references and rule groups, each with its value and result. Present only when the path says more than `rule.conditions` (a nested group, a derived fact, an unavailable reading). Bounded at depth 6 and 60 nodes, then `truncated`. |
| `policy.trace.rounds` | integer | no | Rounds of fact resolution the decision took. |
| `policy.trace.nodes` | array of objects | yes | The path's nodes. `kind` is `condition`, `all`, `any`, `none`, `at_least`, `signal`, `scorecard`, `rule`, `group`, `flow` or `risk_score`; groups and signals hold `nodes`, a scorecard its `rows`. A `risk_score` node is a condition on a custom risk score: `key`, `label`, `version`, `answer`, `p` (as rules read them), `raw` (the model's own), `calibrated`, `fact`, `op`, `value`, `actual`, `result`, `evaluation_id` and `reason.status` (the text is on the evaluation). |
| `policy.trace.skipped` | object | no | Facts the decision never had to read, by cost tier (`tier_3: 1`). |
| `policy.trace.truncated` | boolean | no | The path was longer than the bounds. |
| `policy.unavailable` | array of objects | no | The facts the decision found unavailable, and why. Present only when there were some. |
| `policy.unavailable.fact` | string | yes | The fact. |
| `policy.unavailable.reason` | string | yes | Why: `timeout`, `error`, `unconfigured`, `deadline` and the rest. |
| `signature` | object \| any \| null | no | How the request was signed. The hosted check also reads `http_signature` (a key registered with Provenance); the middleware reads `web_bot_auth`. A read of a check recorded before November 17, 2026 returns null. |
| `signature.method` | enum | no | How the request was signed: `web_bot_auth`, `http_signature`, `network` (a card network agent program's tag), or `none` (no signature, or no request was checked). One of `web_bot_auth`, `http_signature`, `network`, `none`. |
| `signature.valid` | boolean \| null | no | True when the signature verified, false when one was sent and didn't, null when nothing was signed. A traffic assessment reports a failed signature (your traffic policy decides what it gets); a mandate assessment refuses it first (`agent_signature_invalid`). |
| `signature.key_id` | string \| null | no | The signature's `keyid` (the key's JWK thumbprint). |
| `signature.directory` | string \| null | no | Where the key was found: the `Signature-Agent` directory URL, or `provenance_registry` for a key registered with Provenance. |
| `signature.agent_id` | string \| null | no | The registered agent (`agt_…`) the key belongs to, when the signature verified against a key registered with Provenance or its hosted directory. |
| `signature.platform` | object \| any \| null | no | Checkout assessments only: the agent platform Identify named for the checkout (`signed` or `declared`), or null. |
| `signature.platform.name` | enum | no | The platform's catalog name. One of `openai`, `anthropic`, `google`, `microsoft`, `apple`, `perplexity`, `meta`, `common_crawl`. |
| `signature.platform.label` | string | no | The platform's display name (`OpenAI`). |
| `signature.platform.source` | enum | no | `signed` (verified through the platform's signing directory) or `declared` (a known crawler's user agent). One of `signed`, `declared`. |
| `signature.covers` | array of strings | no | The covered components, by name (`@authority`, `@method`, `@path`, `signature-agent`, `content-digest`). Empty when nothing was signed. |
| `authority` | object \| any \| null | no | What covered the request: the person's token it carried (`provenance_intent_token` or `provenance_mandate`), or `none` when that token didn't verify or didn't satisfy your policy. Null when the request carried no token. |
| `authority.kind` | enum | no | What covered the action. Assessments today return `provenance_intent_token`, `provenance_mandate`, `third_party_mandate` (checkout only) or `none`. One of `provenance_intent_token`, `provenance_mandate`, `third_party_mandate`, `spc`, `platform_confirmation`, `none`. |
| `authority.verified` | boolean | no | True when the token verified (ES256 against Provenance's published keys). |
| `authority.verified_against` | enum | no | What it was verified against: Provenance's published keys. One of `provenance_jwks`. |
| `authority.alg` | enum | no | The token's signing algorithm. One of `ES256`. |
| `authority.key_id` | string \| null | no | The `kid` of the key that signed the token. |
| `authority.issuer` | string \| null | no | The token's issuer (`iss`); on `third_party_mandate`, the name you listed the issuer under (or, through your own AP2 verifier, the mandate's `iss`). |
| `authority.mandate_id` | string \| null | no | The mandate the token was issued under, or the grant itself; null for a token with no mandate. |
| `authority.mandate_chain` | array of strings | no | The mandates from the person's grant down to the one the agent holds, root first (up to 5). Present with `mandate_id`; a traffic assessment leaves it out (the middleware can't see the chain). |
| `authority.approval_context_id` | string \| null | no | On `provenance_intent_token`: the approval context of the person's yes that minted the token, when one is known. |
| `authority.cart_match` | enum | no | How the covered thing matched what was assessed: `matched` (the token's binding hash, or an AP2 Payment Mandate's total, currency and payee, equal the cart's), `merchant_facts` (an AP2 Checkout Mandate matched your own Checkout), or `not_applicable` (an agent action or a request, where the payload or request hash binds instead). One of `matched`, `merchant_facts`, `not_applicable`. |
| `authority.protocol` | enum | no | On `third_party_mandate`: the mandate's protocol. One of `ap2`, `acp`. |
| `authority.verified_by` | enum | no | On `third_party_mandate`: verified against the keys of an issuer you list (`issuer_jwks`), or by your own AP2 verifier through Identify (`merchant_verifier`). One of `issuer_jwks`, `merchant_verifier`. |
| `authority.evidence_hash` | string \| null | no | On `third_party_mandate`: the SHA-256 (hex) of the mandate as presented, never the mandate; null when Provenance never saw it (a verdict your middleware reported). |
| `action` | string \| null | no | Your route map's action for this request. |
| `client` | object \| any \| null | no | The per-client window's facts the rules read (`client.requests_per_min`, `client.distinct_paths_5m`, `client.read_share_1h`, `client.asset_ratio_5m`), or null when no window ran (the request had no address). |
| `client.key_kind` | enum | no | The counting key: the address, a session cookie or a header fingerprint. One of `ip`, `session`, `fingerprint`. |
| `client.requests_per_min` | integer \| null | no | Requests in the last minute. |
| `client.distinct_paths_5m` | integer \| null | no | Distinct pages read in the last five minutes. |
| `client.read_share_1h` | number \| null | no | Share of browse and search among the client's actions in the last hour. |
| `client.asset_ratio_5m` | number \| null | no | Assets per page in the last five minutes; null when no asset request reaches Identify. |
| `client.scraping_version` | integer \| null | no | The scraping settings version that decided. |
| `source` | enum | no | Where the verdict was computed. One of `hosted`, `middleware`, `edge`. |
| `bot` | object | no | How likely the request is automated: Identify's score, its band and the named signals (`headless`, `hosting_ip`). A request alone is never `low`: under 30 it reads `unclassified` with `reason: no_field_timing`. On a read it is computed from what was recorded (with the visit's field timing when it ran); the list filters on its band (`bot_likelihood`). |
| `bot.likelihood` | integer \| null | yes | 0 to 100: the higher of Identify's bot score and the visit's field-timing score (`automation_score`). Null when nothing scored the visitor. Checkout rules read it as `agent.bot_likelihood_score`. |
| `bot.band` | enum | yes | `medium` (30 to 69) or `high` (70 and over) from `likelihood`; `low` only when it is under 30 and field timing saw a person (`typed` or `pointer_seen`); otherwise `unclassified`: nothing shows a bot or a person (a score of 0 because nothing tripped is no evidence either way). A request alone is never `low`. Checkout rules read it as `agent.bot_likelihood`. One of `low`, `medium`, `high`, `unclassified`. |
| `bot.reason` | enum | yes | Why `band` is `unclassified`: `not_checked` (nothing to score), `no_field_timing` (the score is under 30 and no field timing ran) or `no_person_signal` (field timing ran and saw no typing and no pointer). Null otherwise. One of `not_checked`, `no_field_timing`, `no_person_signal`. |
| `bot.signals` | array of enums | yes | The named signals that are true, from a fixed list: `headless` (a headless browser or an automation driver), `hosting_ip` (a cloud or hosting provider's network), `typed` (field timing saw a field typed, not every value pasted or autofilled) and `pointer_seen` (a pointer moved, clicked or touched before submit). Each is also a checkout rule fact (`agent.headless`, …). |
| `request` | object | no | The assessed request. |
| `request.method` | string | no | The request's method. |
| `request.path` | string | no | The request's path (never the query). |
| `request.agent` | object | no | The agent behind the request. |
| `request.agent.platform` | object \| any \| null | no | The agent platform that sent it, labelled by source (`signed` through the platform's signing directory, `declared` by a known crawler's user agent), or null when neither names one. Never guessed. |
| `request.agent.platform.name` | enum | no | The platform's catalog name. One of `openai`, `anthropic`, `google`, `microsoft`, `apple`, `perplexity`, `meta`, `common_crawl`. |
| `request.agent.platform.label` | string | no | The platform's display name (`OpenAI`). |
| `request.agent.platform.source` | enum | no | `signed` (verified through the platform's signing directory) or `declared` (a known crawler's user agent). One of `signed`, `declared`. |
| `network` | object \| any \| null | no | Where the request came from (the /24 or /48 prefix unless you keep full addresses), or null on a decision recorded before November 28, 2026. |
| `network.kind` | enum | no | The kind of network. `hosting` comes from the cloud ranges or a hosting AS number; `residential`, `mobile` and `business` only from the IP lookup provider. `unknown` when nothing says. One of `residential`, `mobile`, `business`, `hosting`, `unknown`. |
| `network.asn` | integer \| null | no | The AS number, from the IP lookup provider; null without one. |
| `network.as_org` | string \| null | no | The AS organisation's name. |
| `network.provider` | string \| null | no | A listed cloud or hosting provider (`aws`, `gcp`, `azure`, `hetzner`), else null. |
| `network.agent_range` | object \| null | no | The agent operator whose published IP range holds the address, and which crawler's. Never a verified identity: only a signature verifies an agent. Null when the address is in no published range. |
| `network.agent_range.operator` | enum | no | The agent operator. One of `openai`, `anthropic`, `google`, `microsoft`, `apple`, `perplexity`, `meta`, `commoncrawl`. |
| `network.agent_range.crawler` | string | no | The crawler's id (`chatgpt-user`, `googlebot`). |
| `network.privacy` | object | no | Privacy services. `vpn` is null (unknown) without the IP lookup provider. |
| `network.privacy.tor` | boolean \| null | no | A Tor exit. |
| `network.privacy.private_relay` | boolean \| null | no | iCloud Private Relay. |
| `network.privacy.vpn` | boolean \| null | no | A VPN or proxy, per the IP lookup provider. |
| `network.country` | string \| null | no | ISO 3166-1 alpha-2, from the IP lookup provider. |
| `network.ip_prefix` | string \| null | no | The address's /24 or /48 prefix (the default). |
| `network.ip` | string \| null | no | The whole address, only when the account keeps full addresses. |
| `network.sources` | object | no | The lists this decision was classified with, by date. |
| `network.sources.asn` | string \| null | no | `hosting-asns-<date>`, `ip_intel`, or null with no AS number. |
| `network.sources.ranges` | string \| null | no | The date of the crawler and cloud ranges. |
| `network.unavailable` | array of enums | no | The fields that couldn't be known. `ip`: no address was sent, and every field is null. |
| `device` | object \| any \| null | no | The device the request describes, or null on a decision recorded before November 28, 2026. |
| `device.os` | string \| null | no | The operating system (`macOS`, `Windows`, `iOS`, `Android`). |
| `device.os_version` | string \| null | no | Its version, when the user agent or client hints state it. |
| `device.browser` | string \| null | no | The browser (`Chrome`, `Safari`, `Firefox`, `Edge`). |
| `device.browser_version` | string \| null | no | Its major version. |
| `device.type` | enum | no | The device type; `unknown` with no readable user agent. One of `desktop`, `mobile`, `tablet`, `bot`, `unknown`. |
| `device.time_zone` | string \| null | no | The IANA time zone your page reported. |
| `device.locale` | string \| null | no | The language your page reported (BCP 47). |
| `device.source` | enum | no | What the fields rest on. One of `user_agent`, `client_hints`, `browser`. |
| `created_at` | timestamp | no | When it was created. |
| `expires_at` | timestamp | no | On a read: when the record is deleted (your retention setting). |
| `response` | object \| null | no | Hosted check only: the response to send instead of serving the request (the rule's `respond`: by default a 403 or 429 problem body with no rule id or reason; or the 401 ProvenanceIntent challenge), or null. |
| `response.status` | integer | no | The status. |
| `response.headers` | object | no | The headers. |
| `response.body` | object | no | The problem body (empty when `text` is set). |
| `response.text` | string | no | Send these exact bytes instead of `body` (`status_only`, `page`, `empty` and `alternate`). |
| `set_cookie` | string | no | Hosted check, with per-session counting on: the `pv_cid` cookie to set on whatever you answer, the page or the response above (present only then). |

### Example

```json
{
  "object": "traffic_assessment",
  "id": "tas_01M8J0P3105DDJ5TGK5B8F84AY",
  "class": "declared_bot",
  "agent": null,
  "human": null,
  "bot_score": 40,
  "signals": [
    {
      "code": "declared_bot_ua",
      "description": "The user agent declares automation (a bot, crawler or spider token)."
    }
  ],
  "vendor_score": {
    "status": "not_configured"
  },
  "protocol": null,
  "decision": {
    "action": "allow",
    "shadow": null,
    "bundle_stale": false
  },
  "policy": null,
  "signature": {
    "method": "none",
    "valid": null,
    "key_id": null,
    "directory": null,
    "agent_id": null,
    "covers": []
  },
  "authority": null,
  "action": "browse",
  "client": null,
  "source": "hosted",
  "bot": {
    "likelihood": 40,
    "band": "medium",
    "reason": null,
    "signals": []
  },
  "request": {
    "method": "GET",
    "path": "/products",
    "agent": {
      "platform": null
    }
  },
  "network": {
    "kind": "unknown",
    "asn": null,
    "as_org": null,
    "provider": null,
    "agent_range": null,
    "privacy": {
      "tor": null,
      "private_relay": null,
      "vpn": null
    },
    "country": null,
    "ip_prefix": null,
    "sources": {
      "asn": "hosting-asns-2026-11-28",
      "ranges": "2026-10-25"
    },
    "unavailable": [
      "ip"
    ]
  },
  "device": {
    "os": null,
    "os_version": null,
    "browser": null,
    "browser_version": null,
    "type": "bot",
    "time_zone": null,
    "locale": null,
    "source": "user_agent"
  },
  "created_at": "2026-11-28T21:23:53.503Z",
  "expires_at": "2026-12-28T21:23:53.503Z"
}
```

## Retrieve a traffic assessment

`GET /v1/identify/assessments/{id}`

Returns one recorded hosted check as its `traffic_assessment`.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The assessment's ID (`tas_…`). |

### Returns

The assessment. See [the traffic assessment object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/identify/assessments" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request": {
      "method": "GET",
      "url": "https://harborbean.example/products",
      "headers": {
        "user-agent": "Mozilla/5.0 (compatible; GPTBot/1.1; +https://openai.com/gptbot)"
      }
    }
  }' > step.json
export TRAFFIC_ASSESSMENT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/identify/assessments/$TRAFFIC_ASSESSMENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "request": {
      "method": "GET",
      "url": "https://harborbean.example/products",
      "headers": {
        "user-agent": "Mozilla/5.0 (compatible; GPTBot/1.1; +https://openai.com/gptbot)"
      }
    }
  }),
})).json();
const trafficAssessmentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments/${trafficAssessmentId}`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/identify/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "request": {
        "method": "GET",
        "url": "https://harborbean.example/products",
        "headers": {
            "user-agent": "Mozilla/5.0 (compatible; GPTBot/1.1; +https://openai.com/gptbot)"
        }
    }
}).json()
traffic_assessment_id = step1["id"]
data = httpx.get(f"{api}/v1/identify/assessments/{traffic_assessment_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "traffic_assessment",
  "id": "tas_01M8J0P314QRATXHPW0855Q7B2",
  "class": "declared_bot",
  "agent": null,
  "human": null,
  "bot_score": 40,
  "signals": [
    {
      "code": "declared_bot_ua",
      "description": "The user agent declares automation (a bot, crawler or spider token)."
    }
  ],
  "vendor_score": {
    "status": "not_configured"
  },
  "protocol": null,
  "decision": {
    "action": "allow",
    "shadow": null,
    "bundle_stale": false
  },
  "policy": null,
  "signature": {
    "method": "none",
    "valid": null,
    "key_id": null,
    "directory": null,
    "agent_id": null,
    "covers": []
  },
  "authority": null,
  "action": "browse",
  "client": null,
  "source": "hosted",
  "bot": {
    "likelihood": 40,
    "band": "medium",
    "reason": null,
    "signals": []
  },
  "request": {
    "method": "GET",
    "path": "/products",
    "agent": {
      "platform": {
        "name": "openai",
        "label": "OpenAI",
        "source": "declared"
      }
    }
  },
  "network": {
    "kind": "unknown",
    "asn": null,
    "as_org": null,
    "provider": null,
    "agent_range": null,
    "privacy": {
      "tor": null,
      "private_relay": null,
      "vpn": null
    },
    "country": null,
    "ip_prefix": null,
    "sources": {
      "asn": "hosting-asns-2026-11-28",
      "ranges": "2026-10-25"
    },
    "unavailable": [
      "ip"
    ]
  },
  "device": {
    "os": null,
    "os_version": null,
    "browser": null,
    "browser_version": null,
    "type": "bot",
    "time_zone": null,
    "locale": null,
    "source": "user_agent"
  },
  "created_at": "2026-11-28T21:23:53.508Z",
  "expires_at": "2026-12-28T21:23:53.508Z"
}
```

## Get the policy bundle

`GET /v1/identify/policy_bundle`

Everything the middleware needs to decide in-process: your route map, traffic policy and lists, Provenance's token keys, the hosted agent directories and your pseudonym key. Send `If-None-Match` with the last ETag; a 304 means nothing changed. Free on every plan; it needs your secret API key. Each call counts toward your account's daily Identify usage, which is never billed.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `If-None-Match` | header | string | no | The ETag of the bundle you hold. |
| `Provenance-Origin` | header | string | no | The sites this middleware serves, comma-separated origins (at most 10 are read). The middleware sends it once it has served a request. Only the scheme, host and port are kept. |
| `lists` | query | enum | no | `omit` leaves out the vendored crawler and cloud ranges, so the rules run without addresses to match. The middleware takes `full`. One of `full`, `omit`. |

### Returns

The policy bundle.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`policy_account_required`](https://provenanceauth.com/docs/platform/errors.md#policy_account_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/identify/policy_bundle?lists=omit" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/policy_bundle?lists=omit`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/identify/policy_bundle?lists=omit", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "identify_policy_bundle",
  "etag": "57735d7c4c083221a7d464c33915b7ff",
  "generated_at": "2026-11-17T18:30:15.202Z",
  "environment": "sandbox",
  "merchant": {
    "account_id": "acct_000000000000000000000000000000a2",
    "origins": [],
    "display_name": null,
    "pseudonym_key": "-0RyVeIo3EzVwnnK-0Ilgdaa1Hpd7jMSBW2fyMlzfjw"
  },
  "route_map": [
    {
      "path": "/checkout*",
      "action": "checkout"
    },
    {
      "path": "/login*",
      "action": "login"
    },
    {
      "path": "/account*",
      "action": "account_change"
    },
    "… 3 more"
  ],
  "policy": {
    "id": "pol_B48657D1A9F063C2215A7F9CEE",
    "version": null,
    "document": {
      "version": 0,
      "rules": [],
      "default": "allow"
    }
  },
  "shadow": null,
  "lists": {},
  "jwks": {
    "keys": [
      {
        "kty": "EC",
        "crv": "P-256",
        "x": "Xbm166xjlNLRSvahj_T_dYsQnJoMTsDPm1YEV6Jhvek",
        "y": "Ey88QjN92J8cb3W1irA7M5QGWnCbXz-5n7pmrY9SDOU",
        "kid": "9709b87a1edbdb99",
        "use": "sig",
        "alg": "ES256"
      }
    ]
  },
  "directories": [
    {
      "identifiers": [
        "http://127.0.0.1:59712/v1/public/agents/agt_01JDSAMPLE0TIDEPOOL0SALES00/directory",
        "http://127.0.0.1:59712/v1/public/agents/agt_01JDSAMPLE0TIDEPOOL0SALES00/card"
      ],
      "agent": {
        "id": "agt_01JDSAMPLE0TIDEPOOL0SALES00",
        "name": "Tidepool Sales",
        "category": null,
        "operator": "saltmarsh.example"
      },
      "keys": [
        {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "aL5yQgjzM_B3dWDy6lgxlWeU9A_9_jRLNYQsRGLiN48",
          "kid": "qeyAk7qV5aEbrqHuFPh4m2OpR6qDKlvDl3WF3Z0CB-U",
          "use": "sig"
        }
      ]
    },
    {
      "identifiers": [
        "http://127.0.0.1:59712/v1/public/agents/agt_01M7NCC7F2EKKR5SQQ1G84R09R/directory",
        "http://127.0.0.1:59712/v1/public/agents/agt_01M7NCC7F2EKKR5SQQ1G84R09R/card"
      ],
      "agent": {
        "id": "agt_01M7NCC7F2EKKR5SQQ1G84R09R",
        "name": "pantry-pal",
        "category": "shopping_agent",
        "operator": "sandbox.example"
      },
      "keys": [
        {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY",
          "kid": "lyRUHRS4LQGoXlD_Oaa0IK6BCBsxD6DdTLQRUUK3JW4",
          "use": "sig"
        }
      ]
    },
    {
      "identifiers": [
        "http://127.0.0.1:59712/v1/public/agents/agt_01M7NCC7F8X3C61ZDMR4J109X1/directory",
        "http://127.0.0.1:59712/v1/public/agents/agt_01M7NCC7F8X3C61ZDMR4J109X1/card"
      ],
      "agent": {
        "id": "agt_01M7NCC7F8X3C61ZDMR4J109X1",
        "name": "pantry-pal",
        "category": "shopping_agent",
        "operator": "sandbox.example"
      },
      "keys": [
        {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY",
          "kid": "lyRUHRS4LQGoXlD_Oaa0IK6BCBsxD6DdTLQRUUK3JW4",
          "use": "sig"
        }
      ]
    },
    {
      "identifiers": [
        "http://127.0.0.1:59712/v1/public/agents/agt_01M7NCC7KKG63R2CEGEV9KSGAV/directory",
        "http://127.0.0.1:59712/v1/public/agents/agt_01M7NCC7KKG63R2CEGEV9KSGAV/card"
      ],
      "agent": {
        "id": "agt_01M7NCC7KKG63R2CEGEV9KSGAV",
        "name": "pantry-pal",
        "category": "shopping_agent",
        "operator": "sandbox.example"
      },
      "keys": [
        {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY",
          "kid": "lyRUHRS4LQGoXlD_Oaa0IK6BCBsxD6DdTLQRUUK3JW4",
          "use": "sig"
        }
      ]
    },
    {
      "identifiers": [
        "http://127.0.0.1:59712/v1/public/agents/agt_01M7NCC7KQ2RRAGW2CXEHEFR4Y/directory",
        "http://127.0.0.1:59712/v1/public/agents/agt_01M7NCC7KQ2RRAGW2CXEHEFR4Y/card"
      ],
      "agent": {
        "id": "agt_01M7NCC7KQ2RRAGW2CXEHEFR4Y",
        "name": "pantry-pal",
        "category": "shopping_agent",
        "operator": "sandbox.example"
      },
      "keys": [
        {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY",
          "kid": "lyRUHRS4LQGoXlD_Oaa0IK6BCBsxD6DdTLQRUUK3JW4",
          "use": "sig"
        }
      ]
    }
  ],
  "fail_mode": "closed",
  "max_signature_age_seconds": 60,
  "ttl_seconds": 300
}
```

## List traffic assessments

`GET /v1/identify/assessments`

Your recorded hosted checks (`POST /v1/identify/assessments`), newest first, as `traffic_assessment` objects. Each carries what was recorded: no `response` and no paid human detail. Middleware and edge reports are traffic decisions (`GET /v1/identify/decisions`). The filters and the page are read in the store; `<provenance-traffic-list>` takes the same filters.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |
| `outcome` | query | array of enums | no | Only assessments with these decisions (`decision.action`). One value, or several separated by commas. |
| `class` | query | array of enums | no | Only these classes. One value, or several separated by commas: an agent is `signed_agent`, `declared_bot` or `suspected_bot`; a person is `likely_human`. |
| `signed` | query | enum | no | Only visits whose agent signature verified (`true`), or didn't (`false`). One of `true`, `false`. |
| `bot_likelihood` | query | array of enums | no | Only these bot likelihood bands. One value, or several separated by commas. |
| `created_gte` | query | timestamp | no | Assessed at or after this time. |
| `created_lte` | query | timestamp | no | Assessed at or before this time. |

### Returns

The assessments.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/identify/assessments" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request": {
      "method": "GET",
      "url": "https://harborbean.example/products",
      "headers": {
        "user-agent": "curl/8.7.1"
      }
    }
  }' > /dev/null
curl "$PROVENANCE_API/v1/identify/assessments" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "request": {
      "method": "GET",
      "url": "https://harborbean.example/products",
      "headers": {
        "user-agent": "curl/8.7.1"
      }
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/identify/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "request": {
        "method": "GET",
        "url": "https://harborbean.example/products",
        "headers": {
            "user-agent": "curl/8.7.1"
        }
    }
}).json()
data = httpx.get(f"{api}/v1/identify/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "traffic_assessment",
      "id": "tas_01M8J0P3105DDJ5TGK5B8F84AY",
      "class": "declared_bot",
      "agent": null,
      "human": null,
      "bot_score": 40,
      "signals": [
        {
          "code": "declared_bot_ua",
          "description": "The user agent declares automation (a bot, crawler or spider token)."
        }
      ],
      "vendor_score": {
        "status": "not_configured"
      },
      "protocol": null,
      "decision": {
        "action": "allow",
        "shadow": null,
        "bundle_stale": false
      },
      "policy": null,
      "signature": {
        "method": "none",
        "valid": null,
        "key_id": null,
        "directory": null,
        "agent_id": null,
        "covers": []
      },
      "authority": null,
      "action": "browse",
      "client": null,
      "source": "hosted",
      "bot": {
        "likelihood": 40,
        "band": "medium",
        "reason": null,
        "signals": []
      },
      "request": {
        "method": "GET",
        "path": "/products",
        "agent": {
          "platform": null
        }
      },
      "network": {
        "kind": "unknown",
        "asn": null,
        "as_org": null,
        "provider": null,
        "agent_range": null,
        "privacy": {
          "tor": null,
          "private_relay": null,
          "vpn": null
        },
        "country": null,
        "ip_prefix": null,
        "sources": {
          "asn": "hosting-asns-2026-11-28",
          "ranges": "2026-10-25"
        },
        "unavailable": [
          "ip"
        ]
      },
      "device": {
        "os": null,
        "os_version": null,
        "browser": null,
        "browser_version": null,
        "type": "bot",
        "time_zone": null,
        "locale": null,
        "source": "user_agent"
      },
      "created_at": "2026-11-28T21:23:53.503Z",
      "expires_at": "2026-12-28T21:23:53.503Z"
    },
    {
      "object": "traffic_assessment",
      "id": "tas_01M8J0P30V370MYJ0BZE44TWKE",
      "class": "declared_bot",
      "agent": null,
      "human": null,
      "bot_score": 65,
      "signals": [
        {
          "code": "declared_bot_ua",
          "description": "The user agent declares automation (a bot, crawler or spider token)."
        },
        {
          "code": "datacenter_ip",
          "description": "The address is in a cloud provider's published ranges."
        }
      ],
      "vendor_score": {
        "status": "not_configured"
      },
      "protocol": null,
      "decision": {
        "action": "allow",
        "shadow": null,
        "bundle_stale": false
      },
      "policy": null,
      "signature": {
        "method": "none",
        "valid": null,
        "key_id": null,
        "directory": null,
        "agent_id": null,
        "covers": []
      },
      "authority": null,
      "action": "browse",
      "client": {
        "key_kind": "ip",
        "requests_per_min": 2,
        "distinct_paths_5m": 1,
        "read_share_1h": 1,
        "asset_ratio_5m": null,
        "scraping_version": 1
      },
      "source": "hosted",
      "bot": {
        "likelihood": 65,
        "band": "medium",
        "reason": null,
        "signals": [
          "hosting_ip"
        ]
      },
      "request": {
        "method": "GET",
        "path": "/products",
        "agent": {
          "platform": null
        }
      },
      "network": {
        "kind": "hosting",
        "asn": null,
        "as_org": null,
        "provider": "aws",
        "agent_range": null,
        "privacy": {
          "tor": false,
          "private_relay": false,
          "vpn": null
        },
        "country": null,
        "ip_prefix": "35.180.4.0/24",
        "sources": {
          "asn": null,
          "ranges": "2026-10-25"
        },
        "unavailable": [
          "asn",
          "country",
          "vpn"
        ]
      },
      "device": {
        "os": null,
        "os_version": null,
        "browser": null,
        "browser_version": null,
        "type": "bot",
        "time_zone": null,
        "locale": null,
        "source": "user_agent"
      },
      "created_at": "2026-11-28T21:23:53.498Z",
      "expires_at": "2026-12-28T21:23:53.498Z"
    },
    {
      "object": "traffic_assessment",
      "id": "tas_01M8J0P30K998DKVTZYAFXKZ61",
      "class": "declared_bot",
      "agent": null,
      "human": null,
      "bot_score": 65,
      "signals": [
        {
          "code": "declared_bot_ua",
          "description": "The user agent declares automation (a bot, crawler or spider token)."
        },
        {
          "code": "datacenter_ip",
          "description": "The address is in a cloud provider's published ranges."
        }
      ],
      "vendor_score": {
        "status": "not_configured"
      },
      "protocol": null,
      "decision": {
        "action": "allow",
        "shadow": null,
        "bundle_stale": false
      },
      "policy": null,
      "signature": {
        "method": "none",
        "valid": null,
        "key_id": null,
        "directory": null,
        "agent_id": null,
        "covers": []
      },
      "authority": null,
      "action": "browse",
      "client": {
        "key_kind": "ip",
        "requests_per_min": 1,
        "distinct_paths_5m": 1,
        "read_share_1h": 1,
        "asset_ratio_5m": null,
        "scraping_version": 1
      },
      "source": "hosted",
      "bot": {
        "likelihood": 65,
        "band": "medium",
        "reason": null,
        "signals": [
          "hosting_ip"
        ]
      },
      "request": {
        "method": "GET",
        "path": "/products",
        "agent": {
          "platform": null
        }
      },
      "network": {
        "kind": "hosting",
        "asn": null,
        "as_org": null,
        "provider": "aws",
        "agent_range": null,
        "privacy": {
          "tor": false,
          "private_relay": false,
          "vpn": null
        },
        "country": null,
        "ip_prefix": "35.180.4.0/24",
        "sources": {
          "asn": null,
          "ranges": "2026-10-25"
        },
        "unavailable": [
          "asn",
          "country",
          "vpn"
        ]
      },
      "device": {
        "os": null,
        "os_version": null,
        "browser": null,
        "browser_version": null,
        "type": "bot",
        "time_zone": null,
        "locale": null,
        "source": "user_agent"
      },
      "created_at": "2026-11-28T21:23:53.491Z",
      "expires_at": "2026-12-28T21:23:53.491Z"
    },
    {
      "object": "traffic_assessment",
      "id": "tas_01M8J0P30B2QHC7REVEHRMJ91X",
      "class": "declared_bot",
      "agent": null,
      "human": null,
      "bot_score": 65,
      "signals": [
        {
          "code": "declared_bot_ua",
          "description": "The user agent declares automation (a bot, crawler or spider token)."
        },
        {
          "code": "datacenter_ip",
          "description": "The address is in a cloud provider's published ranges."
        }
      ],
      "vendor_score": {
        "status": "not_configured"
      },
      "protocol": null,
      "decision": {
        "action": "allow",
        "shadow": null,
        "bundle_stale": false
      },
      "policy": null,
      "signature": {
        "method": "none",
        "valid": null,
        "key_id": null,
        "directory": null,
        "agent_id": null,
        "covers": []
      },
      "authority": null,
      "action": "browse",
      "client": {
        "key_kind": "ip",
        "requests_per_min": 0,
        "distinct_paths_5m": 0,
        "read_share_1h": 0,
        "asset_ratio_5m": null,
        "scraping_version": 1
      },
      "source": "hosted",
      "bot": {
        "likelihood": 65,
        "band": "medium",
        "reason": null,
        "signals": [
          "hosting_ip"
        ]
      },
      "request": {
        "method": "GET",
        "path": "/products",
        "agent": {
          "platform": null
        }
      },
      "network": {
        "kind": "hosting",
        "asn": null,
        "as_org": null,
        "provider": "aws",
        "agent_range": null,
        "privacy": {
          "tor": false,
          "private_relay": false,
          "vpn": null
        },
        "country": null,
        "ip_prefix": "35.180.4.0/24",
        "sources": {
          "asn": null,
          "ranges": "2026-10-25"
        },
        "unavailable": [
          "asn",
          "country",
          "vpn"
        ]
      },
      "device": {
        "os": null,
        "os_version": null,
        "browser": null,
        "browser_version": null,
        "type": "bot",
        "time_zone": null,
        "locale": null,
        "source": "user_agent"
      },
      "created_at": "2026-11-28T21:23:53.483Z",
      "expires_at": "2026-12-28T21:23:53.483Z"
    },
    {
      "object": "traffic_assessment",
      "id": "tas_01M8J0P30334B7TBCGJNTNEKJC",
      "class": "unknown",
      "agent": null,
      "human": null,
      "bot_score": 0,
      "signals": [],
      "vendor_score": {
        "status": "not_configured"
      },
      "protocol": null,
      "decision": {
        "action": "allow",
        "shadow": null,
        "bundle_stale": false
      },
      "policy": null,
      "signature": {
        "method": "none",
        "valid": null,
        "key_id": null,
        "directory": null,
        "agent_id": null,
        "covers": []
      },
      "authority": null,
      "action": "browse",
      "client": {
        "key_kind": "ip",
        "requests_per_min": 0,
        "distinct_paths_5m": 0,
        "read_share_1h": 0,
        "asset_ratio_5m": null,
        "scraping_version": 1
      },
      "source": "hosted",
      "bot": {
        "likelihood": 0,
        "band": "unclassified",
        "reason": "no_field_timing",
        "signals": []
      },
      "request": {
        "method": "GET",
        "path": "/products/house-blend",
        "agent": {
          "platform": null
        }
      },
      "network": {
        "kind": "unknown",
        "asn": null,
        "as_org": null,
        "provider": null,
        "agent_range": null,
        "privacy": {
          "tor": false,
          "private_relay": false,
          "vpn": null
        },
        "country": null,
        "ip_prefix": "203.0.113.0/24",
        "sources": {
          "asn": null,
          "ranges": "2026-10-25"
        },
        "unavailable": [
          "asn",
          "country",
          "vpn"
        ]
      },
      "device": {
        "os": "macOS",
        "os_version": "14.6",
        "browser": null,
        "browser_version": null,
        "type": "desktop",
        "time_zone": "America/Los_Angeles",
        "locale": "en-US",
        "source": "browser"
      },
      "created_at": "2026-11-28T21:23:53.474Z",
      "expires_at": "2026-12-28T21:23:53.474Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## Assess a request

`POST /v1/identify/assessments`

Assesses one request the way the middleware does and returns a `traffic_assessment`: verifies its Web Bot Auth signature, reads the person's approval, applies your traffic policy and records the decision. `response` is what to answer instead of serving the request, or null. Metered per 1,000 checks, with the network, risk and revocation signals it adds.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `request` | body | object | yes | The request as your server received it. |
| `request.method` | body | string | yes | The HTTP method. |
| `request.url` | body | string | yes | The absolute URL the client called. |
| `request.headers` | body | object | no | The request headers (at most 100). |
| `request.body` | body | string | no | The request body, when it may hold a protocol object (an AP2 mandate, an ACP completion). Read for this check only and never stored. |
| `protocols` | body | object | no | Your own facts for this request's protocol object. |
| `protocols.ap2_expected` | body | object | no | Your Checkout: `checkout_jwt` or `checkout_hash`, `payee_id`, `amount` (minor units) and `currency`. Needed to verify an AP2 Checkout Mandate. |
| `protocols.x402_expected` | body | object | no | The payment you advertised (`resource`, `scheme`, `network`, `amount`, `asset`, `payTo`); the intent token must bind it. |
| `ip` | body | string | no | The client address. The network is classified on the whole address for this check; only its /24 or /48 prefix is stored, unless your account keeps full addresses. |
| `client` | body | object | no | What your own page's script reported about the browser. Never inferred. |
| `client.time_zone` | body | string | no | An IANA time zone (`Europe/Paris`). |
| `client.locale` | body | string | no | A BCP 47 language tag (`fr-FR`). |
| `order` | body | object | no | Your order for this request, when it is a checkout (enables `binding="order"`). |
| `record` | body | boolean | no | Record the decision (default true). |
| `challenge_passed` | body | boolean | no | Your own challenge passed this client: for 30 minutes it is never served alternate content (held on its counting keys). |

### Returns

The traffic assessment. See [the traffic assessment object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`policy_account_required`](https://provenanceauth.com/docs/platform/errors.md#policy_account_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`usage_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#usage_limit_reached)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/identify/assessments" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request": {
      "method": "GET",
      "url": "https://harborbean.example/products/house-blend",
      "headers": {
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6) AppleWebKit/605.1.15",
        "accept-language": "en-US"
      }
    },
    "ip": "203.0.113.24",
    "client": {
      "time_zone": "America/Los_Angeles",
      "locale": "en-US"
    }
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "request": {
      "method": "GET",
      "url": "https://harborbean.example/products/house-blend",
      "headers": {
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6) AppleWebKit/605.1.15",
        "accept-language": "en-US"
      }
    },
    "ip": "203.0.113.24",
    "client": {
      "time_zone": "America/Los_Angeles",
      "locale": "en-US"
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/identify/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "request": {
        "method": "GET",
        "url": "https://harborbean.example/products/house-blend",
        "headers": {
            "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6) AppleWebKit/605.1.15",
            "accept-language": "en-US"
        }
    },
    "ip": "203.0.113.24",
    "client": {
        "time_zone": "America/Los_Angeles",
        "locale": "en-US"
    }
}).json()
```

### Response 200

```json
{
  "object": "traffic_assessment",
  "id": "tas_01M8J0P30334B7TBCGJNTNEKJC",
  "class": "unknown",
  "agent": null,
  "human": null,
  "bot_score": 0,
  "signals": [],
  "vendor_score": {
    "status": "not_configured"
  },
  "protocol": null,
  "decision": {
    "action": "allow",
    "shadow": null
  },
  "policy": null,
  "signature": {
    "method": "none",
    "valid": null,
    "key_id": null,
    "directory": null,
    "agent_id": null,
    "covers": []
  },
  "authority": null,
  "bot": {
    "likelihood": 0,
    "band": "unclassified",
    "reason": "no_field_timing",
    "signals": []
  },
  "action": "browse",
  "client": {
    "key_kind": "ip",
    "requests_per_min": 0,
    "distinct_paths_5m": 0,
    "read_share_1h": 0,
    "asset_ratio_5m": null,
    "scraping_version": 1
  },
  "request": {
    "method": "GET",
    "path": "/products/house-blend",
    "agent": {
      "platform": null
    }
  },
  "source": "hosted",
  "created_at": "2026-11-28T21:23:53.474Z",
  "network": {
    "kind": "unknown",
    "asn": null,
    "as_org": null,
    "provider": null,
    "agent_range": null,
    "privacy": {
      "tor": false,
      "private_relay": false,
      "vpn": null
    },
    "country": null,
    "ip_prefix": "203.0.113.0/24",
    "sources": {
      "asn": null,
      "ranges": "2026-10-25"
    },
    "unavailable": [
      "asn",
      "country",
      "vpn"
    ]
  },
  "device": {
    "os": "macOS",
    "os_version": "14.6",
    "browser": null,
    "browser_version": null,
    "type": "desktop",
    "time_zone": "America/Los_Angeles",
    "locale": "en-US",
    "source": "browser"
  },
  "response": null
}
```

## Load the storefront check script

`GET /v1/identify/storefront.js`

The storefront check, an ES module a store's pages load with a `<script type="module">` tag, or through the Provenance app embed on Shopify. It carries the site's settings and sets no cookie. See the [storefront check guide](https://provenanceauth.com/docs/identify/guides/storefront-check.md).

Auth: none. No API key needed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `shop` | query | string | no | A connected shop's domain (`saltmarsh-goods.myshopify.com`). Send `shop` or `key`. |
| `key` | query | string | no | A publishable key (`prv_pub_…`) for your own site; its allowed origins are checked. |
| `store` | query | string | no | A WooCommerce connection's ID (`stc_`); the Provenance for WooCommerce plugin loads it with this. Send one of `shop`, `key` or `store`. |

### Returns

The module (`text/javascript`).

### Errors

- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`embed_token_invalid`](https://provenanceauth.com/docs/platform/errors.md#embed_token_invalid)
- [`embed_origin_not_allowed`](https://provenanceauth.com/docs/platform/errors.md#embed_origin_not_allowed)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`store_integration_unconfigured`](https://provenanceauth.com/docs/platform/errors.md#store_integration_unconfigured)
- [`storefront_script_unavailable`](https://provenanceauth.com/docs/platform/errors.md#storefront_script_unavailable)

### Request

**curl**

```bash
curl "$PROVENANCE_API/v1/identify/storefront.js?key=prv_pub_9cK2mW7xT4vQ8nB3sYd6fJh1gAe5rLp0"
```

**Node**

```ts
const script = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/storefront.js?key=prv_pub_9cK2mW7xT4vQ8nB3sYd6fJh1gAe5rLp0`)).text();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
script = httpx.get(f"{api}/v1/identify/storefront.js", params={"key": "prv_pub_9cK2mW7xT4vQ8nB3sYd6fJh1gAe5rLp0"}).text
```

## Record a storefront event

`POST /v1/identify/storefront_events`

One event from the storefront check script: a page view, recorded as the visit (cart and checkout page views are billed hosted checks and return the visit ID), or a form submit carrying the visit's field-timing summary. Name the site with a connected shop or a publishable key. See the [storefront check guide](https://provenanceauth.com/docs/identify/guides/storefront-check.md).

Auth: none. No API key needed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `shop` | body | string | no | A connected shop's domain (`saltmarsh-goods.myshopify.com`). Send `shop` or `key`. |
| `key` | body | string | no | A publishable key (`prv_pub_…`) for your own site. Its allowed origins are checked against the request's `Origin`. |
| `store` | body | string | no | A WooCommerce connection's ID (`stc_`), through the Provenance for WooCommerce plugin. Send one of `shop`, `key` or `store`. |
| `event` | body | enum | yes | A page view, or a cart or checkout form's submit (with `visit_id` and `timing`). One of `page_view`, `form_submit`. |
| `page` | body | enum | yes | The page type. `cart` and `checkout` page views are hosted checks. One of `home`, `product`, `collection`, `search`, `cart`, `checkout`, `other`. |
| `view_id` | body | string | yes | A random ID per page view, made in the browser and never kept across page views. |
| `webdriver` | body | boolean | no | The page's `navigator.webdriver`. |
| `visit_id` | body | string | no | On a form submit: the visit ID the cart or checkout page view returned (`tas_`). |
| `timing` | body | object | no | One form fill, summarised in the browser by the storefront check's field timing: numbers, flags and field roles only. Never a field's name, label or value, a key or a raw event; any other property is refused. Scored on the server into the visit's automation score (0 to 100). |
| `timing.form` | body | enum | yes | Which form was filled in. One of `cart`, `checkout`. |
| `timing.fill_ms` | body | integer | yes | First focus on a field to submit, in milliseconds. |
| `timing.fields` | body | array of objects | yes | Each field the form had, by role. |
| `timing.fields.role` | body | enum | yes | The field's role. Card, password and one-time-code fields are never watched. One of `email`, `name`, `phone`, `address`, `postal_code`, `note`, `discount_code`, `other`. |
| `timing.fields.ms` | body | integer | yes | Focus to blur, in milliseconds. |
| `timing.fields.entry` | body | enum | yes | How the value arrived, from the input events (never the value). One of `typed`, `pasted`, `autofilled`, `mixed`, `empty`. |
| `timing.key_events` | body | integer | yes | Key events in typed fields, counted from timestamps only. |
| `timing.key_gap_mean_ms` | body | number \| null | yes | The mean gap between key events, in milliseconds. |
| `timing.key_gap_sd_ms` | body | number \| null | yes | The spread (standard deviation) of those gaps. |
| `timing.pointer_moves` | body | integer | yes | Pointer moves before submit (sampled every 50 ms). |
| `timing.clicks` | body | integer | yes | Clicks before submit. |
| `timing.touches` | body | integer | yes | Touches before submit. |
| `timing.focus_changes` | body | integer | yes | Focus moves between fields. |
| `timing.untrusted_events` | body | integer | yes | Events the browser didn't generate (`isTrusted` false). |

### Returns

The event. Nothing about the visitor's score goes back to the browser.

### Errors

- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`embed_token_invalid`](https://provenanceauth.com/docs/platform/errors.md#embed_token_invalid)
- [`embed_origin_not_allowed`](https://provenanceauth.com/docs/platform/errors.md#embed_origin_not_allowed)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`store_integration_unconfigured`](https://provenanceauth.com/docs/platform/errors.md#store_integration_unconfigured)

### Request

**curl**

```bash
curl -s -X POST "$PROVENANCE_API/v1/embed/publishable_keys" \
  -H "Authorization: Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" \
  -H "Content-Type: application/json" \
  -d '{ "name": "storefront" }' > step.json
export PUBLISHABLE_KEY=$(jq -r '.publishable_key' step.json)
curl -X POST "$PROVENANCE_API/v1/identify/storefront_events" \
  -H "Content-Type: application/json" \
  -d "{
    \"key\": \"$PUBLISHABLE_KEY\",
    \"event\": \"page_view\",
    \"page\": \"checkout\",
    \"view_id\": \"Xq3bN8vR2mT6kW9yZc4dF7hJ\",
    \"webdriver\": false
  }"
```

**Node**

```ts
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": "storefront" }),
})).json();
const publishableKey = step1.publishable_key;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/storefront_events`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "key": publishableKey,
    "event": "page_view",
    "page": "checkout",
    "view_id": "Xq3bN8vR2mT6kW9yZc4dF7hJ",
    "webdriver": false
  }),
})).json();
```

**Python**

```python
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": "storefront"
}).json()
publishable_key = step1["publishable_key"]
data = httpx.post(f"{api}/v1/identify/storefront_events", json={
    "key": publishable_key,
    "event": "page_view",
    "page": "checkout",
    "view_id": "Xq3bN8vR2mT6kW9yZc4dF7hJ",
    "webdriver": False
}).json()
```

### Response 200

```json
{
  "object": "storefront_event",
  "recorded": true,
  "reason": null,
  "visit_id": "tas_01M7X3R81SJMQ3KM0RXA0PV2K6",
  "field_timing": false
}
```
