Skip to main content

Send browser fraud events without an API key (2026 how-to)

Mint a scoped monitoring token server-side with POST /v3/events/sdk-token/, then post events from the browser with the X-Monitoring-Token header. The API key and the subject stay server-side, enforced by Didit.

Send browser fraud events without an API key (2026 how-to)

Contents

In this guide

Jump to the part you need.

This page is for teams that capture logins and sessions in a browser or mobile app and want Didit fraud rules to score that activity without shipping an API key to the device. Two calls: your backend mints a scoped token, the device submits events with it. Monitored transactions cost $0.001 beyond your plan allowance; no per-event unit price is published. The caveat: event ingestion is off by default and an over-broad token is the real risk.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

Browser event ingestion at a glance
PieceWhat it doesWho runs it
POST /v3/events/sdk-token/Mints a short-lived credential scoped to one vendor_dataYour backend, with x-api-key
POST /v1/events/Sends one event from the deviceBrowser or app, with X-Monitoring-Token
POST /v1/events/batch/Sends a flushed buffer, up to 500 eventsBrowser or app, with X-Monitoring-Token
POST /v3/events/Sends an event with no end user presentYour backend, with x-api-key
Event ingestion settingSwitches every write lane on. Off by default, returns 403 until enabledBusiness Console, Transactions, Settings

Start free in the sandbox at business.didit.me, no sales call, and read the per-check numbers on Didit pricing. Events feed the same engine described on the Transaction Monitoring product page. If you work from an AI assistant, connect the Didit MCP server and let it call the documented endpoints for you.

One price note before the steps, because it is the first thing finance asks. The published monitoring line is $0.001 per transaction beyond the plan allowance, and the price feed does not publish a separate per-event unit price for the event lane. Confirm how your event volume is metered in the console.

The outcome, and the method we recommend

The device knows things your server does not. That a login failed three times in 40 seconds, that a round started, that this browser rendered in software. Sending those events from the browser or app means rules see them while the session is live instead of after a batch job.

The problem is credentials. An API key in a browser is a key anyone can read. The device lane solves that with a scoped credential. Your backend mints a short-lived token bound to one user, the device posts events with X-Monitoring-Token, and Didit enforces subject, network context and category scope on the server. The payload carries no API key and no subject, because both are enforced server-side.

Use the server lane, POST /v3/events/ with x-api-key, when no end user is present: back-office writes, imports, or events your own systems already know. It is also the only lane that lets your own bot detection become the device score.

Prerequisites

  • A Didit application with an API key. The key is sent as x-api-key to https://verification.didit.me and never leaves your backend.
  • Event ingestion switched on: Transactions, Settings, Event monitoring. Until it is on, every write lane answers 403 with {"code": "event_monitoring_disabled"} and nothing is stored.
  • A stable user id to use as vendor_data. It is the subject every event submitted with the token belongs to.
  • A backend route your front end can call to get a token per session.
  • An origin you can name exactly, if you want origin binding.

The five steps

  1. Turn on event monitoring for the application.
  2. Mint a monitoring token from your backend for one vendor_data.
  3. Submit events from the device with X-Monitoring-Token.
  4. Batch the flush so page-view events do not cost one request each.
  5. Read the outcome and confirm which rules ran.

Step 1: turn on event ingestion

Event ingestion is opt-in. Open the Business Console, go to Transactions, Settings, Event monitoring and switch it on. Your existing transaction rules keep firing on transactions only, and an event rule cannot be created by accident, because a rule applies to transactions unless you explicitly include events. Once ingestion is on, the mint endpoint stops answering 403.

Step 2: mint the scoped token on your backend

This call uses your API key, so it runs on the server. One token per user session, not one per app launch.

curl -X POST https://verification.didit.me/v3/events/sdk-token/ \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "vendor_data": "user_391",
    "allowed_event_categories": ["auth", "session", "gameplay"],
    "ttl_seconds": 900,
    "max_uses": 1000,
    "bind_to_origin": "https://operator.example"
  }'

The response carries the credential, its expiry, and the scope you asked for:

{
  "monitoring_token": "...",
  "expires_at": "2026-08-31T21:00:00Z",
  "allowed_event_categories": ["auth", "session", "gameplay"],
  "max_uses": 1000,
  "bind_to_origin": "https://operator.example"
}
Mint inputs and their defaults
FieldDefaultWhat it controls
vendor_dataRequiredThe subject every event submitted with this credential belongs to
entity_typeindividualindividual or company
allowed_event_categoriesAllNarrows what a leaked credential could write
ttl_seconds90060 to 86400 seconds
max_uses1000One use per event, not per request
bind_to_originNoneWhen set, the browser Origin must match exactly

