F Fortress / Docs

Developer Reference · Protocol v6

Integrate Fortress without creating a bot oracle.

Fortress separates evidence collection in the browser from verdict redemption on your server. Attackers never see scores, rule IDs, or findings client-side — only an opaque encrypted ft1. token that your backend redeems once.

1. Five-Minute Quickstart

Step 1 Create workspace & keys

Sign up at console.wolcott.cc, add your origin(s), and copy your fk_live_ or fk_demo_ secret key.

Step 2 Collect opaque token

Load the deferred SDK on signup, login, or checkout to mint a 120-second single-use verdictToken.

Step 3 Redeem & enforce

Exchange the token server-side at POST /v1/verdict and act on allow, challenge, or deny.

Non-Oracle Guarantee: The browser SDK receives verdictToken (AES-256-GCM encrypted with edge-only key material). It cannot decode risk scores, fired rules, or decisions in DevTools.

2. Browser SDK Integration & Performance

Always load the Fortress loader with defer. On mobile checkouts where Total Blocking Time matters, initialize collection inside requestIdleCallback (with a short fallback timer) so your page maintains 100/100 Lighthouse Performance and 0 ms TBT.

<script defer src="https://fortress.wolcott.cc/device-intelligence-collection.js"></script>
<script>
  let fortressTokenPromise;

  function warmFortress() {
    if (fortressTokenPromise || !window.DeviceIntelligenceCollection) return;
    fortressTokenPromise = (async () => {
      const collector = await window.DeviceIntelligenceCollection.createCollector({
        endpoint: "https://collect.edge.wolcott.cc/v2/events",
        merchantSessionId: window.__SESSION_ID__, // optional correlation ID
        tcpObservation: { probeUrl: "https://sigint.sigint.wolcott.cc/v1/probe", timeoutMs: 3000 },
        udpObservation: { stunUrl: "stun:stun.sigint.wolcott.cc:3478", timeoutMs: 3000 },
        dnsObservation: { probeUrl: "https://dns.sigint.wolcott.cc", timeoutMs: 3000 },
      });
      try {
        const receipt = await collector.collect();
        return receipt.verdictToken; // "ft1.<iv>.<ciphertext>"
      } finally {
        collector.close();
      }
    })();
  }

  // Defer collection until the main thread is idle (0 ms Lighthouse TBT)
  window.addEventListener("load", () => {
    if ("requestIdleCallback" in window) {
      requestIdleCallback(warmFortress, { timeout: 2500 });
    } else {
      setTimeout(warmFortress, 300);
    }
  });

  // Attach verdictToken when submitting your signup / login / checkout form
  async function submitCheckout(formData) {
    warmFortress();
    const verdictToken = await fortressTokenPromise;
    return fetch("/api/checkout", {
      method: "POST",
      headers: { "content-type": "application/json" },
      body: JSON.stringify({ ...formData, fortressToken: verdictToken }),
    });
  }
</script>

3. Server-to-Server Verdict API

Endpoint: POST https://collect.edge.wolcott.cc/v1/verdict
Authentication: Authorization: Bearer fk_live_... (also accepts fk_test_ and fk_demo_)

Request Body

{
  "token": "ft1.IaCsUuOzHr3G...",
  "expectedOrigin": "https://shop.example.com",
  "consume": true
}
FieldTypeRequiredDescription
tokenstringYesOpaque ft1. verdict token returned to the browser by /v2/events. Valid for 120 seconds.
expectedOriginstringOptionalExtra strict origin check in addition to your project's Console allowlist.
consumebooleanOptionalDefaults to true (single-use enforcement via edge ReplayGuard; replays return 409).

Example: Node.js & cURL

