# Risk signals

Your own risk providers' verdicts (push, lookup or list), the facts rules read, and Test a lookup.

Related guide: [Use your risk providers](https://provenanceauth.com/docs/mandate/guides/use-your-risk-providers.md)

## Endpoints

- `POST /v1/mandate/risk_providers`: [Add a risk provider](#post-v1-mandate-risk-providers)
- `GET /v1/mandate/risk_providers/{id}`: [Read a risk provider](#get-v1-mandate-risk-providers-id)
- `PATCH /v1/mandate/risk_providers/{id}`: [Update a risk provider](#patch-v1-mandate-risk-providers-id)
- `GET /v1/mandate/risk_providers`: [List risk providers](#get-v1-mandate-risk-providers)
- `GET /v1/mandate/risk_signals`: [List risk verdicts](#get-v1-mandate-risk-signals)
- `DELETE /v1/mandate/risk_providers/{id}`: [Remove a risk provider](#delete-v1-mandate-risk-providers-id)
- `DELETE /v1/mandate/risk_signals/{id}`: [Delete a risk verdict](#delete-v1-mandate-risk-signals-id)
- `POST /v1/mandate/risk_providers/{id}/rotate_secret`: [Rotate a push secret](#post-v1-mandate-risk-providers-id-rotate-secret)
- `POST /v1/mandate/risk_providers/{id}/list`: [Upload a risk list](#post-v1-mandate-risk-providers-id-list)
- `POST /v1/mandate/risk_providers/{id}/sync`: [Sync a risk list now](#post-v1-mandate-risk-providers-id-sync)
- `POST /v1/mandate/risk_signals`: [Push risk verdicts](#post-v1-mandate-risk-signals)
- `POST /v1/mandate/risk_signals/test`: [Test a risk lookup](#post-v1-mandate-risk-signals-test)

## The risk provider object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | enum | no | The type of object. One of `risk_provider`. |
| `id` | string | no | Unique identifier for the object (`rpv_…`). |
| `name` | string | no | The account's name for the provider, shown on its approvals. |
| `slug` | string | no | The name in `external.<slug>.risk` rules. |
| `kind` | enum | no | How verdicts arrive. One of `push`, `lookup`, `list`. |
| `entity_kinds` | array of enums | no | The entity kinds it covers. |
| `status` | enum | no | A paused provider is skipped. One of `active`, `paused`. |
| `health` | enum | no | `failing` after a list sync error. One of `ok`, `failing`. |
| `lookup_url` | string \| null | no | Lookup: the provider's HTTPS endpoint. |
| `secret_set` | boolean | no | Lookup: a signing secret is stored (it's never returned). |
| `timeout_ms` | integer \| null | no | Lookup: how long a lookup may take (50–1000 ms). |
| `cache_ttl_seconds` | integer \| null | no | Lookup: how long an answer is reused. |
| `list_url` | string \| null | no | List: the URL fetched daily. |
| `push_key_id` | string \| null | no | Push: the API key that sends its verdicts. |
| `push_key` | string | no | Push: the key itself, on create and rotate only. It can only call `POST /v1/mandate/risk_signals`. |
| `last_sync_at` | timestamp \| null | no | When verdicts last arrived. |
| `last_error` | string \| null | no | The last list sync error. |
| `last_error_at` | timestamp \| null | no | When it happened. |
| `verdict_count` | integer | no | Unexpired verdicts with a risk above none. |
| `recent_hits` | array of objects | no | Its verdicts that changed a decision, newest first. |
| `recent_hits.object` | enum | no | The type of object. One of `risk_signal_hit`. |
| `recent_hits.id` | string | no | Unique identifier for the object (`rsh_…`). |
| `recent_hits.provider_id` | string | no | The provider. |
| `recent_hits.entity` | object | no | What a verdict is about. Values are normalized: a lower-case host, an origin's `scheme://host[:port]`, an agent id as issued, a key's JWK thumbprint. |
| `recent_hits.entity.kind` | enum | no | The entity kind. One of `domain`, `origin`, `agent`, `agent_key`, `account`, `email_domain`. |
| `recent_hits.entity.value` | string | no | The normalized value. |
| `recent_hits.risk` | string | no | The risk level. |
| `recent_hits.categories` | array of strings | no | The categories. |
| `recent_hits.observed_at` | timestamp | no | When the provider observed it. |
| `recent_hits.surface` | enum | no | Where it applied. One of `intent`, `checkout`, `deal`, `deal_sell`. |
| `recent_hits.outcome` | enum | no | What the rule did. One of `approval_required`, `denied`. |
| `recent_hits.matched_rule_id` | string \| null | no | The rule that fired. |
| `recent_hits.approval_id` | string \| null | no | The approval it opened. |
| `recent_hits.line` | string | no | The Details line: `Flagged by {name}: high · phishing · seen Oct 27`. |
| `recent_hits.created_at` | timestamp | no | When it happened. |
| `created_at` | timestamp | no | When it was created. |
| `updated_at` | timestamp | no | When it last changed. |

### Example

```json
{
  "object": "risk_provider",
  "id": "rpv_01M6VQBCJYTTVWF05W2H0D89KK",
  "name": "Lumen Threat Intel",
  "slug": "lumen_threat_intel",
  "kind": "push",
  "entity_kinds": [
    "domain",
    "origin"
  ],
  "status": "active",
  "health": "ok",
  "lookup_url": null,
  "secret_set": false,
  "timeout_ms": null,
  "cache_ttl_seconds": null,
  "list_url": null,
  "push_key_id": "key_5XCC3E4ATW856TX3XY6Z9KGS9Q",
  "last_sync_at": null,
  "last_error": null,
  "last_error_at": null,
  "verdict_count": 0,
  "recent_hits": [],
  "created_at": "2026-11-07T19:21:46.334Z",
  "updated_at": "2026-11-07T19:21:46.334Z"
}
```

## Events

Sent to your [webhook endpoints](https://provenanceauth.com/docs/integrate/webhooks.md) when they subscribe:

- `mandate.risk_signal.matched`

## Add a risk provider

`POST /v1/mandate/risk_providers`

Adds a push, lookup or list provider (up to 10). A push provider's key is in `push_key`, shown once. A lookup provider needs an HTTPS `lookup_url` and a `secret`, stored encrypted. Pro and above.

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). |
| `name` | body | string | yes | Your name for the provider, shown on approvals it causes. |
| `slug` | body | string | no | The name in `external.<slug>.risk` (default: from the name). |
| `kind` | body | enum | yes | How verdicts arrive. One of `push`, `lookup`, `list`. |
| `entity_kinds` | body | array of enums | yes | The entity kinds it covers. |
| `lookup_url` | body | string | no | Lookup: the HTTPS endpoint we call. |
| `secret` | body | string | no | Lookup: the secret that signs our requests. |
| `timeout_ms` | body | integer | no | Lookup: default 300. |
| `cache_ttl_seconds` | body | integer | no | Lookup: default 86400. |
| `list_url` | body | string | no | List: an HTTPS URL fetched daily. |

### Returns

The provider. See [the risk provider object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`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)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`risk_provider_invalid`](https://provenanceauth.com/docs/platform/errors.md#risk_provider_invalid)
- [`risk_provider_limit_reached`](https://provenanceauth.com/docs/platform/errors.md#risk_provider_limit_reached)
- [`risk_signals_not_configured`](https://provenanceauth.com/docs/platform/errors.md#risk_signals_not_configured)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/mandate/risk_providers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lumen Threat Intel",
    "kind": "push",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }'
```

**Node**

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

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Lumen Threat Intel",
    "kind": "push",
    "entity_kinds": [
        "domain",
        "origin"
    ]
}).json()
```

### Response 201

```json
{
  "object": "risk_provider",
  "id": "rpv_01M6VQBCJYTTVWF05W2H0D89KK",
  "name": "Lumen Threat Intel",
  "slug": "lumen_threat_intel",
  "kind": "push",
  "entity_kinds": [
    "domain",
    "origin"
  ],
  "status": "active",
  "health": "ok",
  "lookup_url": null,
  "secret_set": false,
  "timeout_ms": null,
  "cache_ttl_seconds": null,
  "list_url": null,
  "push_key_id": "key_5XCC3E4ATW856TX3XY6Z9KGS9Q",
  "last_sync_at": null,
  "last_error": null,
  "last_error_at": null,
  "verdict_count": 0,
  "recent_hits": [],
  "created_at": "2026-11-07T19:21:46.334Z",
  "updated_at": "2026-11-07T19:21:46.334Z",
  "push_key": "prv_test_dAgqvWm6TcgQlZQcIA7AWOVIplXUHBob3CdUny"
}
```

## Read a risk provider

`GET /v1/mandate/risk_providers/{id}`

One provider, with its verdict count and its ten most recent hits. The secret is never returned.

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

### Parameters

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

### Returns

The provider. See [the risk provider 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/mandate/risk_providers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Merchant Watch",
    "slug": "merchant_watch_read",
    "kind": "list",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }' > step.json
export PROVIDER_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Merchant Watch",
    "slug": "merchant_watch_read",
    "kind": "list",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }),
})).json();
const providerId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers/${providerId}`, {
  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/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Merchant Watch",
    "slug": "merchant_watch_read",
    "kind": "list",
    "entity_kinds": [
        "domain",
        "origin"
    ]
}).json()
provider_id = step1["id"]
data = httpx.get(f"{api}/v1/mandate/risk_providers/{provider_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "risk_provider",
  "id": "rpv_01M6VQBCJZTTJ6EBW9RDD0THSB",
  "name": "Merchant Watch",
  "slug": "merchant_watch_read",
  "kind": "list",
  "entity_kinds": [
    "domain",
    "origin"
  ],
  "status": "active",
  "health": "ok",
  "lookup_url": null,
  "secret_set": false,
  "timeout_ms": null,
  "cache_ttl_seconds": null,
  "list_url": null,
  "push_key_id": null,
  "last_sync_at": null,
  "last_error": null,
  "last_error_at": null,
  "verdict_count": 0,
  "recent_hits": [],
  "created_at": "2026-11-07T19:21:46.335Z",
  "updated_at": "2026-11-07T19:21:46.335Z"
}
```

## Update a risk provider

`PATCH /v1/mandate/risk_providers/{id}`

Changes the name, the entity kinds, `status` (pause or resume), and for a lookup its URL, secret, timeout and cache; for a list its URL. Fields you leave out stay as they are.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The provider's ID (`rpv_…`). |
| `name` | body | string | no | The new name. |
| `entity_kinds` | body | array of strings | no | The entity kinds it covers. |
| `status` | body | enum | no | Pause or resume it. One of `active`, `paused`. |
| `lookup_url` | body | string | no | Lookup: the HTTPS endpoint. |
| `secret` | body | string | no | Lookup: a new signing secret. |
| `timeout_ms` | body | integer | no | Lookup: the timeout. |
| `cache_ttl_seconds` | body | integer | no | Lookup: the cache. |
| `list_url` | body | string \| null | no | List: the URL fetched daily; null removes it. |

### Returns

The updated provider. See [the risk provider object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_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)
- [`risk_provider_invalid`](https://provenanceauth.com/docs/platform/errors.md#risk_provider_invalid)
- [`risk_signals_not_configured`](https://provenanceauth.com/docs/platform/errors.md#risk_signals_not_configured)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/risk_providers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Merchant Watch",
    "slug": "merchant_watch_update",
    "kind": "list",
    "entity_kinds": [
      "domain"
    ]
  }' > step.json
export PROVIDER_ID=$(jq -r '.id' step.json)
curl -X PATCH "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "paused" }'
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Merchant Watch",
    "slug": "merchant_watch_update",
    "kind": "list",
    "entity_kinds": [
      "domain"
    ]
  }),
})).json();
const providerId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers/${providerId}`, {
  method: "PATCH",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "status": "paused" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Merchant Watch",
    "slug": "merchant_watch_update",
    "kind": "list",
    "entity_kinds": [
        "domain"
    ]
}).json()
provider_id = step1["id"]
data = httpx.patch(f"{api}/v1/mandate/risk_providers/{provider_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "status": "paused"
}).json()
```

### Response 200

```json
{
  "object": "risk_provider",
  "id": "rpv_01M6VQBCK1RSTTV4DGJXSM61G4",
  "name": "Merchant Watch",
  "slug": "merchant_watch_update",
  "kind": "list",
  "entity_kinds": [
    "domain"
  ],
  "status": "paused",
  "health": "ok",
  "lookup_url": null,
  "secret_set": false,
  "timeout_ms": null,
  "cache_ttl_seconds": null,
  "list_url": null,
  "push_key_id": null,
  "last_sync_at": null,
  "last_error": null,
  "last_error_at": null,
  "verdict_count": 0,
  "recent_hits": [],
  "created_at": "2026-11-07T19:21:46.337Z",
  "updated_at": "2026-11-07T19:21:46.337Z"
}
```

## List risk providers

`GET /v1/mandate/risk_providers`

The account's risk providers, oldest first, each with its status, last sync, verdict count and its three most recent hits.

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. |

### Returns

A page of providers.

### 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 "$PROVENANCE_API/v1/mandate/risk_providers" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  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/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "risk_provider",
      "id": "rpv_01M6VQBCJYTTVWF05W2H0D89KK",
      "name": "Lumen Threat Intel",
      "slug": "lumen_threat_intel",
      "kind": "push",
      "entity_kinds": [
        "domain",
        "origin"
      ],
      "status": "active",
      "health": "ok",
      "lookup_url": null,
      "secret_set": false,
      "timeout_ms": null,
      "cache_ttl_seconds": null,
      "list_url": null,
      "push_key_id": "key_5XCC3E4ATW856TX3XY6Z9KGS9Q",
      "last_sync_at": null,
      "last_error": null,
      "last_error_at": null,
      "verdict_count": 0,
      "recent_hits": [],
      "created_at": "2026-11-07T19:21:46.334Z",
      "updated_at": "2026-11-07T19:21:46.334Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List risk verdicts

`GET /v1/mandate/risk_signals`

The account's own unexpired verdicts above `none`, newest first. `entity` filters by one entity (its kind inferred, or set with `entity_kind`).

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `entity` | query | string | no | A domain, origin, agent id or other entity value. |
| `entity_kind` | query | enum | no | The kind of `entity`. One of `domain`, `origin`, `agent`, `agent_key`, `account`, `email_domain`. |
| `provider_id` | query | string | no | One provider's verdicts. |
| `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. |

### Returns

A page of verdicts.

### 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/mandate/risk_providers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lumen Threat Intel",
    "slug": "lumen_list",
    "kind": "push",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }' > step.json
export PUSH_KEY=$(jq -r '.push_key' step.json)
export PROVIDER_ID=$(jq -r '.id' step.json)
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"
      }
    ]
  }' > /dev/null
curl "$PROVENANCE_API/v1/mandate/risk_signals?entity=https%3A%2F%2Flogin-lumen.example" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Lumen Threat Intel",
    "slug": "lumen_list",
    "kind": "push",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }),
})).json();
const pushKey = step1.push_key;
const providerId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "signals": [
      {
        "entity": {
          "kind": "origin",
          "value": "https://login-lumen.example"
        },
        "risk": "high",
        "categories": [
          "phishing"
        ],
        "observed_at": "2026-10-27T09:00:00Z"
      }
    ]
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals?entity=https%3A%2F%2Flogin-lumen.example`, {
  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/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Lumen Threat Intel",
    "slug": "lumen_list",
    "kind": "push",
    "entity_kinds": [
        "domain",
        "origin"
    ]
}).json()
push_key = step1["push_key"]
provider_id = step1["id"]
step2 = httpx.post(f"{api}/v1/mandate/risk_signals", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "signals": [
        {
            "entity": {
                "kind": "origin",
                "value": "https://login-lumen.example"
            },
            "risk": "high",
            "categories": [
                "phishing"
            ],
            "observed_at": "2026-10-27T09:00:00Z"
        }
    ]
}).json()
data = httpx.get(f"{api}/v1/mandate/risk_signals?entity=https%3A%2F%2Flogin-lumen.example", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "risk_signal",
      "id": "rsg_01M6VQBCK9D6Q65Y1RCS1988VA",
      "provider_id": "rpv_01M6VQBCK90Y3BWYPTSNTVT5HB",
      "entity": {
        "kind": "origin",
        "value": "https://login-lumen.example"
      },
      "risk": "high",
      "categories": [
        "phishing"
      ],
      "observed_at": "2026-10-27T09:00:00.000Z",
      "expires_at": "2026-12-07T19:21:46.345Z",
      "reference": null,
      "source": "push",
      "match_count": 0,
      "last_matched_at": null,
      "created_at": "2026-11-07T19:21:46.345Z",
      "updated_at": "2026-11-07T19:21:46.345Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## Remove a risk provider

`DELETE /v1/mandate/risk_providers/{id}`

Removes the provider with its verdicts and hits, and revokes its push key.

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

### Parameters

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

### Returns

The deleted provider.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`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/mandate/risk_providers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Old Feed",
    "slug": "old_feed",
    "kind": "list",
    "entity_kinds": [
      "domain"
    ]
  }' > step.json
