# Traffic decisions

Recorded decisions, reported decisions and the traffic summary.

Related guide: [Traffic assessment](https://provenanceauth.com/docs/identify/concepts/traffic-assessment.md)

## Endpoints

- `GET /v1/identify/decisions/{id}`: [Retrieve a traffic decision](#get-v1-identify-decisions-id)
- `GET /v1/identify/decisions`: [List traffic decisions](#get-v1-identify-decisions)
- `POST /v1/identify/decisions`: [Report decisions](#post-v1-identify-decisions)
- `GET /v1/identify/decisions/summary`: [Summarize traffic](#get-v1-identify-decisions-summary)
- `POST /v1/identify/decisions/{id}/label`: [Label a decision for the bot-score calibration](#post-v1-identify-decisions-id-label)

## The traffic decision object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | Unique identifier for the object. |
| `object` | enum | no | The type of object. One of `traffic_decision`. |
| `source` | string | no | hosted, middleware or edge. |
| `class` | string | no | The class. |
| `action` | string \| null | no | The route action. |
| `decision` | string | no | The decision. |
| `rule_id` | string \| null | no | The rule. |
| `policy_version` | integer \| null | no | The policy version. |
| `shadow` | object \| null | no | The shadow policy's action. |
| `agent` | object \| null | no | The agent. A verified one also carries what its signature said, when recorded: `purpose`, the card network agent `program` (`name`, `purpose`), its card's `card.name` and its `operator_kind`. |
| `human` | object \| null | no | The person's pseudonym, when backed. |
| `intent_jti` | string \| null | no | The intent token's ID. |
| `bot_score` | integer | no | The rule score. |
| `signals` | array of strings | no | The signal codes. |
| `vendor_score` | object \| null | no | The vendor score. |
| `method` | string | no | The method. |
| `path` | string | no | The path (no query). |
| `bundle_stale` | boolean | no | The middleware's bundle was stale. |
| `protocol` | object \| null | no | The protocol object's `name`, `status` and verified `amount`, or null. |
| `bot` | object | no | How likely the visitor is automated, as an assessment naming this visit (`visit_id`) would see it with no request: the score (with the visit's field timing when it ran), its band and the named signals. The raw timing is never returned. |
| `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`, …). |
| `agent_platform` | object \| any \| null | no | The agent platform the verdict named (`signed` or `declared`), or null. |
| `agent_platform.name` | enum | no | The platform's catalog name. One of `openai`, `anthropic`, `google`, `microsoft`, `apple`, `perplexity`, `meta`, `common_crawl`. |
| `agent_platform.label` | string | no | The platform's display name (`OpenAI`). |
| `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`. |
| `client` | object \| any \| null | no | The per-client window's facts as decided, or null (no window ran, or recorded before December 2026). |
| `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. |
| `respond` | object \| any \| null | no | What the client received on a reject or an exceeded rate limit, or null (it passed, or the decision was recorded before December 2026). |
| `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`. |
| `respond.alternate_id` | string \| null | no | The alternate the rule named, or null. |
| `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`. |
| `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 decided. |
| `expires_at` | timestamp | no | When it is deleted. |

### Example

```json
{
  "id": "tas_01M8J0P30B2QHC7REVEHRMJ91X",
  "object": "traffic_decision",
  "source": "hosted",
  "class": "declared_bot",
  "action": "browse",
  "decision": "allow",
  "rule_id": null,
  "policy_version": null,
  "shadow": null,
  "agent": null,
  "human": null,
  "intent_jti": null,
  "bot_score": 65,
  "signals": [
    "declared_bot_ua",
    "datacenter_ip"
  ],
  "vendor_score": {
    "vendor": null,
    "status": "not_configured",
    "score": null
  },
  "method": "GET",
  "path": "/products",
  "bundle_stale": false,
  "protocol": null,
  "bot": {
    "likelihood": 65,
    "band": "medium",
    "reason": null,
    "signals": [
      "hosting_ip"
    ]
  },
  "agent_platform": null,
  "respond": null,
  "client": {
    "key_kind": "ip",
    "requests_per_min": 0,
    "distinct_paths_5m": 0,
    "read_share_1h": 0,
    "asset_ratio_5m": null,
    "scraping_version": 1
  },
  "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"
}
```

## Retrieve a traffic decision

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

Returns one recorded decision.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The decision's ID. |

### Returns

The decision. See [the traffic decision 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": "curl/8.7.1"
      }
    },
    "ip": "35.180.4.77"
  }' > step.json
export TRAFFIC_DECISION_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/identify/decisions/$TRAFFIC_DECISION_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": "curl/8.7.1"
      }
    },
    "ip": "35.180.4.77"
  }),
})).json();
const trafficDecisionId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/decisions/${trafficDecisionId}`, {
  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"
        }
    },
    "ip": "35.180.4.77"
}).json()
traffic_decision_id = step1["id"]
data = httpx.get(f"{api}/v1/identify/decisions/{traffic_decision_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "tas_01M8J0P30V370MYJ0BZE44TWKE",
  "object": "traffic_decision",
  "source": "hosted",
  "class": "declared_bot",
  "action": "browse",
  "decision": "allow",
  "rule_id": null,
  "policy_version": null,
  "shadow": null,
  "agent": null,
  "human": null,
  "intent_jti": null,
  "bot_score": 65,
  "signals": [
    "declared_bot_ua",
    "datacenter_ip"
  ],
  "vendor_score": {
    "vendor": null,
    "status": "not_configured",
    "score": null
  },
  "method": "GET",
  "path": "/products",
  "bundle_stale": false,
  "protocol": null,
  "bot": {
    "likelihood": 65,
    "band": "medium",
    "reason": null,
    "signals": [
      "hosting_ip"
    ]
  },
  "agent_platform": null,
  "respond": null,
  "client": {
    "key_kind": "ip",
    "requests_per_min": 2,
    "distinct_paths_5m": 1,
    "read_share_1h": 1,
    "asset_ratio_5m": null,
    "scraping_version": 1
  },
  "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"
}
```