Three settings do most of the safety work. Keep allowed_event_categories to what the page actually produces. Keep max_uses close to the number of events you expect from that session, remembering that a batch spends one use per event. Set bind_to_origin unless you genuinely serve multiple origins, because a request with no Origin at all is refused once it is set.

Step 3: submit events from the device

The app posts to the device lane with the minted token in the header. No API key, no subject block.

curl -X POST https://verification.didit.me/v1/events/ \
  -H "X-Monitoring-Token: THE_MINTED_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "event_id": "session-abc-login-1",
    "event_category": "auth",
    "action_type": "login",
    "occurred_at": "2026-08-31T20:40:31.123Z",
    "session": { "session_id": "web-session-abc", "sequence": 1 },
    "device_context": { "fingerprint": "didit-fp-v2:a8c1" },
    "payload": { "method": "password" }
  }'

Note what the payload does not carry: no API key, and no subject. Both are enforced server-side. If a tampered client adds a subject block, the credential binding overwrites it, so a client cannot write to another user's timeline.

  • event_id is your own identifier and the idempotency key.
  • event_category must be inside the token scope, or the request is rejected with 400.
  • occurred_at is accepted up to 7 days in the past and 5 minutes in the future. Send at collection time.

Step 4: batch the flush

One request per login is fine. One request per page view adds a lot of request volume for little signal, so buffer page-view events on the device and flush them together.

curl -X POST https://verification.didit.me/v1/events/batch/ \
  -H "X-Monitoring-Token: THE_MINTED_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "events": [ { "...": "..." }, { "...": "..." } ] }'

Up to 500 events per flush, with the same per-item outcomes as the server batch endpoint. A good default flush is 25 events, 5 seconds, or page and app backgrounding. If you have to shed events under backpressure, drop the cheap ones first: session.page_view, session.sdk_heartbeat, session.sdk_loaded and session.device_seen.

Academy lesson cover on real-time transaction monitoring and fraud rules
Device events land in the same rule engine that scores your transactions.

Step 5: read the outcome

Each accepted event returns the documented per-event outcome record. This is the shape POST /v3/events/ returns, and the batch endpoints return the same per-item outcomes.

{
  "event_uuid": "0f2b...",
  "event_id": "login-2026-08-31-000001",
  "status": "ACCEPTED",
  "score": 0,
  "rules_evaluated_count": 6,
  "rules_matched_count": 0,
  "correlation_pending": false,
  "retention_class": "standard",
  "expires_at": "2026-09-30T20:40:31.123Z",
  "idempotent_replay": false,
  "rule_matches": []
}

Read three fields first. status tells you the event was stored. rules_evaluated_count tells you a rule was in scope for that category, which is the number to check when a rule never fires. rule_matches shows what contributed to the score. For a full trace, call GET /v3/events/{event_uuid}/ with your API key, or pull a subject's timeline from GET /v3/events/subjects/{vendor_data}/.

One transaction monitoring rule open in the Didit Business Console
A rule in the Business Console. The Applies to selector is where you scope it to events and pick categories.

What the server enforces, and what that prevents

Server-side guarantees on the device lane
ControlBehaviour
Subject bindingThe credential is scoped to one vendor_data at mint time. A subject block in the body is overwritten
Network contextIP address, user agent, accept-language and origin are derived from the request and win over client hints. Rule evidence records the difference as a field source
Automation scoreDidit decides device_context.bot_score server-side on a 0 to 100 scale
Category scopeA credential scoped to session cannot submit a payment event. It is rejected with 400
Use budgetThe budget is spent per event, so a 500-event batch cannot slip past a 10-use credential as one use
Origin bindingA request whose Origin does not match is refused, including one with no Origin at all

Why a bot_score posted by the browser is not the score your rules read

Clients lie, and a rule that trusts a number the client computed about itself is not a fraud rule. Didit decides device_context.bot_score on the server, on a 0 to 100 scale, and that is the value event.device.bot_score rules compare.

What the server reads instead:

  • The request itself. A user agent that names an automation tool, such as a headless browser or a browser driver, scores 100.
  • The device evidence newer Didit SDK versions send with every batch: what the SDK read on the device, not a score. On the web, signs that an automation tool drives the browser, and, on a page that collects the full device fingerprint, that it renders in software. In an app, a hooking framework, an emulator or simulator, a debugger, or a rooted or jailbroken device.
  • Older SDK versions, which report their own score on a 0 to 1 scale in the X-Didit-FP-Bot-Score header and in the batch's fingerprint_v2.bot.score. 0.9 becomes 90.

