v3.0.0 · Email fraud detection at the edge · GitHub
/validateScore an email addresscurl -s -X POST https://fraud.erfi.dev/validate \ -H "Content-Type: application/json" \ -d '{"email":"user@example.com","name":"Jane Doe"}'
email (required), name (optional — improves identity signals), consumer (optional), flow (optional){
"valid": true,
"riskScore": 0.12,
"decision": "allow",
"signals": {
"entropyScore": 0.34,
"formatValid": true,
"isDisposableDomain": false,
"randomForestScore": 0.12,
"patternType": "natural",
"mxSignals": { "hasRecords": true, "primaryProvider": "google" }
},
"fingerprint": { "hash": "a1b2c3...", "country": "US" },
"latency_ms": 8
}
allow (score < 0.35), warn (0.35–0.64), block (≥ 0.65). Blocked non-/validate POSTs return 403./*Auto-validates any POST with email field/signupExample: signup with fraud detection/loginExample: login with fraud detection/newsletterExample: newsletter with fraud detection/admin/configGet current merged configAPI Key/admin/config/defaultsGet default config valuesAPI Key/admin/configReplace full configAPI Key/admin/configDeep-merge partial configAPI Key/admin/config/resetReset to defaultsAPI Key/admin/config/validateValidate without savingAPI Keycurl -X PATCH https://fraud.erfi.dev/admin/config \ -H "X-API-Key: $KEY" -H "Content-Type: application/json" \ -d '{"riskThresholds":{"block":0.70,"warn":0.40}}'
riskThresholds, baseRiskScores, features, logging, headers, actionOverride, riskWeights, rateLimiting, adjustments, ood/admin/analytics?type=summaryPre-built query (13 types)API Key/admin/analyticsCustom SQL queryAPI Key/admin/analytics/queriesList all query typesAPI Key/admin/analytics/infoDatabase info & guidanceAPI Key/admin/analytics/truncateDelete old validation dataAPI Key/admin/analytics/test-dataRemove test patternsAPI Keycurl https://fraud.erfi.dev/admin/analytics?type=blockReasons&hours=48 \
-H "X-API-Key: $KEY"
/admin/disposable-domains/metadataDomain list statsAPI Key/admin/disposable-domains/updateRefresh from GitHub sourcesAPI Key/admin/disposable-domains/cacheClear domain cacheAPI Key/admin/tld-profiles/metadataProfile stats & risk tiersAPI Key/admin/tld-profiles/:tldGet single TLD profileAPI Key/admin/tld-profiles/:tldUpdate TLD risk profileAPI Key/admin/tld-profiles/syncSync hardcoded profiles to KVAPI Key/admin/tld-profiles/cacheClear TLD cacheAPI Keycurl -X PUT https://fraud.erfi.dev/admin/tld-profiles/xyz \ -H "X-API-Key: $KEY" -H "Content-Type: application/json" \ -d '{"riskScore":0.8,"riskTier":"high","notes":"abuse reports"}'
riskScore (0-1), riskTier, category, notes, registrationVolume, abuseRate/admin/training/datasetDataset stats (counts, labels)API Key/admin/training/dataset/downloadDownload full training datasetAPI Key/admin/training/datasetPrune old samplesAPI Key/admin/training/triggerStart container retrainingAPI Key/admin/training/statusTraining history & statusAPI Key/admin/training/modelUpload & deploy trained modelAPI Keycurl -X POST https://fraud.erfi.dev/admin/training/trigger \ -H "X-API-Key: $KEY" -H "Content-Type: application/json" \ -d '{"nTrees":20,"maxDepth":6}'
/admin/cache/allClear all cachesAPI Key/admin/cache/modelsClear model caches onlyAPI Key/admin/cache/heuristicsClear heuristics cacheAPI Key/admin/config/cacheClear config cacheAPI Key/admin/healthHealth checkAPI Key/debugRequest signals & fingerprintAPI Key/admin/ab-test/statusA/B experiment statusAPI Key/dashboard/authDashboard login (rate-limited)/dashboardAnalytics dashboardSessionX-API-Key header or Authorization: Bearer <key> for admin endpoints. Dashboard uses HttpOnly session cookies (24h TTL). Login rate-limited to 5 attempts/min/IP.| Decision | Score Range | HTTP Response |
|---|---|---|
allow | < 0.35 | 200 OK |
warn | 0.35 – 0.64 | 200 OK + headers |
block | ≥ 0.65 | 403 Forbidden (non-/validate) |