# Use your risk providers

Bring the verdicts of the threat-intelligence, fraud and merchant-risk providers you already use into Authorize, and write policy rules on them. Push, lookup and list providers, one verdict format, and the unavailable rule.

*Available on Pro, Growth and Enterprise.*

Use your own risk providers' verdicts when an agent acts. Plug in a provider, and your policy rules can ask a person, deny or route an action when the provider flags the store, the seller or the agent on the other side. Provenance takes the verdicts in as data: your providers decide the risk, and your rules decide what it means.

**Before you begin:** you need an Authorize account on Pro or above and the provider's details. Export the account key.

```bash
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
```

1. **Provider**: push, lookup or list
2. **Verdict**: risk and categories per entity
3. **Facts**: counterparty.external_risk
4. **Rule**: ask a person, deny or route

## 1. Add a provider

Each account can add up to 10 providers in **Settings → Agents → Risk signals** or with [`POST /v1/mandate/risk_providers`](https://provenanceauth.com/docs/api/risk-signals.md#post-v1-mandate-risk-providers). Pick the kind that matches how the provider delivers verdicts:

| Kind | How verdicts arrive |
| --- | --- |
| `push` | The provider sends them to `POST /v1/mandate/risk_signals` with a key that can only do that. |
| `lookup` | Provenance calls the provider's HTTPS endpoint the first time it sees an entity, signed with a secret you share, within a timeout (300 ms by default, 1 s at most), and reuses the answer for the cache time (24 hours by default). |
| `list` | You upload a CSV or JSON list, or give a URL Provenance fetches daily. |

`entity_kinds` says what the provider covers:

| Entity kind | What it is |
| --- | --- |
| `domain` | A host name, such as `shop.example` |
| `origin` | A site's `scheme://host[:port]` |
| `agent` | A registered agent's id (`agt_…`) |
| `agent_key` | An agent signing key's JWK thumbprint |
| `account` | A Provenance company account |
| `email_domain` | The domain of an email address |

**curl**

```bash
curl -s -X POST $PROVENANCE_API/v1/mandate/risk_providers \
  -H "Authorization: Bearer $PROVENANCE_KEY" -H "Content-Type: application/json" \
  -d '{ "name": "Lumen Threat Intel", "slug": "lumen_guide", "kind": "push", "entity_kinds": ["domain", "origin"] }' > provider.json
export PUSH_KEY=$(jq -r '.push_key' provider.json)
cat provider.json
```

**Node**

```ts
const provider = await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ name: "Lumen Threat Intel", slug: "lumen_guide", kind: "push", entity_kinds: ["domain", "origin"] }),
}).then((r) => r.json());
```

**Python**

```python
provider = httpx.post(f"{api}/v1/mandate/risk_providers", headers=headers, json={
    "name": "Lumen Threat Intel", "slug": "lumen_guide", "kind": "push", "entity_kinds": ["domain", "origin"],
}).json()
```

```json
{
  "object": "risk_provider",
  "id": "rpv_01M5XPDJXQR46KYMS99XT98SBT",
  "name": "Lumen Threat Intel",
  "slug": "lumen_guide",
  "kind": "push",
  "status": "active",
  "health": "ok",
  "verdict_count": 0,
  "push_key": "prv_test_…"
}
```

A push provider's key is in `push_key`, shown once: give it to the provider. A lookup provider's secret is stored encrypted and never returned.

## 2. Receive verdicts

Every provider kind uses one verdict format. The provider side is on [send verdicts to Provenance](https://provenanceauth.com/docs/mandate/guides/send-verdicts-to-provenance.md).

- `entity` (object, required): `{ kind, value }`. Values are normalized: a host in lower case, an origin as `scheme://host[:port]`.
- `risk` (string, required): `none`, `low`, `medium`, `high` or `critical`.
- `categories` (string[]): Any of `phishing`, `impersonation`, `fraud`, `compromised`, `shell_site`, `laundering`, `malware`, `spam` and `other`. Unknown categories become `other`.
- `observed_at` (string): When the provider observed it. Defaults to now.
- `expires_at` (string): When it stops applying. Defaults to 30 days; an expired verdict is never used.
- `reference` (string): The provider's own reference.

**curl**

```bash
curl -s -X POST $PROVENANCE_API/v1/mandate/risk_signals \
  -H "Authorization: Bearer $PUSH_KEY" -H "Content-Type: application/json" \
  -d '{ "signals": [ { "entity": { "kind": "origin", "value": "https://login-lumen.example" }, "risk": "high", "categories": ["phishing"], "observed_at": "2026-10-27T09:00:00Z" } ] }'
```

**Node**

```ts
const batch = await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PUSH_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ signals: [{ entity: { kind: "origin", value: "https://login-lumen.example" }, risk: "high", categories: ["phishing"] }] }),
}).then((r) => r.json());
```

**Python**

```python
batch = httpx.post(f"{api}/v1/mandate/risk_signals", headers={"Authorization": f"Bearer {push_key}"}, json={
    "signals": [{"entity": {"kind": "origin", "value": "https://login-lumen.example"}, "risk": "high", "categories": ["phishing"]}],
}).json()
```

```json
{
  "object": "risk_signal_batch",
  "accepted": 1,
  "rejected": 0,
  "errors": []
}
```

## 3. Write a rule on the verdicts

Policies read four facts. Provenance resolves them only for a policy that names one, so every other policy evaluates and records exactly the same facts.

| Fact | Value |
| --- | --- |
| `counterparty.external_risk` | The highest risk across your providers, or `unavailable` |
| `counterparty.external_categories` | The flagging verdicts' categories (read with `contains`) |
| `counterparty.external_providers_flagging` | How many providers flagged it |
| `external.<slug>.risk` | One provider's verdict, or `unavailable` |

The counterparty is the intent's `context.counterparty` (a domain, an origin, an email address or an agent id; a registered agent adds its company, its seller origin and its signing keys), a checkout cart's `origin`, a deal's seller (and, for a seller's own rules, the buyer). The rule below asks a person when a provider flags it high or critical:

```json
{
  "rules": [
    {
      "id": "ask-when-flagged",
      "when": [{ "fact": "counterparty.external_risk", "op": "in", "value": ["high", "critical"] }],
      "require": { "approval": true }
    }
  ]
}
```

The default policy has no rule on external risk, so nothing changes until you add one. **Rules → Seller rules** also has the template "Ask me when a risk provider flags the seller".

## 4. Decide what unavailable means

A lookup that times out or fails, or an entity no provider covers, gives `unavailable`. Provenance never fills in a guess. Each condition on an external fact chooses with `if_unavailable`:

| Value | What happens |
| --- | --- |
| `ignore` (default) | The condition doesn't match, so the action goes on. |
| `ask` | The condition matches and the rule asks a person, even a rule that would deny. |

```json
{ "fact": "counterparty.external_risk", "op": "in", "value": ["high", "critical"], "if_unavailable": "ask" }
```

## 5. Test a lookup

**Settings → Agents → Risk signals → Test a lookup**, or [`POST /v1/mandate/risk_signals/test`](https://provenanceauth.com/docs/api/risk-signals.md#post-v1-mandate-risk-signals-test), shows what each provider says about an entity now (lookups run live, without the cache) and which rule on external risk would fire.

**curl**

```bash
curl -s -X POST $PROVENANCE_API/v1/mandate/risk_signals/test \
  -H "Authorization: Bearer $PROVENANCE_KEY" -H "Content-Type: application/json" \
  -d '{ "entity": "https://login-lumen.example" }'
```

**Node**

```ts
const test = await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals/test`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ entity: "https://login-lumen.example" }),
}).then((r) => r.json());
```

**Python**

```python
test = httpx.post(f"{api}/v1/mandate/risk_signals/test", headers=headers, json={"entity": "https://login-lumen.example"}).json()
```

```json
{
  "object": "risk_signal_test",
  "external_risk": "high",
  "providers_flagging": 1
}
```

The full answer also has:

| Field | What it holds |
| --- | --- |
| `providers` | Each provider's `status`: a verdict, no verdict, unavailable, or not covering this entity |
| `facts` | The facts a rule would read |
| `rule` | The rule that would fire, and whether it asks a person or denies |

## 6. See why an approval was asked

When an external verdict fired the rule, the approval names the provider. The console's approval details show the line, and [`GET /v1/mandate/approvals/{id}`](https://provenanceauth.com/docs/api/approvals.md#get-v1-mandate-approvals-id) returns it in `external_flags`:

```json
{
  "external_flags": [
    {
      "provider_name": "Lumen Threat Intel",
      "risk": "high",
      "categories": ["phishing"],
      "matched_rule_id": "ask-when-flagged",
      "line": "Flagged by Lumen Threat Intel: high · phishing · seen Oct 27"
    }
  ]
}
```

Only your account sees it. Verdicts stay in the account that brought them: other companies, the network signals and the public checks never see them. Each match also sends `mandate.risk_signal.matched` to your webhooks, and the provider's recent hits show in Settings → Agents → Risk signals. On Identify's hosted check, the verdict carries `external_risk` when one of your providers covers the agent, its directory or its key.

## Errors you might see

| Code | What to do |
| --- | --- |
| `risk_provider_invalid` | Fix the field the message names: a lookup needs an HTTPS URL and a secret, and slugs are unique. |
| `risk_signal_invalid` | Send verdicts in the format above, at most 1,000 per request. Item errors come back in `errors`. |
| `risk_provider_limit_reached` | Remove a provider you don't use, then add the new one. |
| `risk_signals_not_configured` | The server can't store provider secrets yet. Retry later; operators see [server configuration](https://provenanceauth.com/docs/self-host/configuration.md). |
| `plan_required` | Risk providers are on Pro and above. |

## Limitations

- A verdict is the provider's. Provenance stores and applies it, and doesn't check it.
- A lookup provider is asked about at most four entities per decision, all at once, each within the provider's timeout.

## See also

- [Send verdicts to Provenance](https://provenanceauth.com/docs/mandate/guides/send-verdicts-to-provenance.md)
- [Step-up approval](https://provenanceauth.com/docs/mandate/guides/step-up-approval.md)
- [Route approvals](https://provenanceauth.com/docs/mandate/guides/route-approvals.md)
- [Buy from agents](https://provenanceauth.com/docs/authorize/guides/buy-from-agents.md)
