Siftil Documentation PT Sign in Create free account

Labels and your own model

The default score is the same for everyone. What fraud looks like in an electronics store is not what it looks like in a healthcare SaaS. With labels, your account trains its own model that learns which reasons matter in your traffic.

How to label

When you confirm that a signup, order or login was fraud (chargeback, repeated trial account, scam), or that a suspicious case was legitimate:

bash
curl -X POST https://siftil.com/v1/events/REQUEST_ID/label \
  -H 'authorization: Bearer sk_…' -H 'content-type: application/json' \
  -d '{"fraud": true}'

That is why it pays to store the requestId next to the signup or order in your database.

You can also label in the dashboard: open the event and click Marcar como fraude (fraud) or Marcar como legítimo (legitimate).

When the model kicks in

What it returns

On every new event, suspect.learned is the fraud probability (0 to 1) according to your model, and suspect.model carries { n, auc }:

js
const e = await getEvent(requestId)
if (e.suspect.learned !== null && e.suspect.learned > 0.8) return block()

How it works

Logistic regression over the score's reasons (the same as in Signals), with L2 regularization. Simple on purpose: it trains in milliseconds, does not memorize a handful of examples, and the weights make sense to a human. GET /v1/model shows the learned weights.

Good practice

Siftil · API v1 documentation