The three surfaces
JS snippet
Collects device and network signals in the browser and posts each identification to
rest.shieldlabs.ai automatically. On signed-in pages, checkAuthenticatedUser passes the hashed User HID. You install it once; you do not call this endpoint yourself.Webhooks
Push delivery. ShieldLabs POSTs each identification’s Risk Score and named risk signals to every endpoint you register in the analytics dashboard, about 300 ms after the check in the browser.
Server API
Pull. Read any identification by its request ID, or every identification of one user, device, visitor or public IP (History API), and the remaining included volume on your account (Management API).
What the API returns
Each webhook and each History row is one identification, the event layer under your users, devices, visitors and IPs. It carries the keys that link it to each of them, so the account-level view is one lookup away.
High-Risk Events (Multi-accounting, Account sharing, Impossible travel and Account takeover, each at Medium or High confidence) are detected on your users and are available in the analytics dashboard, the API and webhooks. In the analytics dashboard, Overview shows how many of your users have each one, Analytics filters by them, and the user card shows each event with its confidence.
Pass a hashed User HID with
checkAuthenticatedUser on every signed-in page. Users, account-level risk and all four High-Risk Events are built on it. Users, devices, visitors and IPs explains the model.
Hosts
For development and staging, register a separate domain (for example
dev.example.com) and call the same hosts with that domain’s keys. The environments guide walks through it.
Authentication
Each domain has three keys, one for the browser and two for your backend, plus a signing secret for each webhook endpoint. They are not interchangeable.
History API (recommended for reads):
Asynchronous scoring
Scoring is asynchronous. The snippet posts the collected signals and receives an acknowledgment; ShieldLabs scores the identification in about 300 ms and delivers the result by webhook and through the History API. Therequest_id ties the snippet call, its webhook and its History record together, and the user_hid, device_id, visitor_id and IP fields tie the identification to your users, devices, visitors and IPs.
Billing and limits
- Each identification uses 1 of your account’s included identifications. All your domains share one quota.
- Reading your profile, receiving webhooks, using the analytics dashboard and History API reads are free.
- The History API defaults to 20 rows and accepts a
limitup to 100, withoffsetfor paging. - When your account’s included volume is used up, the identification request sent by the snippet returns HTTP
402until the billing cycle resets or you change plan. The Billing page has the details. History and profile reads keep working. - Infrastructure rate limits protect the gateways. During a per-IP ban, identifications carry the marker value
999in place of a Risk Score; treat any value above 100 as that marker.
Conventions
- Responses are JSON. Error bodies are not uniform, so branch on the HTTP status code rather than parsing a body field. The Errors page enumerates each case.
- Timestamps are ISO 8601 UTC on webhooks and the Management API; the History API
created_atmay useYYYY-MM-DD HH:MM:SSinstead of ISO 8601. - Identifiers (
request_id,device_id,visitor_id,session_id,cookie_id) are UUIDs.user_hidis the hashed User HID you pass for a signed-in account, a free-form string, and"anonymous"on anonymous checks.
Next steps
Identification Flow
How an identification is scored, reaches your backend, and leads to the account behind it.
Webhooks
The flat webhook payload,
X-Shield-Signature verification, and delivery guarantees.Server API
The History API, the account read, and the Management API profile.
Data Models
Every object the API returns, and the user, device, visitor or IP each identifier maps to.