Three consequences matter when a rule does not fire. A bot_score your page or app posts in device_context does not set the score, it is kept as device_context.metadata.client_bot_score. A bot_score in the event's payload stays in the payload, where event.bot.* rules read it, which is a different field from event.device.bot_score. Nothing a device sends can lower the score, only raise it, and when Didit has nothing to go on the event has no bot score, not 0.

To report your own bot detection as the device score, submit the event from your backend with POST /v3/events/ and the API key. The device lane is for device evidence.

Browser family, platform, and the fields event rules actually read

The event rule vocabulary is a fixed list of namespaced paths, and a condition can only read a path that resolves. If a rule reads subject_browser_family or subject_platform and never matches on an event, the cause is usually that those paths are not part of the event field set: browser family is not derived from the user agent for event rules. Grouping by a value the event does not carry means the aggregation simply does not match, whatever the operator.

The user agent is still captured, just not in the role people expect. IP address, user agent, accept-language and origin are derived from the request and recorded as rule evidence, and the server-derived value wins over any client hint. The evidence shows the difference as a field source, so you can prove in a review that the network context came from the request and not from the page.

Paths to write rules on instead
NeedPath
Country, ASN, VPN, Tor, data centre, proxyevent.ip.country, event.ip.asn_organization, event.ip.is_vpn_or_tor, event.ip.is_data_center, event.ip.proxy_type
Device identity and automationevent.device.fingerprint, event.device.persistent_device_id, event.device.bot_score
Behaviour telemetryevent.bot.timing_variance_ms, event.bot.actions_per_minute, event.bot.pointer_entropy
Anything you defineevent.payload.<key> and custom_values.<key>, up to 100 scalar custom keys

If you need browser family in a rule, send it from your own code as a custom_values entry or a payload key, then write the condition on that key. Custom values are addressable from rules as custom_values.<key>.

A transaction monitoring alert open in the Didit Business Console
When a rule matches, the alert shows which fields and which field sources produced the decision.

Inputs and outputs

Every field in the two-call flow
DirectionFieldNotes
Mint inputvendor_dataRequired. The subject for this credential
Mint inputttl_seconds, max_uses, allowed_event_categories, bind_to_origin, entity_typeAll optional, with the defaults above
Mint outputmonitoring_token, expires_atThe token travels to the device. Nothing else does
Submit inputevent_id, event_category, action_type, occurred_atRequired on every event
Submit inputsession, device_context, payload, custom_values, transaction_contextOptional. Payload is capped at 16 KB
Submit outputevent_uuid, status, score, rules_evaluated_count, rules_matched_count, rule_matches, idempotent_replayStatus is ACCEPTED on a stored event

Failure cases and recovery

What breaks, why, and what to do
SymptomCauseRecovery
403 with event_monitoring_disabled on mintEvent ingestion is off for the applicationTurn it on in Transactions, Settings, Event monitoring, then mint again
401 on mintWrong or expired API keyIssue a fresh key and keep it on the server
403 on mint with a key you know worksThe header is missing from the requestSend x-api-key
400 on submitCategory outside the token scopeMint with that category in allowed_event_categories
Request refused with a valid tokenOrigin missing or not equal to bind_to_originCall from the bound origin, or drop the binding for that app
Events stop after the token lifetimeToken past ttl_secondsMint per session and refresh before expiry
A batch is rejected part wayUse budget spent, one use per eventRaise max_uses or mint a fresh token
Event rejected on timeoccurred_at older than 7 days or more than 5 minutes aheadSend at collection time, not on a later replay
A retried submission of an event you already sentA replay uses the same event_id; inspect idempotent_replay in the responseCheck idempotent_replay before treating the submission as a second event

Two more failures cost you data rather than errors. A privacy extension that blocks the fingerprint script leaves the event with no device fingerprint, and events with no fingerprint are never grouped as the same device. And a rule scoped to transactions only will evaluate zero events, because a rule applies to transactions unless you set scope.record_types to ["event"] or to both.

Minting is a credential call, not a check. The published price lines around this lane are the Transaction Monitoring lines: the plan allowance plus $0.001 per transaction beyond it. Each plan includes 1,000 (Free), 10,000 (Growth) or 100,000 (Scale) monitored transactions a month, and Enterprise sets its allowance in the contract. The price feed does not publish a separate per-event unit price for the event lane, so confirm how event volume is metered in the console rather than assuming a per-event fee.

