# Connect your first form

Check one signup in watch mode. The visitor can finish signing up while you verify the result in your dashboard.

## Choose your framework

Open a guide for your stack, or follow the [plain HTML example](https://maskbreak.com/integrations#visitor-checks).

[Next.jsNode / React](https://maskbreak.com/blog/nextjs-bot-detection) [ExpressNode](https://maskbreak.com/blog/express-fraud-detection-middleware) [SvelteKitNode / Svelte](https://maskbreak.com/blog/sveltekit-bot-detection)

**Node.js 18+**

`npx maskbreak init`

 Run in your app folder. After a test submission, run `npx maskbreak status`. [CLI on npm](https://www.npmjs.com/package/maskbreak)

[DjangoPython](https://maskbreak.com/blog/django-fraud-detection) [FastAPIPython](https://maskbreak.com/blog/fastapi-fraud-detection) [FlaskPython](https://maskbreak.com/blog/flask-fraud-detection) [LaravelPHP](https://maskbreak.com/blog/laravel-fraud-detection)

[WooCommerce guide](https://maskbreak.com/blog/woocommerce-fraud-detection) WordPress / PHP [Download plugin ZIP](https://maskbreak.com/downloads/maskbreak-for-woocommerce.zip)

 [RailsRuby](https://maskbreak.com/blog/rails-fraud-detection) [Spring BootJava](https://maskbreak.com/blog/spring-boot-fraud-detection) [ASP.NET CoreC# / .NET](https://maskbreak.com/blog/aspnet-core-fraud-detection) [Gin and EchoGo](https://maskbreak.com/blog/go-fraud-detection)

[Supabase guide](https://maskbreak.com/blog/supabase-fraud-detection) Postgres / Deno [Download starter ZIP](https://maskbreak.com/downloads/maskbreak-supabase.zip)

 [Cloudflare WorkersEdge](https://maskbreak.com/blog/cloudflare-workers-bot-detection) [ShopifyOrder review](https://maskbreak.com/blog/shopify-bot-detection)

## Connect the browser to your server

### Collect evidence when the form is submitted

Show the HTML form

HTML

```
<script async src="https://maskbreak.com/assets/sentinel.js"></script>

<form class="monocle-enriched" method="POST" action="/signup">
  <!-- Your fields stay as they are. The script adds monocle and sentinel_fp. -->
</form>
```

For a JavaScript submission, call `window.Sentinel ? await window.Sentinel.collect() : {}` and send the returned fields with your JSON body. The handler below accepts both regular forms and JSON. If your site sends a Content-Security-Policy header, add the sources listed in [the integration guide](https://maskbreak.com/integrate.md).

### Request a decision from your server

Send the two visit tokens to [`/v1/evaluate`](https://maskbreak.com/api#evaluate) before your signup handler runs. Keep your API key on the server.

Show the Node.js handler

Node.js 18+ / Express, watch mode

```
// Watch mode: send the check, log the answer, let every visitor through.
app.post('/signup', express.urlencoded({ extended: false }), express.json(), async (req, res, next) => {
  const fields = req.body || {};
  try {
    const response = await fetch('https://maskbreak.com/v1/evaluate', {
      method: 'POST',
      headers: {
        Authorization: 'Bearer ' + process.env.MASKBREAK_API_KEY,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        token: fields.token || fields.monocle,
        fingerprintEventId: fields.fingerprintEventId || fields.sentinel_fp,
        tz: fields.tz || fields.sentinel_tz
      }),
      signal: AbortSignal.timeout(3000)
    });
    const result = await response.json();
    console.log('[maskbreak]', JSON.stringify({ status: response.status,
      decision: result.decision, reasons: result.reasons, error: result.error }));
  } catch (error) {
    console.log('[maskbreak] check failed:', error.name);
  }
  next(); // your own handler still runs, whatever the answer
}, existingSignupHandler);
```

Submit your form once: the check appears under Events in the console, which says if half of it did not arrive. When the log lines look right, switch to enforce mode: stop `block`, hold `review`, a missing half, test answers and errors, and set `MASKBREAK_QUOTA_VERIFY_ACTIONS` to the actions that require verification when the monthly allowance runs out. Unlisted actions continue unchecked on `monthly_quota_exceeded`. [The integration guide](https://maskbreak.com/integrate.md) has that handler, both modes behind one `MASKBREAK_MODE` switch.

### Find the event in your dashboard

Submit the form once. Open [Events](https://maskbreak.com/dashboard#events) and compare the decision with the one in your server log.

Before enforcing decisions, use the [fraud detection rollout guide](https://maskbreak.com/blog/fraud-detection-rollout#expand-with-explicit-gates) to choose a first cohort, set review limits and plan a rollback.

## Add what your server already knows

The same call takes optional fields. Take them from your server’s own records, never from the form, and send only the ones you have.

**accountId**

Your ID for the account being signed into or created. Maskbreak links devices and addresses to it for your account only; three or more of your accounts on one device within a day turn `allow` into `review` (`device_many_accounts`).

**event**

Label the action in Events, such as `"signup"`, `"checkout"` or `"account_recovery"`. For `"login"`, set `loginSucceeded` from your authentication result. An unsuccessful login never links the attempted device to the account as a successful sign-in.

**email, phone**

A throwaway-mailbox check and, with email and phone intelligence on, a 0–100 score for each, within your plan’s daily email and phone checks (Free 9, Starter 60, Growth 150, Scale 450). On by default for accounts created since 23 October 2026; older accounts switch it on in Settings.

**tz**

The browser’s time zone (`sentinel_tz` on enriched forms). One that does not fit the address’s country adds `timezone_mismatch`.

A score that did not run says `checked: false`; treat it as no opinion. After a test submission, `GET /v1/setup` with your key says whether the check arrived complete and what to fix next.

## Other ways in

- **Server SDKs**Node `npm install @sentinelsup/sdk` ([npm](https://www.npmjs.com/package/@sentinelsup/sdk), [source](https://github.com/sentinelsup/maskbreak-node)), Python `pip install sentinelsup` ([PyPI](https://pypi.org/project/sentinelsup/), [source](https://github.com/sentinelsup/maskbreak-python)), PHP `composer require sentinelsup/sdk` ([Packagist](https://packagist.org/packages/sentinelsup/sdk), [source](https://github.com/sentinelsup/maskbreak-php)). They wrap the same call, not the script. From Node 0.5.0, Python 0.4.0 and PHP 0.3.0 they also send the optional fields and read `/v1/setup`.
- **Cloudflare Workers**Enter your signup and submission URLs to generate the routes and verify your first signup. [Set up my Cloudflare routes](https://maskbreak.com/dashboard?install=cloudflare#integration). [Deploy to Cloudflare](https://deploy.workers.cloudflare.com/?url=https://github.com/sentinelsup/maskbreak-cloudflare-worker), paste your [live API key](https://maskbreak.com/settings#api-keys), then attach a route such as `www.example.com/signup*`. Standard HTML forms work without site edits. Start in watch mode.[Supported forms](https://github.com/sentinelsup/maskbreak-cloudflare-worker#which-forms-work-automatically) · Manual setup: [guide](https://maskbreak.com/examples/cloudflare-workers/README.md), [worker.mjs](https://maskbreak.com/examples/cloudflare-workers/worker.mjs), [wrangler.jsonc](https://maskbreak.com/examples/cloudflare-workers/wrangler.jsonc).
- **Stripe**Check the visitor before you create the PaymentIntent or Checkout Session; in enforce mode a review, block or unavailable check pauses the payment, and Stripe’s own checks and 3D Secure still apply. The pre-intent handler is in [the integration guide](https://maskbreak.com/integrate.md).
- **MCP**The [hosted HTTP MCP endpoint](https://maskbreak.com/mcp-server) looks up addresses and service status for AI agents. It does not collect browser evidence or perform full visitor checks; see the [MCP API reference](https://maskbreak.com/api#mcp).
- **Mobile apps**[Swift and Kotlin signup examples](https://maskbreak.com/integrations#mobile) connect your app to its own backend.
- **No account yet**The public key `sk_test_sandbox` with a test token such as `test_clean` returns synthetic answers that check no real visitor: [sandbox scenarios](https://maskbreak.com/api#sandbox).

## Protect signups on iOS and Android

There is no shipped native Maskbreak SDK. Choose the check based on where the signup form runs.

| Signup flow | What your backend checks | Evidence available |
| --- | --- | --- |
| Native Swift or Kotlin form | Look up the public IP observed by your server. | Tor exit and published hosting ranges. A no-match gives no assurance about the visitor, device, VPN or proxy. |
| Hosted form in a WebView | Evaluate the browser evidence submitted by the hosted form. | Live network and browser signals when both tokens arrive. Verify collection in each supported WebView. A browser device ID describes that web environment. |

### Android signup pilot

The [Kotlin Play Integrity client](https://maskbreak.com/examples/mobile/PlaySignup.kt) requests an observation for one signup. The [staging backend](https://maskbreak.com/examples/mobile/play-signup.mjs) checks it with Google, then continues to your existing signup checks and email verification. Run in watch mode to measure recognized, inconclusive and unavailable observations on your app. [Android pilot setup](https://maskbreak.com/integrate.md#android-signup-pilot).

### Connect a native form to your signup handler

Point the [Swift client](https://maskbreak.com/examples/mobile/Signup.swift) or [Kotlin client](https://maskbreak.com/examples/mobile/Signup.kt) at your existing HTTPS signup URL. On Android, enable the Internet permission and call the client from a background dispatcher. Keep the API key in your backend environment.

Mount the [Express signup guard](https://maskbreak.com/examples/mobile/signup-guard.mjs) after rate limiting and before your existing email-verification handler. Configure Express to trust only your own ingress, so the lookup uses the visitor’s address. The guard reads the socket address by default.

```
import { mobileSignupGuard } from './signup-guard.mjs';

app.post('/signup', signupRateLimit, express.json(),
  express.urlencoded({ extended: false }),
  mobileSignupGuard(process.env.MASKBREAK_API_KEY),
  beginEmailVerification);
```

Your handler validates the address, starts your usual verification and returns HTTP 202. The clients then show the email-code step. HTTP 409 calls for review, 403 stops signup, and 503 asks the visitor to try again. Create the account only after your own verification succeeds.

## Storage on your site

The script and the checks it loads use the browser storage below, for fraud prevention and security only, never for advertising or analytics, and the values are opaque. List it in your own cookie policy and privacy notice, and decide whether your rules on storing information on a visitor’s device require consent before the script runs ([DPA Section 3](https://maskbreak.com/dpa#s3)).

| Name | Where | Purpose | Lifetime |
| --- | --- | --- | --- |
| `_sntl_mcl_v` | localStorage on your site | Written by the script itself: a version marker, so that network-check storage left by an older setup is cleared once. | Until cleared |
| `_vid_t` | Cookie on your site and localStorage | Device check: a pseudonymous identifier, so the same browser can be recognised on a later visit. | Cookie up to 1 year; localStorage until cleared |
| `_vid_lr` | localStorage on your site | Device check: state it keeps between visits. | Until cleared |
| `_iidt` | Cookie for `maskbreak.com` (HttpOnly) | Device check: a pseudonymous identifier set on a `maskbreak.com` host; from your site a third-party cookie, which browsers that block those do not keep. | Up to 1 year |
| Network-check state | localStorage or IndexedDB on your site | Session state kept between page loads. The check also reads browser characteristics (user agent, languages, time zone, window size, processor count, an automation flag) and measures the connection. | Until cleared |

Both checks send what they collect, with the visitor’s IP address, to our network-intelligence and device-intelligence providers in the United States ([sub-processors](https://maskbreak.com/sub-processors)). Maskbreak also keeps a pseudonymous, service-wide count of how often a device has been seen (`times_seen`), described in our [Privacy Policy](https://maskbreak.com/privacy). Names can change when a detection script is updated: check your pages in the browser’s developer tools before you publish your cookie policy.

## Get an API key

The console shows this code for your stack with your site ID filled in, and checks that your first submission arrived complete.

[Create free account](https://maskbreak.com/signup?next=%2Fdashboard%3Fsetup%3Dwebsite%23integration)