export PROVIDER_ID=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Old Feed",
    "slug": "old_feed",
    "kind": "list",
    "entity_kinds": [
      "domain"
    ]
  }),
})).json();
const providerId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers/${providerId}`, {
  method: "DELETE",
  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/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Old Feed",
    "slug": "old_feed",
    "kind": "list",
    "entity_kinds": [
        "domain"
    ]
}).json()
provider_id = step1["id"]
data = httpx.delete(f"{api}/v1/mandate/risk_providers/{provider_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "rpv_01M6VQBCK2S7CMPF87AEHXQZ9T",
  "object": "risk_provider",
  "deleted": true
}
```

## Delete a risk verdict

`DELETE /v1/mandate/risk_signals/{id}`

Drops one verdict. The provider may send it again.

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

### Parameters

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

### Returns

The deleted verdict.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`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/mandate/risk_providers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lumen Threat Intel",
    "slug": "lumen_delete",
    "kind": "push",
    "entity_kinds": [
      "domain"
    ]
  }' > step.json
export PUSH_KEY=$(jq -r '.push_key' step.json)
export PROVIDER_ID=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/mandate/risk_signals" \
  -H "Authorization: Bearer $PUSH_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "signals": [
      {
        "entity": {
          "kind": "domain",
          "value": "shell-shop.example"
        },
        "risk": "medium"
      }
    ]
  }' > /dev/null
curl -s "$PROVENANCE_API/v1/mandate/risk_signals?entity=shell-shop.example" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export SIGNAL_ID=$(jq -r '.data[0].id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/mandate/risk_signals/$SIGNAL_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Lumen Threat Intel",
    "slug": "lumen_delete",
    "kind": "push",
    "entity_kinds": [
      "domain"
    ]
  }),
})).json();
const pushKey = step1.push_key;
const providerId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "signals": [
      {
        "entity": {
          "kind": "domain",
          "value": "shell-shop.example"
        },
        "risk": "medium"
      }
    ]
  }),
})).json();
const step3 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals?entity=shell-shop.example`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const signalId = step3.data[0].id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals/${signalId}`, {
  method: "DELETE",
  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/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Lumen Threat Intel",
    "slug": "lumen_delete",
    "kind": "push",
    "entity_kinds": [
        "domain"
    ]
}).json()
push_key = step1["push_key"]
provider_id = step1["id"]
step2 = httpx.post(f"{api}/v1/mandate/risk_signals", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "signals": [
        {
            "entity": {
                "kind": "domain",
                "value": "shell-shop.example"
            },
            "risk": "medium"
        }
    ]
}).json()
step3 = httpx.get(f"{api}/v1/mandate/risk_signals?entity=shell-shop.example", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
signal_id = step3["data"][0]["id"]
data = httpx.delete(f"{api}/v1/mandate/risk_signals/{signal_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "id": "rsg_01M6VQBCKBYSTTJ1A2TFC4ZZPQ",
  "object": "risk_signal",
  "deleted": true
}
```