What stays your decision: the review and decline thresholds, which of your categories are risk-grade, and whether a VPN or a high bot score blocks a session or only sends it to review. Rules can run in TEST mode first, which evaluates against records without contributing to score or status, so you can measure selectivity before a rule can decline anyone. Price lines for the checks you run alongside events, such as a full ID check at $0.33, are separate.

Worked cost example

A payments app on the Scale plan, 8,000 new users a month and 260,000 monitored transactions a month. Only published unit prices go into this sum.

  • Full ID check at Scale: $0.33 less 10% = $0.297. 8,000 x $0.297 = $2,376.00
  • Monitored transactions: 260,000 less the 100,000 allowance = 160,000 x $0.001 = $160.00
  • Usage: $2,376.00 + $160.00 = $2,536.00
  • Plan credit applied: $2,536.00 less $350.00 = $2,186.00 from top-ups
  • Monthly total: $2,186.00 + $299.00 plan fee = $2,485.00

The device and IP analysis line at $0.03 is already inside the $0.33 full check, so nothing extra is billed for the network context rules read. The calculation stops at transactions because that is the only published monitoring line: the price feed states $0.001 per transaction beyond the allowance and does not state how event volume is priced or whether events share that allowance. Check the console usage meter against your own mix before you model an event budget.

Sources

The next step takes about a minute: create a free organization at business.didit.me, turn on event monitoring, mint one token and post one login event. Sandbox testing is free and unlimited, no sales call.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

How do I send fraud monitoring events from the browser without exposing my API key?

Your backend calls POST /v3/events/sdk-token/ with the API key and the user's vendor_data, and returns only the monitoring_token to the device. The browser then posts to POST /v1/events/ or POST /v1/events/batch/ with the X-Monitoring-Token header. The payload contains no API key and no subject, because Didit enforces both from the token binding.

Which endpoints make up the two-step flow?

Mint with POST /v3/events/sdk-token/ using x-api-key. Submit with POST /v1/events/ for one event or POST /v1/events/batch/ for a flush of up to 500, both using X-Monitoring-Token. Rules then run exactly as they do on a server-submitted event.

Why is my device_context bot_score not used by fraud rules?

Because Didit does not accept a bot score the client computed about itself. A bot_score posted in device_context is kept as device_context.metadata.client_bot_score, while event.device.bot_score is decided server-side on a 0 to 100 scale from the request and from the evidence newer SDK versions send. Nothing a device sends can lower that score, only raise it.

How do I report my own bot detection as the device score?

Submit the event from your backend with POST /v3/events/ and your API key, where your own detection result is the value you send. The device lane is reserved for device evidence, so a client-side number cannot become the score rules compare.

Why does a rule on subject_browser_family or subject_platform never match an event?

Those paths are not part of the documented event field set, and browser family is not derived from the user agent for event rules. Conditions can only read paths that resolve, so the aggregation does not match. Write the rule on event.ip.country, event.ip.asn_organization, event.device.fingerprint or event.device.bot_score, or send browser family from your own code as a custom_values key.

What happens if I set bind_to_origin?

The browser Origin on the submit request must match the value exactly, and a request with no Origin at all is refused. It restricts a copied token to the specified origin. Leave it unset only if the same token genuinely has to serve more than one origin.

How long should the token live and how many uses should it have?

The default ttl_seconds is 900, and the range is 60 to 86400. Mint per user session and keep the lifetime to that session. max_uses defaults to 1000 and is counted per event, not per request, so a 500-event batch spends 500 uses.

What does event_monitoring_disabled mean?

It means event ingestion is off for that application, so every write lane answers 403 and nothing is stored, enriched or evaluated. Turn it on under Transactions, Settings, Event monitoring. Reads are unaffected while it is off.

What does event monitoring cost?

The price feed publishes $0.001 per monitored transaction beyond the plan allowance, with 1,000 transactions included on Free, 10,000 on Growth and 100,000 on Scale. It does not publish a separate per-event unit price for the event lane. Check the console usage meter to see how your event volume is counted.

Does the device lane run different rules than the server lane?

No. Device events are enriched, rolled up and evaluated by the same rule engine as a server-submitted event. The only differences are how the subject and network context are established and the scope limits on the credential.

Can I drop events when the device is under backpressure?

Yes, and you should drop the cheap ones first: session.page_view, session.sdk_heartbeat, session.sdk_loaded and session.device_seen. Keep the auth, security and payment events, which are the ones rules need.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.