FlitDocs

Read the answer

Every decision has the same fields, whichever event you sent. One of them tells your code what to do. The rest tell a person why.

This is the refused login from the previous page, which is used as the example throughout.

POST /api/v1/applications/$APP/audit-authentication
curl -s -X POST "$FLIT/api/v1/applications/$APP/audit-authentication" \
  -H "Authorization: Bearer $KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "login_1002",
    "client_id": "user_77",
    "action": "login",
    "status": "success",
    "ip_address": "81.2.69.160",
    "user_agent": "python-requests/2.31.0"
  }'
200 Answer the fields this page talks about
{
  "data": {
    "audit_id": "8a24e0b2-b0ff-4071-92c9-5533122b4fb1",
    "risk_score": 0.714,
    "risk_level": "critical",
    "verdict": "block",
    "should_block": true,
    "should_challenge": false,
    "should_review": true,
    "recommendation": "BLOCK: High-risk activity detected. Recommend blocking transaction and triggering manual review.",
    "confidence": 0.7,
    "coverage": 0.15,
    "identity": {
      "rungs": [
        "ip"
      ],
      "coverage": 0.15,
      "missing": [
        "device",
        "email_root",
        "asn"
      ],
      "strongest": "ip"
    },
    "factors": [
      "bot_detected:http_client",
      "automated_credential_action"
    ],
    "reasons": [
      {
        "code": "bot_detected:http_client",
        "path": "user_agent",
        "context": {
          "rule": "BotSignalRule",
          "score": 0.9,
          "signals": [
            "known_bot_pattern:python-requests"
          ],
          "user_agent": "python-requests/2.31.0",
          "source": "user_agent"
        },
        "text": "User agent looks automated (http_client)"
      },
      {
        "code": "automated_credential_action",
        "path": "user_agent",
        "context": {
          "rule": "AutomatedCredentialActionRule",
          "history_independent": true,
          "severity": 0.75,
          "action": "login",
          "bot_type": "http_client",
          "bot_signals": [
            "known_bot_pattern:python-requests"
          ],
          "datacenter": false,
          "asn_org": null,
          "ip_address": "81.2.69.160",
          "second_factor": null,
          "user_agent": "python-requests/2.31.0"
        },
        "text": "login performed by http_client"
      }
    ],
    "degraded": []
  },
  "errors": []
}
The whole answer
{
  "data": {
    "audit_id": "8a24e0b2-b0ff-4071-92c9-5533122b4fb1",
    "device_id": null,
    "identity": {
      "rungs": [
        "ip"
      ],
      "coverage": 0.15,
      "missing": [
        "device",
        "email_root",
        "asn"
      ],
      "strongest": "ip"
    },
    "risk_score": 0.714,
    "risk_level": "critical",
    "rules": [
      "IPReputationRule",
      "BotSignalRule",
      "NetworkReputationRule",
      "ChallengeEvasionRule",
      "ChallengePassedRule",
      "MultiAccountingRule",
      "AccountSharingRule",
      "AccountFarmingRule",
      "ResetToLoginRule",
      "AutomatedCredentialActionRule",
      "CredentialResetStormRule",
      "SessionShapeRule",
      "BlockStreakRule",
      "ProbingSessionRule",
      "CredentialSprayRule"
    ],
    "reasons": [
      {
        "code": "bot_detected:http_client",
        "path": "user_agent",
        "context": {
          "rule": "BotSignalRule",
          "score": 0.9,
          "signals": [
            "known_bot_pattern:python-requests"
          ],
          "user_agent": "python-requests/2.31.0",
          "source": "user_agent"
        },
        "text": "User agent looks automated (http_client)"
      },
      {
        "code": "automated_credential_action",
        "path": "user_agent",
        "context": {
          "rule": "AutomatedCredentialActionRule",
          "history_independent": true,
          "severity": 0.75,
          "action": "login",
          "bot_type": "http_client",
          "bot_signals": [
            "known_bot_pattern:python-requests"
          ],
          "datacenter": false,
          "asn_org": null,
          "ip_address": "81.2.69.160",
          "second_factor": null,
          "user_agent": "python-requests/2.31.0"
        },
        "text": "login performed by http_client"
      }
    ],
    "enforcement": "enforcing",
    "verdict": "block",
    "should_block": true,
    "should_challenge": false,
    "should_review": true,
    "would_block": true,
    "would_challenge": false,
    "recommendation": "BLOCK: High-risk activity detected. Recommend blocking transaction and triggering manual review.",
    "confidence": 0.7,
    "coverage": 0.15,
    "factors": [
      "bot_detected:http_client",
      "automated_credential_action"
    ],
    "degraded": [],
    "disabled_rules": [],
    "policy_matches": {},
    "block_streak": 1,
    "shadow": [],
    "hook": null,
    "challenge": null,
    "step_up_method": null,
    "agent": null
  },
  "errors": []
}

What to do

Switch on verdict. It is always one of four words.

block
Refuse Do not let it happen. Fail the login, decline the payout. Do not tell the caller it was a fraud check; a plain refusal gives an attacker nothing to tune against.
challenge
Step up Ask for more proof first. A second factor on a login, a liveness check or a one-time code on a payout. Let it through only if they pass.
review
Review Let it through; a person should look. Flit opens a case in the console's review queue, and the review happens after. If your own rules say a reviewed payout waits, hold it.
allow
Allow Carry on.

Treat a word you do not recognise as review, so a verdict added later cannot break your handler.

The three flags behind it

verdict is the strongest of three booleans, which stay in the answer: should_block, then should_challenge, then should_review. They are not exclusive. The refused login above is also marked for review, because someone should look at what was refused; verdict says block because that is the one to act on. Read the flags when you want to know both things, for instance to count how much reaches the review queue.

recommendation says the same as a sentence, for a log line or a support tool. Do not parse it.

Why

FieldWhat it tells you
factorsThe findings that counted towards this decision, as stable codes. Safe to store, count and alert on. A code may carry a qualifier after a colon: bot_detected:http_client.
reasonsThe same findings in full: the code, the field of your event it is about (path), a sentence (text), and the evidence (context). Show these to the person reviewing a case.
risk_scoreFrom 0 to 1. What the verdict is worked out from; you do not need to compare it to anything yourself.
risk_levellow, medium, high or critical. The score in a word, for dashboards.

How sure Flit is

A clean score means less when Flit could see little. Two fields say how much it had to go on.

FieldWhat it tells you
confidenceFrom 0 to 1. Higher when more findings agree and when Flit has seen this account before. Held at 0.3 or below when nothing identified who was behind the event.
coverageFrom 0 to 1. How much of who-is-this Flit could establish.
identityWhat that was built from. rungs lists what Flit had (here, only the address); missing lists what it did not. A device in missing means you are not yet sending the browser SDK's token, which is the single thing that raises coverage most.
degradedRules that failed or ran out of time, so did not count. Empty on a complete decision. If it is not empty on a payout, treat the answer with more caution.

In the example, coverage is 0.15: Flit had an IP address and nothing else. It still refused, because what it did see was conclusive. On a quiet-looking event with coverage that low, the honest reading is "nothing seen", not "nothing wrong".

Shadow fields

Two more fields matter once you are in live mode, which starts in shadow: would_block and would_challenge say what Flit would do if it were acting, while verdict never says block or challenge. Run in shadow covers them.

What to keep

Store audit_id beside your own record of the event. It is how you tell Flit later what the event turned out to be, how you find the decision in the console, and what to quote to support.