## Rotate a push secret

`POST /v1/mandate/risk_providers/{id}/rotate_secret`

Issues a new push key in `push_key` (shown once) and revokes the old one at once.

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

### Parameters

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

### Returns

The provider with its new key. See [the risk provider object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_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)
- [`risk_provider_invalid`](https://provenanceauth.com/docs/platform/errors.md#risk_provider_invalid)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
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_rotate",
    "kind": "push",
    "entity_kinds": [
      "domain"
    ]
  }' > step.json
export PROVIDER_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID/rotate_secret" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Lumen Threat Intel",
    "slug": "lumen_rotate",
    "kind": "push",
    "entity_kinds": [
      "domain"
    ]
  }),
})).json();
const providerId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers/${providerId}/rotate_secret`, {
  method: "POST",
  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/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Lumen Threat Intel",
    "slug": "lumen_rotate",
    "kind": "push",
    "entity_kinds": [
        "domain"
    ]
}).json()
provider_id = step1["id"]
data = httpx.post(f"{api}/v1/mandate/risk_providers/{provider_id}/rotate_secret", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "risk_provider",
  "id": "rpv_01M6VQBCK3GY9KRZ6H0G332VYV",
  "name": "Lumen Threat Intel",
  "slug": "lumen_rotate",
  "kind": "push",
  "entity_kinds": [
    "domain"
  ],
  "status": "active",
  "health": "ok",
  "lookup_url": null,
  "secret_set": false,
  "timeout_ms": null,
  "cache_ttl_seconds": null,
  "list_url": null,
  "push_key_id": "key_5PFT06F21Z9Z5A9YWYG7AF22M0",
  "last_sync_at": null,
  "last_error": null,
  "last_error_at": null,
  "created_at": "2026-11-07T19:21:46.339Z",
  "updated_at": "2026-11-07T19:21:46.339Z",
  "push_key": "prv_test_ZC8BqByiIGvqG8ms32y1B1gOU494EA7w1DAuJH"
}
```