// Node 20+
const resp = await fetch("https://collect.edge.wolcott.cc/v1/verdict", {
  method: "POST",
  headers: {
    authorization: `Bearer ${process.env.FORTRESS_SECRET_KEY}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    token: req.body.fortressToken,
    expectedOrigin: "https://shop.example.com",
  }),
});

if (resp.status === 409) {
  return res.status(403).json({ error: "Replay detected" });
}
const verdict = await resp.json();
if (verdict.decision === "deny") return res.status(403).json({ error: "Blocked" });
if (verdict.decision === "challenge") return res.status(200).json({ stepUp: "fortress-captcha" });
# cURL
curl -sS -X POST https://collect.edge.wolcott.cc/v1/verdict \
  -H "Authorization: Bearer $FORTRESS_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"token":"ft1....","expectedOrigin":"https://shop.example.com"}'

Response Body (200 OK)

{
  "verdictId": "vrd_9a82b1c4e7f0...",
  "tenantId": "ten_74154a05ad15",
  "keyType": "live",
  "decision": "challenge",
  "riskScore": 0.64,
  "scores": {
    "automation": 0.64,
    "device": 0.12,
    "network": 0.35
  },
  "agent": {
    "claimed": false,
    "verified": false,
    "signals": []
  },
  "reasons": [
    "automation.realm_mismatch",
    "network.proxy_or_vpn"
  ],
  "session": {
    "sessionId": "s2_u8p0GJVk...",
    "merchantSessionId": "chk_8821",
    "deviceKeyId": "dk_49a2f0...",
    "origin": "https://shop.example.com"
  },
  "rulesetVersion": "2026-12-05.1",
  "evaluatedAt": "2026-12-05T14:40:12.018Z"
}

HTTP Status Codes

StatusError CodeMeaning & Recommended Handling
200—Verdict decoded, single-use consumed, and tenant policy applied.
400missing_token / invalid_tokenMalformed JSON or corrupted/tampered ft1. token. Treat as suspicious or step-up.
401unauthorized / key_revokedMissing, unknown, or revoked secret key. Check Console key status.
402account_suspendedProject paused for billing (reason: "payment_required"). Fail-open or alert ops per your SLA.
403origin_mismatchToken was collected on an origin not listed in your project's Console allowedOrigins.
409token_replayedThis ft1. token was already redeemed once. Block replay attack.
410token_expiredToken exceeded its 120-second TTL. Re-collect on the client.

4. Coarse Reason Codes

To prevent attackers from reverse-engineering individual browser probes while still giving fraud teams actionable audit trails, reasons maps internal findings to coarse categories:

Reason CodeCategoryWhat Triggered It
automation.driver_or_stealthAutomationWebDriver, CDP/Patchright artifacts, anti-detect fork tells, or prototype/shim traps.
automation.realm_mismatchAutomationDisagreement between main window, sandboxed iframe, Web Worker, or Shared Worker.
automation.unverified_agentAI AgentBrowser claimed an AI agent identity or exposed Stagehand/Skyvern/Browser-Use/solver hooks.
network.proxy_or_vpnNetworkTCP/TLS RTT ratio anomaly, split TCP↔UDP↔DNS egress, or datacenter/commercial VPN exit.
transport.tls_engine_mismatchTransportTLS JA4 / HTTP fingerprint disagrees with claimed browser JS engine.
integrity.tamper_detectedIntegrityDescriptor patching, Proxy wrapping, event re-parenting, or invalid proof/PoW.

5. Adaptive Step-Up with Fortress Captcha

Set your project's challengeAt (default 0.45) and denyAt (default 0.85) thresholds in Fortress Console:

  • riskScore < challengeAt → allow: Admit immediately with zero user friction.
  • challengeAt ≤ riskScore < denyAt → challenge: Present Fortress Captcha using a signed FC-TICKET-V1 bound to the session; verify the resulting fd2. decision proof on your backend before completing the action.
  • riskScore ≥ denyAt → deny: Reject or silently shadow-block high-confidence bots and tampered sessions.

6. API Key Classes & Async Non-Payment Cutoff

Fortress supports four scoped key prefixes minted from Console. Secret keys are shown once at creation and stored only as SHA-256 hashes.

PrefixScopeIntended Use
fk_pub_Browser / PublicClient-side project identifier (safe to ship in HTML/JS).
fk_live_Server / ProductionProduction POST /v1/verdict redemption on your backend.
fk_test_Server / StagingStaging & CI verification without mixing into production alerts.
fk_demo_Server / DemoTime-boxed evaluation and prospect sandbox keys tagged keyType: "demo" in verdicts & telemetry.

Async Cutoff without Hot-Path DB Lookups: Every key mint, revocation, origin edit, policy change, or billing pause (active → past_due → suspended) writes to Console D1 and pushes the hashed key record into the shared FORTRESS_TENANT_KEYS Cloudflare KV namespace. Edge workers cache KV records in isolate RAM for 60 seconds (15s negative cache), so hot-path /v1/verdict calls execute in sub-millisecond memory while revocations and non-payment cutoffs propagate globally within ~60 seconds.

7. Control Plane ↔ Edge Data Plane Architecture

┌─────────────────────────────────────────────────────────────────────┐ │ CONTROL PLANE (https://console.wolcott.cc) │ │ Cloudflare Worker + D1 (fortress-console-db) │ │ • Merchant signup/login, workspaces, allowedOrigins, policy tuning │ │ • Key minting (fk_live_ / fk_test_ / fk_demo_) & instant revoke │ │ • Billing enforcement hook (active | past_due | suspended) │ │ • Attempts analytics, KPI summaries & verdict drill-down drawer │ └───────────────┬─────────────────────────────────────────▲───────────┘ │ Async KV Push on write │ Non-blocking ctx.waitUntil() │ (key:<sha256> -> status/policy/origins) │ HMAC-SHA256 /api/internal/ingest ▼ │ ┌─────────────────────────────────────────────────────────┴───────────┐ │ SHARED EDGE KV (FORTRESS_TENANT_KEYS) │ │ Global low-latency config store · zero D1 lookups on hot path │ └───────────────┬─────────────────────────────────────────────────────┘ │ Read-through + 60s isolate RAM cache ▼ ┌─────────────────────────────────────────────────────────────────────┐ │ EDGE DATA PLANE (https://collect.edge.wolcott.cc) │ │ Cloudflare Worker + 8-Shard Durable Objects + ReplayGuard + R2 │ │ 1. Browser SDK -> /v2/challenges (12-bit PoW) -> /v2/events │ │ Returns opaque AES-256-GCM verdictToken (ft1.<iv>.<ct>) │ │ 2. Merchant Backend -> POST /v1/verdict (Bearer fk_...) │ │ Verifies key status (401/402), origin (403), single-use (409) │ └─────────────────────────────────────────────────────────────────────┘