Core
API Reference
Scorift is a Fraud Detection API-as-a-Service. Every request must be authenticated with an Authorization: Bearer API key and use JSON bodies. The central endpoint is POST /v1/score: it evaluates your transaction metadata against your business rules and Scorift's adaptive risk context, then returns a single decision — approve, flag, or reject — plus the risk score and the signals that drove it.
What each endpoint does
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/score | Score an event and get a real-time risk decision. |
| GET | /v1/transactions/{id} | Retrieve a scored transaction by its trace id. |
| POST | /v1/rules | Create or update a rule. |
| GET | /v1/rules | List rules. |
| POST | /v1/cases/{id}/disposition | Set the outcome of a case. |
| POST | /v1/webhooks | Register a webhook endpoint. |
POST /v1/score
Submit transaction metadata for real-time evaluation. Only event is required — every additional attribute (amount, user_id, device_id, ip, email, geo, and any custom key) sharpens both the rule matches and the risk signals returned with the decision.
Request
{
"event": "payment.attempt",
"amount": 249.00,
"currency": "USD",
"user_id": "usr_18aQ2",
"ip": "203.0.113.42",
"device_id": "dvc_9f2c",
"email": "chris@example.com"
}Response
{
"score": 0.87,
"risk_level": "high",
"action": "reject",
"signals": ["velocity", "sim_swap", "geo_mismatch"],
"rules": ["r_high_value_new_device"],
"trace_id": "trc_01HBX7YQ",
"latency_ms": 42
}Fields
score— float — Risk score from 0.0 (safe) to 1.0 (fraud).risk_level— string —low,medium, orhigh.action— string — Binary decision your app should act on:approve,flag, orreject.signals— array — Risk signal codes that contributed most to the score.rules— array — IDs of your own rules that matched this event.trace_id— string — Stable identifier for this decision — join key for webhooks, case review, and audit logs.latency_ms— int — Server-side evaluation time for this request.