## List traffic decisions

`GET /v1/identify/decisions`

Lists recorded decisions (hosted checks and middleware reports), newest first. Decisions are kept for your retention setting (30 days by default).

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sort` | query | enum | no | The order of the list: `created`, with `-` in front for descending. Newest first when omitted. A `next_cursor` carries its order; pass it back with the same `sort`. One of `created`, `-created`. |
| `class` | query | array of enums | no | Only these classes. One value, or several separated by commas. |
| `decision` | query | array of enums | no | Only these decisions. One value, or several separated by commas. |
| `q` | query | string | no | Search text. Matches when the decision's ID, the agent's ID, directory or operator, the path, the action or the rule's ID contains it, ignoring case. At most 200 characters. |
| `action` | query | string | no | Only this route action. |
| `agent_id` | query | string | no | Only this agent. |
| `pseudonym` | query | string | no | Only this person's pseudonym. |
| `source` | query | enum | no | Only this source. One of `hosted`, `middleware`, `edge`. |
| `human_backed` | query | enum | no | Only decisions with (or without) a person behind the agent. One of `true`, `false`. |
| `shadow_differs` | query | enum | no | Only decisions where the shadow policy would have decided differently (or the same). One of `true`, `false`. |
| `protocol` | query | enum | no | Only decisions whose request carried this payment protocol. One of `ap2`, `acp`, `x402`. |
| `network_kind` | query | enum | no | Only decisions from this kind of network (decisions with no address are left out). One of `residential`, `mobile`, `business`, `hosting`, `unknown`. |
| `agent_range` | query | enum | no | Only decisions whose address is in this operator's published range; `any` for any operator, `none` for an address in no published range. One of `openai`, `anthropic`, `google`, `microsoft`, `apple`, `perplexity`, `meta`, `commoncrawl`, `any`, `none`. |
| `created_gte` | query | timestamp | no | The start of the window. |
| `created_lte` | query | timestamp | no | The end of the window. |

### Returns

The decisions.

### 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"
      }
    },
    "ip": "35.180.4.77"
  }' > step.json
export TRAFFIC_DECISION_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/identify/decisions" \
  -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"
      }
    },
    "ip": "35.180.4.77"
  }),
})).json();
const trafficDecisionId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/decisions`, {
  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"
        }
    },
    "ip": "35.180.4.77"
}).json()
traffic_decision_id = step1["id"]
data = httpx.get(f"{api}/v1/identify/decisions", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "id": "tas_01M8J0P30B2QHC7REVEHRMJ91X",
      "object": "traffic_decision",
      "source": "hosted",
      "class": "declared_bot",
      "action": "browse",
      "decision": "allow",
      "rule_id": null,
      "policy_version": null,
      "shadow": null,
      "agent": null,
      "human": null,
      "intent_jti": null,
      "bot_score": 65,
      "signals": [
        "declared_bot_ua",
        "datacenter_ip"
      ],
      "vendor_score": {
        "vendor": null,
        "status": "not_configured",
        "score": null
      },
      "method": "GET",
      "path": "/products",
      "bundle_stale": false,
      "protocol": null,
      "bot": {
        "likelihood": 65,
        "band": "medium",
        "reason": null,
        "signals": [
          "hosting_ip"
        ]
      },
      "agent_platform": null,
      "respond": null,
      "client": {
        "key_kind": "ip",
        "requests_per_min": 0,
        "distinct_paths_5m": 0,
        "read_share_1h": 0,
        "asset_ratio_5m": null,
        "scraping_version": 1
      },
      "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"
    },
    {
      "id": "tas_01M8J0P30334B7TBCGJNTNEKJC",
      "object": "traffic_decision",
      "source": "hosted",
      "class": "unknown",
      "action": "browse",
      "decision": "allow",
      "rule_id": null,
      "policy_version": null,
      "shadow": null,
      "agent": null,
      "human": null,
      "intent_jti": null,
      "bot_score": 0,
      "signals": [],
      "vendor_score": {
        "vendor": null,
        "status": "not_configured",
        "score": null
      },
      "method": "GET",
      "path": "/products/house-blend",
      "bundle_stale": false,
      "protocol": null,
      "bot": {
        "likelihood": 0,
        "band": "unclassified",
        "reason": "no_field_timing",
        "signals": []
      },
      "agent_platform": null,
      "respond": null,
      "client": {
        "key_kind": "ip",
        "requests_per_min": 0,
        "distinct_paths_5m": 0,
        "read_share_1h": 0,
        "asset_ratio_5m": null,
        "scraping_version": 1
      },
      "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
}
```

## Report decisions

`POST /v1/identify/decisions`

Reports decisions the middleware or an edge template made, at most 1,000 per call. A repeated decision id counts once; a malformed one is listed in `rejected`. An optional `ip` is classified, then kept as its /24 or /48 prefix unless you keep full addresses. Reports are free: stored and shown in your decisions and summary, never metered.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | no | Retry a create safely: the same key + request returns the stored response (24 h, per caller). |
| `Provenance-Origin` | header | string | no | The sites this middleware serves, comma-separated origins (at most 10 are read). Only the scheme, host and port are kept. |
| `decisions` | body | array of objects | yes | The decisions (the `reportOf(verdict)` shape from `@provenanceauth/identify`). `agent_platform`, when the verdict named one, is kept only as a catalog name with `signed` or `declared`; any other value rejects that decision. A verified agent's `agent_program` (`visa_tap`, `mastercard_agent_pay`), `agent_signed_for` (`general`, `browse`, `pay`), `agent_card_name` (at most 80 characters) and `agent_operator_kind` (`direct`, `intermediary`) are kept for the traffic backtest. Optional `ip` (at most 64 characters) and `user_agent` (at most 1,024) give the decision its `network` and `device` blocks; without them `network.unavailable` is `[ip]` and `device.type` is `unknown`. |

### Returns

How many were accepted, repeated or rejected.

### 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)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/identify/decisions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "decisions": [
      {
        "id": "tas_01JREFERENCE00000000000001",
        "created_at": "2026-10-25T18:00:00.000Z",
        "source": "middleware",
        "class": "signed_agent",
        "action": "browse",
        "decision": "allow",
        "rule_id": null,
        "policy_version": null,
        "shadow_action": null,
        "shadow_rule_id": null,
        "agent_id": null,
        "agent_directory": "https://agents.example/.well-known/http-message-signatures-directory",
        "operator": "agents.example",
        "agent_category": null,
        "agent_verified": true,
        "key_id": "poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U",
        "human_backed": false,
        "pseudonym": null,
        "intent_jti": null,
        "bot_score": 0,
        "signals": [],
        "vendor": {
          "vendor": null,
          "status": "not_configured",
          "score": null
        },
        "method": "GET",
        "path": "/products",
        "bundle_stale": false
      }
    ]
  }'
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/decisions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "decisions": [
      {
        "id": "tas_01JREFERENCE00000000000001",
        "created_at": "2026-10-25T18:00:00.000Z",
        "source": "middleware",
        "class": "signed_agent",
        "action": "browse",
        "decision": "allow",
        "rule_id": null,
        "policy_version": null,
        "shadow_action": null,
        "shadow_rule_id": null,
        "agent_id": null,
        "agent_directory": "https://agents.example/.well-known/http-message-signatures-directory",
        "operator": "agents.example",
        "agent_category": null,
        "agent_verified": true,
        "key_id": "poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U",
        "human_backed": false,
        "pseudonym": null,
        "intent_jti": null,
        "bot_score": 0,
        "signals": [],
        "vendor": {
          "vendor": null,
          "status": "not_configured",
          "score": null
        },
        "method": "GET",
        "path": "/products",
        "bundle_stale": false
      }
    ]
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/identify/decisions", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "decisions": [
        {
            "id": "tas_01JREFERENCE00000000000001",
            "created_at": "2026-10-25T18:00:00.000Z",
            "source": "middleware",
            "class": "signed_agent",
            "action": "browse",
            "decision": "allow",
            "rule_id": None,
            "policy_version": None,
            "shadow_action": None,
            "shadow_rule_id": None,
            "agent_id": None,
            "agent_directory": "https://agents.example/.well-known/http-message-signatures-directory",
            "operator": "agents.example",
            "agent_category": None,
            "agent_verified": True,
            "key_id": "poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U",
            "human_backed": False,
            "pseudonym": None,
            "intent_jti": None,
            "bot_score": 0,
            "signals": [],
            "vendor": {
                "vendor": None,
                "status": "not_configured",
                "score": None
            },
            "method": "GET",
            "path": "/products",
            "bundle_stale": False
        }
    ]
}).json()
```

