Your first decision
Create an account, send Flit one login, and read what it says. You need curl, or Node 18, or Python with requests.
1. Create an account
The quickest way is the console: create an account, and copy the test API key from the screen that follows. Then skip to step 2.
To do it from a terminal, set the host once and sign up. Use an email you can open, because Flit sends a verification link to it.
export FLIT=https://api.agentflit.com
curl -s -X POST "$FLIT/api/v1/auth/signup" \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"password": "a long passphrase you chose",
"organization": "Example Ltd"
}'const response = await fetch(`${process.env.FLIT}/api/v1/auth/signup`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"email": "[email protected]",
"password": "a long passphrase you chose",
"organization": "Example Ltd"
}),
});
const { data, errors } = await response.json();import os
import requests
response = requests.post(
f"{os.environ['FLIT']}/api/v1/auth/signup",
json={
"email": "[email protected]",
"password": "a long passphrase you chose",
"organization": "Example Ltd",
},
)
data = response.json()["data"]{
"data": {
"application": {
"id": "16c1170a-b23b-4ad5-9165-1e3fae19d387",
"mode": "test",
"application": {
"id": "c589288a-a91c-44c2-854c-91e71a68e4ca",
"name": "Example Ltd"
}
},
"api_key": "flit_sk_test_4pQ…shown once",
"secret_key": "9f2c…shown once",
"tokens": {
"access": "eyJ…"
}
}
}The whole answer
{
"data": {
"user": {
"id": "ada5df04-28aa-4e5b-9b8b-a957a404bfe8",
"email": "[email protected]",
"email_verified": false
},
"organization": {
"id": "7bc5dce7-6417-44bd-86d1-19863bf8351b",
"name": "Example Ltd"
},
"application": {
"id": "16c1170a-b23b-4ad5-9165-1e3fae19d387",
"name": "Example Ltd sandbox",
"application": {
"id": "c589288a-a91c-44c2-854c-91e71a68e4ca",
"name": "Example Ltd"
},
"mode": "test",
"environment": "sandbox",
"enforcement": "enforcing",
"collect_key": "flit_pk_1_8hgVyd2CSTQXmY-M6pKFUFw4gbUv9O",
"contributes_to_network": false,
"consumes_network": false,
"created_at": "2026-12-02T18:59:28.743025Z"
},
"api_key": "flit_sk_test_4pQ…shown once",
"secret_key": "9f2c…shown once",
"tokens": {
"access": "eyJ…",
"refresh": "eyJ…"
}
},
"errors": []
}Two values in that answer are shown once and cannot be read back: api_key and secret_key. Flit keeps a digest of the key and an encrypted copy of the secret. Put the key and the application's id where your server keeps its secrets, and in your shell for the rest of this page:
export APP=… # data.application.id
export KEY=… # data.api_key, begins flit_sk_test_
Your application is in test mode. It makes real decisions with the same rules as production, over traffic you make up, and nothing in it reaches anyone else. It allows 1,000 decisions a day.
2. Ask about a login
When one of your users signs in, tell Flit: who (client_id, your own id for the account), what (action), and where from. Flit only ever hears from your server, so it cannot see the user's address or browser unless you pass them on. Always send ip_address and user_agent.
curl -s -X POST "$FLIT/api/v1/applications/$APP/audit-authentication" \
-H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' \
-d '{
"id": "login_1001",
"client_id": "user_42",
"action": "login",
"status": "success",
"ip_address": "81.2.69.160",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
}'const response = await fetch(`${process.env.FLIT}/api/v1/applications/${process.env.APP}/audit-authentication`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"id": "login_1001",
"client_id": "user_42",
"action": "login",
"status": "success",
"ip_address": "81.2.69.160",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
}),
});
const { data, errors } = await response.json();import os
import requests
response = requests.post(
f"{os.environ['FLIT']}/api/v1/applications/{os.environ['APP']}/audit-authentication",
headers={"Authorization": f"Bearer {os.environ['KEY']}"},
json={
"id": "login_1001",
"client_id": "user_42",
"action": "login",
"status": "success",
"ip_address": "81.2.69.160",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
},
)
data = response.json()["data"]{
"data": {
"audit_id": "bea7f0b5-b912-4569-abf1-d2a8824417e8",
"risk_score": 0.0,
"risk_level": "low",
"verdict": "allow",
"should_block": false,
"should_challenge": false,
"should_review": false,
"recommendation": "ALLOW: Low risk. Proceed with standard processing.",
"confidence": 0.5,
"factors": []
},
"errors": []
}The whole answer
{
"data": {
"audit_id": "bea7f0b5-b912-4569-abf1-d2a8824417e8",
"device_id": null,
"identity": {
"rungs": [
"ip"
],
"coverage": 0.15,
"missing": [
"device",
"email_root",
"asn"
],
"strongest": "ip"
},
"risk_score": 0.0,
"risk_level": "low",
"rules": [
"IPReputationRule",
"BotSignalRule",
"NetworkReputationRule",
"ChallengeEvasionRule",
"ChallengePassedRule",
"MultiAccountingRule",
"AccountSharingRule",
"AccountFarmingRule",
"ResetToLoginRule",
"AutomatedCredentialActionRule",
"CredentialResetStormRule",
"SessionShapeRule",
"BlockStreakRule",
"ProbingSessionRule",
"CredentialSprayRule"
],
"reasons": [],
"enforcement": "enforcing",
"verdict": "allow",
"should_block": false,
"should_challenge": false,
"should_review": false,
"would_block": false,
"would_challenge": false,
"recommendation": "ALLOW: Low risk. Proceed with standard processing.",
"confidence": 0.5,
"coverage": 0.15,
"factors": [],
"degraded": [],
"disabled_rules": [],
"policy_matches": {},
"block_streak": 0,
"shadow": [],
"hook": null,
"challenge": null,
"step_up_method": null,
"agent": null
},
"errors": []
}That is a decision. Nothing about this login looked wrong, so verdict is allow: let the user in.
3. Send one it will refuse
Now the same call from something that is not a browser. Scripts that try stolen passwords announce themselves in their user agent more often than you would expect.
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"
}'const response = await fetch(`${process.env.FLIT}/api/v1/applications/${process.env.APP}/audit-authentication`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"id": "login_1002",
"client_id": "user_77",
"action": "login",
"status": "success",
"ip_address": "81.2.69.160",
"user_agent": "python-requests/2.31.0"
}),
});
const { data, errors } = await response.json();import os
import requests
response = requests.post(
f"{os.environ['FLIT']}/api/v1/applications/{os.environ['APP']}/audit-authentication",
headers={"Authorization": f"Bearer {os.environ['KEY']}"},
json={
"id": "login_1002",
"client_id": "user_77",
"action": "login",
"status": "success",
"ip_address": "81.2.69.160",
"user_agent": "python-requests/2.31.0",
},
)
data = response.json()["data"]{
"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": []
}verdict is block, and factors says why in two words: the user agent belongs to an HTTP library, and a credential action came from automation. reasons carries the same findings with the detail behind each. The next page goes through every field.
4. Act on it
In your login handler, the whole integration is this:
decision = ask Flit about the login
switch decision.verdict:
block refuse the login
challenge ask for a second factor, then let them in
otherwise let them in
And decide now what happens when Flit cannot be reached, because one day it will not be. For a login, most teams let the user in and carry on. For money leaving, most refuse: no decision, no payout.
What else to send
Flit scores a session, not a single event, so it gets sharper with each kind of event you send it. There are four endpoints, all with the same answer:
| Endpoint | Send it when |
|---|---|
audit-authentication | A login, a failed login, a password reset requested or completed, a change of email, phone or second factor. |
audit-registration | Someone signs up. |
audit-transaction | Money moves: every credit and debit, payouts included. |
audit-client | Anything else that matters, including the requests your own API refused. |
The fields each one takes are in the API reference.