Management API
The Management API is the server-side surface for your domain. Use it to read your profile and balance, set your webhook callback URL, and search the scored snapshots that ShieldLabs has stored. It is the authoritative, pull-based way to read a Risk Score when you cannot risk a dropped webhook. This API is keyed by your Secret Key and must only be called from your backend. Never call it from the browser.Base URL and authentication
Every Management API call lives under one base path that carries the credentials in the URL:
The credentials are validated against the domain’s Secret Key and its enabled status. Wrong credentials, an unknown domain, or a disabled domain return
401.
Endpoints at a glance
| Method | Path | Purpose | Cost |
|---|---|---|---|
GET | /{domain}:{secret}/profile | Read domain config, balance, masked keys | Free (0 requests) |
POST | /{domain}:{secret}/callback | Set the webhook callback URL | Free (0 requests) |
GET | /{domain}:{secret}/history/{type}/{value}?limit=N | Search stored snapshots | 1 request per returned row (minimum 1) |
There is no synchronous “identify” or “score” endpoint here. The score is produced asynchronously: the JS snippet posts signals to
rest.shieldlabs.ai, ShieldLabs scores them in about a second, and the result is delivered by webhook and stored for the History API. See Identification Flow.GET /profile
Returns your domain’s configuration and current balance. The keys are masked to their last four characters. This call is free: it does not consume requests.Response
The registered domain this profile belongs to.
Your remaining balance, measured in requests. One identification consumes 1 request, and the History API consumes 1 request per returned row. When this reaches 0, scoring and History calls return
402. See Billing.The webhook URL ShieldLabs posts scored results to. Empty if no callback is set. Update it with
POST /callback.Your Public Key, masked to the last four characters. The browser-safe credential that goes in the snippet URL. Read the full value from the dashboard.
Your Secret Key, masked to the last four characters. Used for this API and webhook signature verification. The full value is shown only at creation in the dashboard.
ISO 8601 UTC timestamp of when the domain was created.
POST /callback
Sets (or replaces) the webhook callback URL for the domain. The request body is the URL itself, as plain text (not JSON). This call is free.The raw HTTPS URL ShieldLabs should POST scored results to. Sent as the plain-text request body, not wrapped in a JSON object. Use a publicly reachable HTTPS endpoint.
initial webhook and, when the real-IP check completes, an optional update webhook. Webhook delivery is at-most-once with no retries, so verify the signature, make your handler idempotent on RequestID, and fall back to the History API for anything that must not be missed.
You can also set and manage the callback from the dashboard. The dashboard and this endpoint write the same field. Either is fine.
GET /history/{type}/{value}
Searches the snapshots ShieldLabs has stored for your domain. Returns an array of Snapshot objects, newest first. This is the guaranteed read path for any scored result, the right choice when a webhook may have been missed.
Path parameters
The field to search on. One of:
ip: client IP address (IPv4 validated)user_hid: the hashed user id you passed via the snippet (free-form string)visitor_id: a VisitorID (UUID validated)request_id: a single identification’s RequestID (UUID validated)device_id: a DeviceID (UUID validated)
404. A value in the wrong format (for example a non-UUID for device_id) returns 400.The value to match for the chosen
type. UUID types are UUID validated, ip is IPv4 validated, user_hid is a free string.Query parameters
Maximum number of rows to return. Capped at 100: a higher value is clamped to 100. Rows are ordered newest first.
Common search patterns
Billing
The History API bills 1 request per returned row. An empty result still bills 1 request (the lookup itself). So a search returning 20 snapshots costs 20 requests, and a search returning 0 costs 1. If your balance is insufficient for the result, the call returns402. Webhooks, dashboard views, and exports are free. See Billing.
The Snapshot object
A snapshot is a single scored identification. The History array returns a superset of the webhook body: the same identity and score fields, plus connection and network detail captured during scoring.Identity and score fields (shared with the webhook)
The per-call UUID, minted client-side and used as the join key across snapshot, webhook, and history. See Identifiers.
Per-visit UUID from the browser’s
sessionStorage (a 10-minute visit window).First-party cookie/localStorage UUID. Lost when the visitor clears cookies or storage.
Server-derived UUID from dozens of stable browser-fingerprint components. Durable: survives cookie-clear, incognito, and IP rotation within the same browser. Browser-bound (a different browser is a different DeviceID; no cross-browser recognition today).
Server-derived UUID from
DeviceID + CookieID. Changes when the cookie is cleared. Multiple VisitorIDs can map to one DeviceID.The hashed/pseudonymous user id you passed via the snippet. Never a raw email or login.
The client’s public IP at the time of the check.
Operating system, e.g.
Windows, Mac OS X, iOS.Two-letter ISO country derived from the IP.
The Risk Score, 0 to 100 (hard-capped at 100). Higher means more anonymous, masked, or spoofed. Read it with the band guide below.
The explainable breakdown of the score. Each entry is
{ "Value": <int>, "Description": "<signal>" }: the signal that fired and the points it contributed. See Signals for the full reference.ISO 8601 UTC timestamp of the most recent request for this identity.
Connection and network fields (History only)
These fields are not in the webhook body. They describe the connection and network fingerprint observed during scoring. They are useful for forensics and your own correlation logic.Detected browser name, e.g.
Chrome, Safari.Form factor:
desktop, mobile, or tablet.The classified connection type for the IP:
direct, privacy_relay, vpn, proxy, or tor.The IP discovered through the WebRTC real-IP (STUN) check, used to corroborate or contradict the public IP. Compare it against
IP to reason about masking.Two-letter ISO country derived from the WebRTC-discovered IP.
The WebRTC ICE candidate type observed, e.g.
host, srflx, relay.TCP Maximum Segment Size from the network fingerprint. A low-level input that helps distinguish direct connections from tunneled ones.
Detected MTU value from the network fingerprint.
A coarse label derived from the MTU/network fingerprint that hints at the connection’s shape.
A snapshot is a point-in-time record of one identification. The score on a snapshot is the score as computed at that time. If a later
update webhook changed the result (after the real-IP check), the stored snapshot reflects the recomputed value.Reading the score
ShieldLabs scores. Your application decides. The Risk Score is a 0 to 100 number with four bands you can act on:| Band | Range | Recommended action (a guide, not a rule) |
|---|---|---|
| Clean | 0–9 | Pass through, no friction |
| Low | 10–29 | Allow, worth logging |
| Medium | 30–59 | Step-up challenge, second look, or review |
| High | 60–100 | Block, review, or require verification |
Errors
All errors return JSON of the form{ "error": "..." }.
| Status | Meaning | What to do |
|---|---|---|
200 | Success | Parse the response. |
400 | Bad parameters | A malformed value, e.g. a non-UUID where a UUID is required. Fix the request. |
401 | Bad credentials or disabled domain | Check {domain}:{secret} and that the domain is enabled. |
402 | Out of requests | Balance exhausted (History needs 1 request per returned row). Top up. See Billing. |
404 | Unsupported history type or not found | {type} must be one of ip, user_hid, visitor_id, request_id, device_id. |
429 | Rate-limited | You hit an infra rate limit. Back off and retry. See Rate limits. |
500 | Internal error | Transient. Retry with backoff. |
503 | Server busy | A concurrency cap was hit. Retry with backoff. |
Next steps
Data Models
The full Snapshot, webhook body, and Score Detail schemas in one place.
Webhooks
The push delivery path: payload,
Assing signature verification, and phases.Identification Flow
How signals become a score and how the webhook and History API fit together.
Keys
Public Key vs Secret Key, where each one belongs, and how to rotate.