### Response 201

```json
{
  "object": "decision_report",
  "accepted": 1,
  "duplicates": 0,
  "rejected": []
}
```

## Summarize traffic

`GET /v1/identify/decisions/summary`

Counts decisions by class, decision and action over a window, with the top agents, the top signals and the shadow policy's divergence.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `window` | query | enum | no | The window. One of `24h`, `7d`, `30d`. |
| `bucket` | query | enum | no | `30m` with `window=24h`: 48 points of 30 minutes each instead of 24 of an hour. One of `30m`. |

### Returns

The summary.

### 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"
      }
    },
    "ip": "35.180.4.77"
  }' > step.json
export TRAFFIC_DECISION_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/identify/decisions/summary?window=24h" \
  -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"
      }
    },
    "ip": "35.180.4.77"
  }),
})).json();
const trafficDecisionId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/decisions/summary?window=24h`, {
  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"
        }
    },
    "ip": "35.180.4.77"
}).json()
traffic_decision_id = step1["id"]
data = httpx.get(f"{api}/v1/identify/decisions/summary?window=24h", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "traffic_summary",
  "window": "24h",
  "from": "2026-11-27T21:23:53.495Z",
  "total": 3,
  "by_class": {
    "declared_bot": 2,
    "unknown": 1
  },
  "by_decision": {
    "allow": 3
  },
  "by_action": {
    "browse": 3
  },
  "human_backed": 0,
  "top_agents": [],
  "top_signals": [
    {
      "code": "declared_bot_ua",
      "count": 2
    },
    {
      "code": "datacenter_ip",
      "count": 2
    }
  ],
  "shadow": {
    "evaluated": 0,
    "diverged": 0,
    "divergence_rate": 0
  },
  "points": [
    {
      "start": "2026-11-27T21:23:53.495Z",
      "count": 0,
      "by_class": {},
      "by_decision": {}
    },
    {
      "start": "2026-11-27T22:23:53.495Z",
      "count": 0,
      "by_class": {},
      "by_decision": {}
    },
    {
      "start": "2026-11-27T23:23:53.495Z",
      "count": 0,
      "by_class": {},
      "by_decision": {}
    },
    "… 21 more"
  ],
  "previous_total": 0
}
```

