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

MethodPathPurpose
POST/v1/scoreScore an event and get a real-time risk decision.
GET/v1/transactions/{id}Retrieve a scored transaction by its trace id.
POST/v1/rulesCreate or update a rule.
GET/v1/rulesList rules.
POST/v1/cases/{id}/dispositionSet the outcome of a case.
POST/v1/webhooksRegister 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

  • scorefloat — Risk score from 0.0 (safe) to 1.0 (fraud).
  • risk_levelstringlow, medium, or high.
  • actionstring — Binary decision your app should act on: approve, flag, or reject.
  • signalsarray — Risk signal codes that contributed most to the score.
  • rulesarray — IDs of your own rules that matched this event.
  • trace_idstring — Stable identifier for this decision — join key for webhooks, case review, and audit logs.
  • latency_msint — Server-side evaluation time for this request.