## Upload a risk list

`POST /v1/mandate/risk_providers/{id}/list`

Uploads a CSV (header `entity_kind,entity_value,risk,categories,observed_at,expires_at,reference`; categories split by `|`) or JSON list of up to 10,000 verdicts. It replaces the provider's last list.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The provider's ID (`rpv_…`). |
| `format` | body | enum | yes | The list format. One of `csv`, `json`. |
| `content` | body | string | yes | The list (JSON: an array of verdicts, or `{ "signals": [...] }`). |

### Returns

What the upload kept.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_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)
- [`risk_provider_invalid`](https://provenanceauth.com/docs/platform/errors.md#risk_provider_invalid)
- [`risk_signal_invalid`](https://provenanceauth.com/docs/platform/errors.md#risk_signal_invalid)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/risk_providers" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Merchant Watch",
    "slug": "merchant_watch_list",
    "kind": "list",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }' > step.json
export PROVIDER_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID/list" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "csv",
    "content": "entity_kind,entity_value,risk,categories\ndomain,shell-shop.example,high,shell_site\norigin,https://login-lumen.example,critical,phishing|impersonation"
  }'
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Merchant Watch",
    "slug": "merchant_watch_list",
    "kind": "list",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }),
})).json();
const providerId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers/${providerId}/list`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "format": "csv",
    "content": "entity_kind,entity_value,risk,categories\ndomain,shell-shop.example,high,shell_site\norigin,https://login-lumen.example,critical,phishing|impersonation"
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Merchant Watch",
    "slug": "merchant_watch_list",
    "kind": "list",
    "entity_kinds": [
        "domain",
        "origin"
    ]
}).json()
provider_id = step1["id"]
data = httpx.post(f"{api}/v1/mandate/risk_providers/{provider_id}/list", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "format": "csv",
    "content": "entity_kind,entity_value,risk,categories\ndomain,shell-shop.example,high,shell_site\norigin,https://login-lumen.example,critical,phishing|impersonation"
}).json()
```