## Label a decision for the bot-score calibration

`POST /v1/identify/decisions/{id}/label`

Labels one of your decisions as a scraper, a good agent or a person, for Identify's bot-score calibration. Only with calibration sharing on (`PUT /v1/identify/settings/scraping`). Only the label, the signal codes and the facts are copied, never a path, address, user agent or cookie value; labels are removed 90 days after you turn sharing off. Labelling again replaces the label.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | body | enum | yes | What the client was. One of `scraper`, `good_agent`, `person`. |

### Returns

The label.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`calibration_sharing_off`](https://provenanceauth.com/docs/platform/errors.md#calibration_sharing_off)
- [`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 PUT "$PROVENANCE_API/v1/identify/settings/scraping" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "calibration_sharing": true }' > /dev/null
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/house-blend",
      "headers": {
        "user-agent": "python-requests/2.32.3"
      }
    }
  }' > step.json
export TRAFFIC_ASSESSMENT_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/identify/decisions/$TRAFFIC_ASSESSMENT_ID/label" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "label": "scraper" }'
curl -s -X PUT "$PROVENANCE_API/v1/identify/settings/scraping" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "calibration_sharing": false }' > /dev/null
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/settings/scraping`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "calibration_sharing": true }),
})).json();
const step2 = 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": "python-requests/2.32.3"
      }
    }
  }),
})).json();
const trafficAssessmentId = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/decisions/${trafficAssessmentId}/label`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "label": "scraper" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.put(f"{api}/v1/identify/settings/scraping", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "calibration_sharing": True
}).json()
step2 = 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": "python-requests/2.32.3"
        }
    }
}).json()
traffic_assessment_id = step2["id"]
data = httpx.post(f"{api}/v1/identify/decisions/{traffic_assessment_id}/label", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "label": "scraper"
}).json()
```

### Response 201

```json
{
  "object": "identify_calibration_label",
  "decision_id": "tas_01M8CHB39YSAMWMY7VZ943EHXF",
  "label": "scraper",
  "labelled_at": "2026-11-26T18:19:32.547Z"
}
```
