The three surfaces
JS snippet
Collects browser, device, and network signals and posts them to
rest.shieldlabs.ai automatically. You install it once; you do not call this endpoint yourself.Webhooks
Push delivery. ShieldLabs POSTs the Risk Score and signals to each endpoint you register in the dashboard, about a second after a visit.
Server API
Pull. Call from your backend to read scored snapshots (History API) and, when needed, your domain profile and balance (Management API).
Hosts
The development hosts mirror these for local and staging work (
dev.account.shieldlabs.ai/api, dev.cdn.shieldlabs.ai, …).
Authentication
Each domain has three server credentials plus per-webhook signing secrets. They are not interchangeable.
History API (recommended for snapshot reads):
No synchronous score endpoint (today)
There is no request that returns a Risk Score in its response. Scoring is asynchronous and typically takes about a second. So the snippet posts signals, ShieldLabs scores them, and the result reaches you by webhook and through the History API. TheRequestID is the join key that ties a snapshot, its webhooks, and its history rows together.
Billing and limits
- One identification consumes 1 request from your domain balance.
- Reading your profile, receiving webhooks, viewing the dashboard, and History API reads on
account.shieldlabs.aiare free. - The History API defaults to 20 rows and accepts a
limitup to 100. - When the balance reaches 0, new identifications return
402, as the Billing page details. History and profile reads do not return402. - Infrastructure rate limits protect the gateways and never feed the Risk Score.
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 the Management API; the History API
created_atmay useYYYY-MM-DD HH:MM:SSinstead of ISO 8601. - Identifiers (
RequestID,DeviceID,VisitorID,SessionID,CookieID) are UUIDs.UserHIDis your own hashed user id, a free-form string.
Next steps
Identification Flow
How signals become a score, and how the webhook and History API fit together.
Webhooks
The flat webhook payload,
X-Shield-Signature verification, and delivery guarantees.Server API
History API, Management API profile, and full request and response detail.
Data Models
WebhookEvent, Snapshot, WebhookSignal, ScoreDetail, and Profile schemas in one place.