> ## Documentation Index
> Fetch the complete documentation index at: https://usefoil.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Going to production

> Take Foil to production safely: start in report-only mode, monitor verdicts, add soft challenges, then enable hard enforcement once signals look stable.

## Rollout checklist

Before enforcing verdicts in production, follow this sequence:

### 1. Report-only mode

Start by logging verdicts without blocking anyone. This lets you understand your traffic baseline.

```javascript Node.js theme={"dark"}
const { safeVerifyFoilToken } = require('@abxy/foil-server');

app.post('/signup', async (req, res) => {
  const result = safeVerifyFoilToken(
    req.body.foil.sealedToken,
    process.env.FOIL_SECRET_KEY,
  );

  // Log but don't block
  if (result.ok) {
    console.log('Foil verdict:', result.data.decision.verdict, 'score:', result.data.decision.risk_score);
  }

  // Continue with signup regardless
  createAccount(req.body);
});
```

```python Python theme={"dark"}
from foil_server import safe_verify_foil_token
import os

@app.post("/signup")
def signup(request):
    result = safe_verify_foil_token(
        request.json["foil"]["sealedToken"],
        os.environ["FOIL_SECRET_KEY"],
    )

    # Log but don't block
    if result.ok:
        logger.info(
            f"Foil verdict: {result.data.decision.verdict}, "
            f"score: {result.data.decision.risk_score}"
        )

    # Continue with signup regardless
    create_account(request.json)
```

```bash cURL theme={"dark"}
curl https://api.usefoil.com/v1/sessions/sid_... \
  -H "Authorization: Bearer sk_live_..."
```

### 2. Soft challenge

After a week of report-only data, add friction for suspicious sessions:

* Show a CAPTCHA for `inconclusive` verdicts
* Add email verification for `bot` verdicts
* Let `human` verdicts through without friction

### 3. Hard enforcement

Once you're confident in the signal quality:

* Block `bot` verdicts outright
* Challenge `inconclusive` verdicts
* Pass `human` verdicts through
* Treat tokens whose `decision.evaluated_at` is more than a few minutes old as missing, because the server SDKs don't check token age. See [What verification doesn't check](https://usefoil.com/docs/server-verification.md#what-verification-doesnt-check).

## Monitoring

Track these metrics in your dashboard:

* **Verdict distribution** - what % of traffic is human/bot/inconclusive?
* **False positive rate** - are real users being flagged?
* **Block rate** - how many sessions are you blocking?

## What's next

* [Verdicts & scoring](https://usefoil.com/docs/verdicts-and-scoring.md) - understand verdict thresholds
* [Troubleshooting](https://usefoil.com/docs/resources/troubleshooting.md) - common production issues


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.