Skip to main content
Most events that matter for fraud happen on the device: the login, the session, the gameplay round, the timing telemetry that separates a person from a script. The device lane sends them without putting an API key in a browser. Your backend mints a short-lived credential scoped to one user; the app posts events with it.

Flow

1

Mint a monitoring credential

Your backend calls POST /v3/events/sdk-token/ with your API key and the user’s vendor_data.
2

Submit from the device

The app posts to POST /v1/events/ (or POST /v1/events/batch/) with the X-Monitoring-Token header.
3

Rules run as usual

The event is enriched, rolled up and evaluated by exactly the same rules as a server-submitted one.

Minting a credential

Minting requires event ingestion to be switched on for the application. While it is off, this endpoint answers 403 with {"code": "event_monitoring_disabled"} rather than handing out a credential that could never write.

Submitting

Note what the payload does not carry: no API key, and no subject. Both are enforced server-side.

What the server enforces

  • Subject binding. The credential is scoped to one vendor_data at mint time. A subject block in the request body is overwritten, so a tampered client cannot write to another user’s timeline.
  • Network context. The IP address, user agent, accept-language and origin are derived from the request, and those server-derived values win over any client hint for rule evaluation. Rule evidence records the difference as a field source.
  • Automation score. Didit decides device_context.bot_score on the server, on a 0 to 100 scale, the one event.device.bot_score rules compare. It reads the request itself: a user agent that names an automation tool, such as a headless browser or a browser driver, scores 100. It also reads 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). Didit decides what that evidence is worth, so the score does not depend on a number the device computed about itself. Older SDK versions report their own score instead, on a 0 to 1 scale in the X-Didit-FP-Bot-Score header and the batch’s fingerprint_v2.bot.score (0.9 becomes 90). Nothing a device sends can lower the score: its evidence and its own score can only raise it. A bot_score the 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. When Didit has nothing to go on (no evidence it can read, no score from the SDK, nothing in the request), 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/.
  • Category scope. A credential scoped to session cannot submit a payment event; it is rejected with 400.
  • Use budget. A batch spends one use per event, so a 500-event batch cannot slip past a 10-use credential as a single use.
  • Origin binding. When bind_to_origin is set, a request whose Origin does not match is refused - including one with no Origin at all.

Batching

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/app backgrounding.

What to drop under backpressure

If you have to shed events, shed the cheap ones. These are safe to drop: session.page_view · session.sdk_heartbeat · session.sdk_loaded · session.device_seen · session.bot_signal_observed · bonus.promotion_viewed · affiliate.referral_clicked These are not - flush them first: every security, payment, dispute and responsible_gambling event, plus gameplay.bet_placed, gameplay.bet_settled and gameplay.p2p_settlement. The list endpoints return the same classification per event as is_droppable, so a client can be driven by it rather than by a hardcoded copy.

Web SDK

@didit-protocol/signals is the browser client of this lane: it queues, batches, retries and attaches the device fingerprint for you.
Every event and transaction the page sends carries a light device fingerprint: the stored device ID, the navigator and the kind of in-app browser.

Automation evidence

From version 0.3.0, the package also sends what it read about how the page is driven, such as signs that an automation tool drives the browser. There is nothing to turn on. The page sends those facts and no score: Didit decides the automation score on its servers. The facts are read by a second file of the package (about 13.7 KB gzipped), which is loaded the first time something is sent, so the part your page loads up front stays under 6 KB. A bundler emits it as a chunk of its own and nothing changes in your code. To read them, it reads no canvas, no audio, no fonts and no graphics of the device, and it stores nothing. A request waits for it for at most 2 seconds, and otherwise goes out without them.

Full device fingerprint

From then on every event and transaction the page sends carries the full device fingerprint: the one Didit’s hosted verification flow collects. It adds the graphics, font, canvas, audio and hardware signals and whether the page runs on an emulator or in a virtual machine. It is off unless you turn it on. Whether you may read these signals of your visitor’s device is yours to decide, under the rules your site follows. Without it the package sends the light fingerprint with the automation evidence.

Where the device ID is kept

The stored device ID lives in localStorage and in a cookie, with or without the full fingerprint. An ID your visitor cleared is gone: the device is new on the next page.

Upgrading from version 0.2

Remove the @didit-protocol/signals/device import and the enableDeviceIntelligence() call: that entry no longer exists. To keep sending the full fingerprint, call configureDevice({ fullFingerprint: true }) in its place. Version 0.2 also kept the device ID in IndexedDB and Cache storage once enableDeviceIntelligence() was called. From version 0.3.0 the ID is kept in localStorage and a cookie only. In version 0.2 the full fingerprint is turned on like this:

Automatic capture

One optional entry of the same package adds to it, from version 0.2.0.
Every event carries session.session_id and a sequence number, so a user’s path through your site reads in order on their timeline. The telemetry of session.bot_signal_observed is what event rules read as event.bot.*: a script’s timing_variance_ms is close to 0, and a script that dispatches its own clicks shows up in untrusted_actions. Automatic capture never reads the value of a field, which keys are pressed, the text of the page, element IDs, query strings or URL fragments. It reports a page by its path, with every segment that looks like an identifier replaced by :id: /users/48213/orders is sent as /users/:id/orders. A credential belongs to one user, so nothing is sent before your backend knows who is there. What happens before that, such as a visit to the forgotten-password page followed by a sign-in, is kept in memory (25 events by default) and sent with the first credential, marked pre_auth: true. An action of somebody who never signs in goes through your backend, on the server lane. Read the device in the browser with getDeviceContext() from this entry, send it to your backend with the action, and have your backend put it in the event’s device_context, so the event meets the same device as the ones sent from the browser.
Automatic capture uses about two events per page, and a credential is good for 1,000 events unless you mint it with a higher max_uses.

Native apps

DiditSignals, part of the iOS and Android SDKs, is the same client for an app: submitEvent with a monitoring token, a batched queue, and the device fingerprint on every batch. From version 4.15.0 of the iOS and Android SDKs, automatic capture works as on the web, with the same events and the same payload keys, so one set of event rules covers your site and your app.
On Android the SDK learns which activity is in front from the moment it is initialized, so call startAutocapture early, for example in Application.onCreate(). If your app initializes the SDK later, when a screen is already shown, pass that activity so the session starts on it: DiditSignals.startAutocapture(options, activity = this). iOS finds the app’s windows by itself. An app does not send two of the web’s payload fields: untrusted_actions and the payload’s bot_score. Its automation score still reaches your rules as event.device.bot_score: Didit decides it from what the SDK sends with every batch, as described under Automation score above. Automatic capture in an app never reads what is typed, which keys are pressed, the text or labels of views, view identifiers or coordinates. It keeps the time of each touch and the direction of each move, and sends counts and timing only.

Header compatibility

The canonical header is X-Monitoring-Token. X-Transaction-Token is accepted as a temporary alias so an app that already holds a transaction credential path can migrate incrementally.
The alias is transitional and will be removed before the events API reaches general availability. Send X-Monitoring-Token in new code.

Choosing a lane

Both produce identical event records and run identical rules. Use the server lane whenever no end user is present.

Next

Event ingestion

The envelope, categories, retention and idempotency.

Rules on events

Velocity, ratio, sequence and correlation rules.
Last modified on November 25, 2026