API reference
Base URL https://fraudlens.io. Send X-Api-Key.
Score 0–100 (higher = cleaner). You choose allow / challenge / block.
Authentication
| Key | Prefix | Use |
|---|---|---|
| Publishable | fk_pk_ | Browser: create session + collect only |
| Secret | fk_sk_ | Server: assess, email, account, read session |
curl -s https://fraudlens.io/v1/account \
-H "X-Api-Key: fk_sk_…"
Also accepted: ?api_key=. Never call /v1/assess from the browser. Allow origins: PUT /v1/account/origins.
POST /v1/assess
Primary product call. Merge email + live network + dossier memory → score, action, chapters.
email, session_id, ip, user_id, watch_mode, policy, context, force_deep, browser.
Missing network → email/IP path still scores. Missing email → network-only when session present.
curl -s https://fraudlens.io/v1/assess \
-H "X-Api-Key: fk_sk_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"email": "user@shop.com",
"session_id": "ses_…",
"user_id": "usr_123",
"watch_mode": "new_only",
"policy": "balanced",
"context": { "flow": "signup" }
}'
Body fields
| Field | Type | Notes |
|---|---|---|
email | string | Optional if session/ip present |
session_id | string | From browser collect |
ip | string | Override exit IP (server-side) |
user_id | string | Stable id → dossier / ATO |
watch_mode | string | new_only (First-sync) · continuous (Always-on) |
policy | string | balanced · strict (overrides account preset) |
force_deep | bool | Bill 1 credit even if trusted revisit |
context.flow | string | signup · login · checkout · password_reset · payout |
registered_at | ISO8601 | Helps First-sync age window |
Response (core)
{
"ok": true,
"score": 72,
"action": "allow",
"raw_action": "allow",
"shadow_mode": false,
"reasons": [{ "code": "…", "weight": "medium", "message": "…" }],
"email": { "score": 80, "…" },
"network": { "score": 70, "signals": {}, "pillars": {} },
"billing": { "check_kind": "first_sync_deep", "billed_units": 1 },
"dossier": { "…" },
"timeline": [],
"profile": { "flags": [], "ato_suspicion": false },
"support": { "headline": "…", "findings": [] },
"policy": { "profile": "balanced", "allow_min": 60, "challenge_min": 35 }
}
action is what you should enforce (shadow may force allow). raw_action is the model recommendation before shadow.
Network session
Browser uses publishable key. Aliases: /v1/x create · /v1/x/{id}/c collect (adblock-friendlier).
| Method | Path | Key | Credits |
|---|---|---|---|
| POST | /v1/network/sessions | pk | 0 |
| POST | /v1/network/sessions/{id}/collect | pk | 0 |
| GET | /v1/network/sessions/{id} | sk | 0 |
Prefer Frod.auto / /c.js — handles canary, idle progressive collect, hidden field.
Growth+ plan required for live network. Free → 402 plan_upgrade_required.
GET /v1/email/{email}
Standalone mailbox reputation — High only if references ≥ 2 and first_seen ≥ 3 years; else Low.
Hard gates: disposable / no MX. 1 credit.
Prefer bundling via /v1/assess when you also have a session.
Full guide + verified samples: Mailbox reputation.
curl -sS -H "X-Api-Key: fk_sk_…" \
"https://fraudlens.io/v1/email/user@example.com"
# → reputation, score (higher=cleaner), references, details.first_seen, reasons[], mailbox_rep
Account controls
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/account | Plan, usage, keys, policy snapshot |
| PUT | /v1/account/origins | Browser origin allowlist (max 20) |
| GET|PUT | /v1/account/watch-mode | First-sync / Always-on default + new_user_days |
| GET|PUT | /v1/account/decision-policy | Bands, rules, pillar weights |
| PUT | /v1/account/shadow | Log risk, never enforce block |
| PUT | /v1/account/webhook | Outbound URL + whsec_ |
| PUT | /v1/account/alerts | When to fire webhook |
| POST | /v1/account/keys/rotate | Rotate secret (+ pk on live plans) |
| GET | /v1/profiles/{user_id} | Dossier baseline + events |
| GET | /v1/account/stats | Usage + embedded guide |
Credits
| Kind | Credits | When |
|---|---|---|
first_sync_deep | 1 | New user deep First-sync |
always_on_deep | 1 | Material change on Always-on |
forced_deep | 1 | force_deep=true |
always_on_light | 0 | Stable revisit |
new_only_trusted | 0 | First-sync after dossier frozen |
| session create / collect | 0 | Browser path |
Plans: Free 1k (email/IP) · Growth $89 / 15k · Scale $349 / 100k · Enterprise custom. See pricing.