Decisions API
approve / deny / review evaluation and decision payloads (Events API uses ALLOW/REVIEW/BLOCK).
Decisions API
The Decisions API evaluates risk in real time and supports search and reporting for historical outcomes.
Auth: x-api-key is required for all endpoints on this page.
Endpoints
POST /api/v1/decisions/evaluateGET /api/v1/decisions/:idGET /api/v1/decisionsGET /api/v1/decisions/stats
Evaluate Decision
POST
/api/v1/decisions/evaluateRequest
{
"eventName": "payment.attempt",
"eventCategory": "TRANSACTION",
"customer": {
"externalId": "cust_123456",
"email": "user@example.com"
},
"device": {
"externalId": "device_abc123",
"fingerprint": "fp_xyz789"
},
"ip": "203.0.113.42",
"userAgent": "Mozilla/5.0 ...",
"metadata": {
"amount": 199.95,
"currency": "USD"
}
}Response
{
"decision": "review",
"riskScore": 68,
"riskLevel": "high",
"reasonCodes": [
{
"code": "HIGH_RISK_IP",
"explanation": "IP address has elevated fraud history"
}
],
"correlationIds": {
"requestId": "req_abc123xyz",
"eventId": "evt_ckm9876543210",
"customerId": "cus_123456",
"deviceFingerprint": "fp_xyz789"
},
"ruleVersion": {
"version": "v1.2.3"
},
"recommendedActions": [
{
"action": "STEP_UP_VERIFICATION",
"description": "Require OTP challenge"
}
],
"evaluatedAt": "2026-04-16T10:30:00.000Z"
}Decision enum
Lowercase vocabulary mapped from internal ALLOW/BLOCK/REVIEW. The Events API still returns uppercase values.
approvedenyreview
Get Decision by ID
GET
/api/v1/decisions/:idResponse includes:
- input summary (
inputs) - output/rule details (
outputs) - linked entities (
linkedEntities)
List Decisions
GET
/api/v1/decisionsKey query params:
page,limitdecision,minScore,maxScore,riskLevelcustomer,device,countryfrom,to(Unix timestamp seconds)searchsortBy(evaluatedAt,riskScore,decision),sortOrder
Example
GET /api/v1/decisions?decision=deny&minScore=60&from=1711833600&page=1&limit=50
Decision Stats
GET
/api/v1/decisions/statsOptional query:
from(Unix timestamp seconds)to(Unix timestamp seconds)
Response contains aggregate totals, rates, top reason codes, and time buckets.
Integration Notes
- Keep
correlationIds.eventIdfor subsequent lookup and support investigation. - Send stable
eventNametaxonomy (payment.attempt,user.login,checkout.submit) to keep analytics clean. - Handle
429and5xxwith bounded retries and backoff.