API Reference
/api/v1/policies
Manage fraud detection policies — custom rules, thresholds, and action overrides.
Policies let you define custom rules that override or augment the Bayesian fusion scoring. Configure per-action thresholds, velocity limits, geo-blocking, and automatic deny/allow lists.
List Policies
GET /api/v1/policiesbash
curl https://verifystack.io/api/v1/policies \
-H "X-API-Key: sk_live_xxxxxxxxx"Response
Policy listjson
{
"policies": [
{
"id": "pol_default",
"name": "Default Thresholds",
"status": "active",
"rules": [
{
"condition": "score >= 70",
"action": "deny",
"description": "Block high-risk requests"
},
{
"condition": "score >= 30 AND score < 70",
"action": "challenge",
"description": "Challenge medium-risk requests"
}
]
}
]
}Create a Policy
Creating policies requires a secret key (sk_).
POST /api/v1/policiesbash
curl -X POST https://verifystack.io/api/v1/policies \
-H "X-API-Key: sk_live_xxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Block Tor Exit Nodes",
"description": "Deny traffic from known Tor exit nodes",
"status": "active",
"rules": [
{
"condition": "signals.network.tor == true",
"action": "deny",
"description": "Block Tor traffic"
}
],
"actions": ["login", "checkout"],
"priority": 100
}'Policy Fields
| Field | Type | Description |
|---|---|---|
| name | string | Human-readable policy name |
| description | string | Description of what the policy does |
| status | string | "active", "shadow" (test mode), or "disabled" |
| rules | array | Conditions and actions (see below) |
| actions | string[] | Action types this policy applies to (e.g. ["login", "checkout"]) |
| priority | number | Evaluation order (higher = first) |
Shadow Mode
Policies in "shadow" mode are evaluated but don't affect the final decision. Use shadow mode to test new policies against live traffic before activating them. Shadow results appear in the dashboard and webhook payloads.