PlatformXeDocs
Get API Key

Decisions Audit

Query the immutable audit trail of every rendered fraud verdict.

Every verdict the engine renders is recorded in fraud_decisions (append-only). The audit endpoints expose that trail for compliance, dispute resolution, and rule-tuning forensics.

Endpoints

MethodPathDescription
GET/api/v1/fraud/decisionsList decisions (filterable, paginated).
GET/api/v1/fraud/decisions/:idFetch a single decision by id.

Scope: fraud:audit Plan gate: Detection Pack addon Rate limit: 100 requests / hour (intentionally low to deter scraping)

List decisions

GET /api/v1/fraud/decisions

Query parameters

ParameterTypeDescription
subjectIdstringFilter by the subject's id.
actionstringFilter by action name.
resourceKindstringFilter by resource kind.
verdict"allow" | "review" | "step_up" | "block"Filter by verdict.
fromISO-8601 dateInclusive lower bound on decidedAt.
toISO-8601 dateInclusive upper bound on decidedAt.
limitnumber (1–100, default 50)Page size.
offsetnumber (default 0)Pagination offset.

Response

{
  "success": true,
  "data": {
    "decisions": [
      {
        "id": "dec_2j7yhq8wcs9...",
        "organizationId": "org_acme",
        "subjectId": "usr_001",
        "subjectKind": "user",
        "action": "transfer",
        "resourceId": "txn_8a91",
        "resourceKind": "transaction",
        "verdict": "allow",
        "score": 0,
        "reasons": [
          { "kind": "default", "code": "phase_6a_default_allow", "weight": 0, "detail": "..." }
        ],
        "context": { "ip": "[REDACTED]", "amount": { "value": 50000, "currency": "NGN" } },
        "ruleVersionsEvaluated": null,
        "shadow": false,
        "latencyMs": 4,
        "decidedAt": "2026-05-03T09:14:21.412Z"
      }
    ],
    "count": 1,
    "limit": 50,
    "offset": 0
  }
}

Field reference

FieldDescription
idDecision id; matches the decisionId returned by decide.
reasonsThe structured chain that produced the verdict.
contextThe non-PII subset of the request context. IPs and user-agents are stored as [REDACTED]; tenants can correlate with their own logs.
ruleVersionsEvaluatedWhich rule versions ran for this decision (populated from Phase 6B onward).
shadowtrue for shadow-decide calls.
latencyMsEngine latency only (excludes network).
decidedAtWhen the verdict was rendered.

Fetch a single decision

GET /api/v1/fraud/decisions/:id

Returns 404 if the decision does not exist or belongs to a different organization. There is no information leakage across tenants.

Response

{
  "success": true,
  "data": {
    "id": "dec_2j7yhq8wcs9...",
    "organizationId": "org_acme",
    "verdict": "allow",
    "...": "..."
  }
}
HTTPCodeCause
200Decision returned.
401UNAUTHORIZEDMissing or invalid API key.
402DETECTION_PACK_REQUIREDDetection Pack addon not enabled.
403FORBIDDENAPI key has no organization context.
404NOT_FOUNDDecision id unknown or belongs to a different org.
500INTERNAL_ERRORUnexpected engine failure.

Retention

Decision rows are retained for 90 days by default. ENTERPRISE-tier organizations can extend retention up to 7 years via contract addendum (see the Compliance Vault pack on the Fraud Detection overview).

The cron/data-retention cron evicts rows past their retention window — eviction is irreversible.

Async write semantics

The fraud_decisions row is written asynchronously by an Inngest durable function after the synchronous decide response is sent. In normal operation rows appear within a few seconds. If you query immediately after decide and miss your row, retry after a short backoff.