### Response 200

```json
{
  "object": "risk_signal_batch",
  "provider_id": "rpv_01M6VQBCK44EHQM4N5Q2C9YZKY",
  "accepted": 2,
  "rejected": 0,
  "errors": []
}
```

## Sync a risk list now

`POST /v1/mandate/risk_providers/{id}/sync`

Fetches a list provider's `list_url` now (it is also fetched daily) and replaces its last list. HTTPS only, no private addresses, 10 seconds, 4 MB.

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

### Parameters

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

### Returns

What the sync kept.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_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)
- [`risk_provider_invalid`](https://provenanceauth.com/docs/platform/errors.md#risk_provider_invalid)
- [`risk_signal_invalid`](https://provenanceauth.com/docs/platform/errors.md#risk_signal_invalid)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/mandate/risk_providers/rpv_01M5XPDJXQR46KYMS99XT98SBT/sync" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers/rpv_01M5XPDJXQR46KYMS99XT98SBT/sync`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/risk_providers/rpv_01M5XPDJXQR46KYMS99XT98SBT/sync", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```

### Response 200

```json
{
  "object": "risk_signal_batch",
  "provider_id": "rpv_01M5XPDJXQR46KYMS99XT98SBT",
  "accepted": 1840,
  "rejected": 2,
  "errors": [
    {
      "index": 17,
      "code": "risk_signal_invalid",
      "param": "entity.value",
      "message": "isn't a valid domain"
    },
    {
      "index": 903,
      "code": "risk_signal_invalid",
      "param": "risk",
      "message": "must be none, low, medium, high or critical"
    }
  ]
}
```

## Push risk verdicts

`POST /v1/mandate/risk_signals`

A provider sends up to 1,000 verdicts with its push key (scope `risk_signals:write`). Each is checked on its own: valid ones are kept and invalid ones come back in `errors`. A later verdict for the same entity replaces the earlier one.

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). |
| `signals` | body | array of objects | yes | The verdicts. |
| `signals.entity` | body | object | yes | What a verdict is about. Values are normalized: a lower-case host, an origin's `scheme://host[:port]`, an agent id as issued, a key's JWK thumbprint. |
| `signals.entity.kind` | body | enum | no | The entity kind. One of `domain`, `origin`, `agent`, `agent_key`, `account`, `email_domain`. |
| `signals.entity.value` | body | string | no | The normalized value. |
| `signals.risk` | body | enum | yes | The provider's risk level. One of `none`, `low`, `medium`, `high`, `critical`. |
| `signals.categories` | body | array of strings | no | Any of phishing, impersonation, fraud, compromised, shell_site, laundering, malware, spam, other. |
| `signals.observed_at` | body | timestamp | no | When the provider observed it (default now). |
| `signals.expires_at` | body | timestamp | no | When it stops applying (default 30 days). |
| `signals.reference` | body | string | no | The provider's own reference, up to 512 characters. |

### Returns

What the push kept.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`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)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`risk_provider_invalid`](https://provenanceauth.com/docs/platform/errors.md#risk_provider_invalid)
- [`risk_signal_invalid`](https://provenanceauth.com/docs/platform/errors.md#risk_signal_invalid)

### Request

**curl**

```bash
curl -s -X POST "$PROVENANCE_API/v1/mandate/risk_providers" \
  -H "Authorization: Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lumen Threat Intel",
    "slug": "lumen_push",
    "kind": "push",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }' > step.json
