Docs / API reference

API reference

Base URL https://fraudlens.io. Send X-Api-Key. Score 0–100 (higher = cleaner). You choose allow / challenge / block.

Authentication

KeyPrefixUse
Publishablefk_pk_Browser: create session + collect only
Secretfk_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.

Flexible inputs Pass any subset: 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

FieldTypeNotes
emailstringOptional if session/ip present
session_idstringFrom browser collect
ipstringOverride exit IP (server-side)
user_idstringStable id → dossier / ATO
watch_modestringnew_only (First-sync) · continuous (Always-on)
policystringbalanced · strict (overrides account preset)
force_deepboolBill 1 credit even if trusted revisit
context.flowstringsignup · login · checkout · password_reset · payout
registered_atISO8601Helps 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).

MethodPathKeyCredits
POST/v1/network/sessionspk0
POST/v1/network/sessions/{id}/collectpk0
GET/v1/network/sessions/{id}sk0

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

MethodPathPurpose
GET/v1/accountPlan, usage, keys, policy snapshot
PUT/v1/account/originsBrowser origin allowlist (max 20)
GET|PUT/v1/account/watch-modeFirst-sync / Always-on default + new_user_days
GET|PUT/v1/account/decision-policyBands, rules, pillar weights
PUT/v1/account/shadowLog risk, never enforce block
PUT/v1/account/webhookOutbound URL + whsec_
PUT/v1/account/alertsWhen to fire webhook
POST/v1/account/keys/rotateRotate secret (+ pk on live plans)
GET/v1/profiles/{user_id}Dossier baseline + events
GET/v1/account/statsUsage + embedded guide

Credits

KindCreditsWhen
first_sync_deep1New user deep First-sync
always_on_deep1Material change on Always-on
forced_deep1force_deep=true
always_on_light0Stable revisit
new_only_trusted0First-sync after dossier frozen
session create / collect0Browser path

Plans: Free 1k (email/IP) · Growth $89 / 15k · Scale $349 / 100k · Enterprise custom. See pricing.

Get API key Policy →