export PUSH_KEY=$(jq -r '.push_key' step.json)
export PROVIDER_ID=$(jq -r '.id' step.json)
curl -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",
        "reference": "case-4821"
      },
      {
        "entity": {
          "kind": "domain",
          "value": "shell-shop.example"
        },
        "risk": "medium",
        "categories": [
          "shell_site"
        ]
      }
    ]
  }'
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" > /dev/null
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Lumen Threat Intel",
    "slug": "lumen_push",
    "kind": "push",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }),
})).json();
const pushKey = step1.push_key;
const providerId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "signals": [
      {
        "entity": {
          "kind": "origin",
          "value": "https://login-lumen.example"
        },
        "risk": "high",
        "categories": [
          "phishing"
        ],
        "observed_at": "2026-10-27T09:00:00Z",
        "reference": "case-4821"
      },
      {
        "entity": {
          "kind": "domain",
          "value": "shell-shop.example"
        },
        "risk": "medium",
        "categories": [
          "shell_site"
        ]
      }
    ]
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Lumen Threat Intel",
    "slug": "lumen_push",
    "kind": "push",
    "entity_kinds": [
        "domain",
        "origin"
    ]
}).json()
push_key = step1["push_key"]
provider_id = step1["id"]
data = httpx.post(f"{api}/v1/mandate/risk_signals", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "signals": [
        {
            "entity": {
                "kind": "origin",
                "value": "https://login-lumen.example"
            },
            "risk": "high",
            "categories": [
                "phishing"
            ],
            "observed_at": "2026-10-27T09:00:00Z",
            "reference": "case-4821"
        },
        {
            "entity": {
                "kind": "domain",
                "value": "shell-shop.example"
            },
            "risk": "medium",
            "categories": [
                "shell_site"
            ]
        }
    ]
}).json()
```

### Response 200

```json
{
  "object": "risk_signal_batch",
  "provider_id": "rpv_01M6VQBCK6AGMPPGC9HK6SZSYZ",
  "accepted": 2,
  "rejected": 0,
  "errors": []
}
```

## Test a risk lookup

`POST /v1/mandate/risk_signals/test`

Asks every provider about one entity now (lookups live, without the cache) and returns each answer, the facts a rule would see and the rule on external risk that would fire. Pro and above.

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `entity` | body | string \| object | yes | A value (its kind inferred: `agt_…` an agent, a URL an origin, an email an email domain, else a domain) or `{ kind, value }`. |
| `entity.kind` | body | enum | no | The entity kind. One of `domain`, `origin`, `agent`, `agent_key`, `account`, `email_domain`. |
| `entity.value` | body | string | no | The normalized value. |

### Returns

Each provider's answer and the rule that would fire.

### 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)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_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 -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_test",
    "kind": "push",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }' > step.json
export PUSH_KEY=$(jq -r '.push_key' step.json)
export PROVIDER_ID=$(jq -r '.id' step.json)
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"
      }
    ]
  }' > /dev/null
curl -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" }'
curl -s -X DELETE "$PROVENANCE_API/v1/mandate/risk_providers/$PROVIDER_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_providers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Lumen Threat Intel",
    "slug": "lumen_test",
    "kind": "push",
    "entity_kinds": [
      "domain",
      "origin"
    ]
  }),
})).json();
const pushKey = step1.push_key;
const providerId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "signals": [
      {
        "entity": {
          "kind": "origin",
          "value": "https://login-lumen.example"
        },
        "risk": "high",
        "categories": [
          "phishing"
        ],
        "observed_at": "2026-10-27T09:00:00Z"
      }
    ]
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/risk_signals/test`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "entity": "https://login-lumen.example" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/risk_providers", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "name": "Lumen Threat Intel",
    "slug": "lumen_test",
    "kind": "push",
    "entity_kinds": [
        "domain",
        "origin"
    ]
}).json()
push_key = step1["push_key"]
provider_id = step1["id"]
step2 = httpx.post(f"{api}/v1/mandate/risk_signals", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "signals": [
        {
            "entity": {
                "kind": "origin",
                "value": "https://login-lumen.example"
            },
            "risk": "high",
            "categories": [
                "phishing"
            ],
            "observed_at": "2026-10-27T09:00:00Z"
        }
    ]
}).json()
data = httpx.post(f"{api}/v1/mandate/risk_signals/test", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "entity": "https://login-lumen.example"
}).json()
```

### Response 200

```json
{
  "object": "risk_signal_test",
  "entity": {
    "kind": "origin",
    "value": "https://login-lumen.example"
  },
  "entities": [
    {
      "kind": "origin",
      "value": "https://login-lumen.example"
    },
    {
      "kind": "domain",
      "value": "login-lumen.example"
    }
  ],
  "external_risk": "high",
  "categories": [
    "phishing"
  ],
  "providers_flagging": 1,
  "providers": [
    {
      "id": "rpv_01M6VQBCJYTTVWF05W2H0D89KK",
      "name": "Lumen Threat Intel",
      "slug": "lumen_threat_intel",
      "kind": "push",
      "status": "no_verdict",
      "risk": "none",
      "categories": [],
      "verdicts": [],
      "duration_ms": null
    },
    {
      "id": "rpv_01M6VQBCKC27CT7GHDT8XCFXAG",
      "name": "Lumen Threat Intel",
      "slug": "lumen_test",
      "kind": "push",
      "status": "verdict",
      "risk": "high",
      "categories": [
        "phishing"
      ],
      "verdicts": [
        {
          "entity": {
            "kind": "origin",
            "value": "https://login-lumen.example"
          },
          "risk": "high",
          "categories": [
            "phishing"
          ],
          "observed_at": "2026-10-27T09:00:00.000Z",
          "reference": null
        }
      ],
      "duration_ms": null
    }
  ],
  "facts": {
    "counterparty.external_risk": "high",
    "counterparty.external_categories": [
      "phishing"
    ],
    "counterparty.external_providers_flagging": 1,
    "external.lumen_threat_intel.risk": "none",
    "external.lumen_test.risk": "high"
  },
  "rule": null,
  "policy_version": null
}
```
