Docs menu
API reference

POST /api/v1/check

Browser check (site key). The browser script and the backend token check. Generated from the OpenAPI file.

Last updated

Overview

POST https://api.inlineshield.io/api/v1/check

Called by inlineshield.js in the player's browser. Authenticated by the site key in the body and the browser's Origin, which must be one of the site key's domains. Screens the sign-up and returns the verdict and a single-use token (valid for 10 minutes) for /siteverify.

The IP and User-Agent are taken from the request itself, never from the body. Reasons produced by learned signals are shown as one generic line here; /siteverify returns them in full.

Per-minute limits: 30 checks per client IP, and your plan's limit per account (300 for test site keys).

Authentication

No API key. The site key in the body and the browser’s Origin header identify your site; see the request fields and parameters below.

Parameters

NameInTypeRequiredDescription
OriginheaderstringyesSet by the browser. Must be an https or http origin on the site key's list of domains.

Request body

JSON (Content-Type: application/json), required.

Other fields are ignored. The IP and User-Agent always come from the request.

FieldTypeRequiredDescription
siteKeystringyesYour site key (bs_site_…, or bs_site_test_… for test mode).
emailstringyesat least 1 character
usernamestringno
clientDwellMsnumbernoMilliseconds the form was open before it was submitted.
honeypotstringnoThe value of a hidden field people leave empty.
signalsobjectnoBrowser signals collected by inlineshield.js. Invalid values are ignored.
signals.webdriverbooleanno
signals.tzstringnoIANA time zone, e.g. Europe/Berlin.at most 64 characters
signals.langsarray of stringnoUp to 5 browser languages are kept.
signals.automationHintsarray of stringnoValues: webdriver, cdc_props, no_languages, headless_ua_ch, phantom, nightmare, selenium_props

Request examples

{
  "siteKey": "bs_site_test_9QpX2mV7cN4bL1kJ8hG5fD3sA6zW0yT",
  "email": "allow@test.inlineshield.io",
  "clientDwellMs": 8200
}

The first example as a cURL command:

cURL
curl -X POST https://api.inlineshield.io/api/v1/check \
  -H "Origin: https://www.example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "siteKey": "bs_site_test_9QpX2mV7cN4bL1kJ8hG5fD3sA6zW0yT",
  "email": "allow@test.inlineshield.io",
  "clientDwellMs": 8200
}'

Responses

200 OK

The verdict and a token for /siteverify. Live responses carry the quota headers; test responses do not.

Headers: X-Quota-Limit (optional), X-Quota-Used (optional), X-Quota-Reset (optional), X-Quota-State (optional).

FieldTypeRequiredDescription
decisionstringyesALLOWED: let the player in. QUARANTINED: hold for review. BLOCKED: refuse.Values: ALLOWED, QUARANTINED, BLOCKED
riskScorenumberyes0 (lowest risk) to 100.0 to 100
reasonsarray of stringyesPlain-language reasons for the result.
requestIdstringyesThe screening's id. Use it for feedback and support.matches ^AUD-
tokenstringyesSingle use, valid for 10 minutes: send it to /siteverify from your backend.matches ^bst_
{
  "decision": "ALLOWED",
  "riskScore": 0,
  "reasons": [
    "Test mode: allow@test.inlineshield.io always gives ALLOWED / allow."
  ],
  "requestId": "AUD-MHH3K2QZ-4F1C9B2E7D10",
  "token": "bst_q3Jm0b8vN2kXo7rT5wYz1cE4hL6pA9sD0fG2jK8uV3i"
}

400 Bad Request

No email, or a body that is not valid JSON.

FieldTypeRequiredDescription
errorstringyesValues: BAD_REQUEST
messagestringyes

401 Unauthorized

No site key, or an unknown or revoked one.

FieldTypeRequiredDescription
errorstringyesValues: INVALID_SITE_KEY
messagestringyes
invalid
{
  "error": "INVALID_SITE_KEY",
  "message": "Unknown or revoked site key."
}

402 Payment Required

The monthly quota is used up (no token is issued).

FieldTypeRequiredDescription
error"QUOTA_EXCEEDED"yes
messagestringyes
usedintegeryesat least 0
limitintegeryesat least 0
resetsAtstring (date-time)yesThe start of the next UTC month.

403 Forbidden

The Origin is missing or not one of the site key's domains.

FieldTypeRequiredDescription
errorstringyesValues: ORIGIN_NOT_ALLOWED
messagestringyes
origin
{
  "error": "ORIGIN_NOT_ALLOWED",
  "message": "Requests from evil.test are not allowed for this site key. Add evil.test to the site's domains."
}

429 Too Many Requests

A per-minute limit, or (test site key) the daily test limit.

Headers: Retry-After.

FieldTypeRequiredDescription
errorstringyesValues: RATE_LIMIT_EXCEEDED, TEST_LIMIT
messagestringyes

500 Internal Server Error

The check failed. inlineshield.js then lets the form submit (fail open).

FieldTypeRequiredDescription
errorstringyesValues: VERIFICATION_ERROR, PERSISTENCE_FAILURE
messagestringyes

Errors

Errors are JSON, { "error": "CODE", "message": "…" }. Branch on error, never on message.

HTTP statuserrorWhen
400BAD_REQUESTNo email, or a body that is not valid JSON.
401INVALID_SITE_KEYNo site key, or an unknown or revoked one.
402QUOTA_EXCEEDEDThe monthly quota is used up (no token is issued).
403ORIGIN_NOT_ALLOWEDThe Origin is missing or not one of the site key's domains.
429RATE_LIMIT_EXCEEDED, TEST_LIMITA per-minute limit, or (test site key) the daily test limit.
500VERIFICATION_ERROR, PERSISTENCE_FAILUREThe check failed. inlineshield.js then lets the form submit (fail open).

See all errors for every endpoint.

Headers and limits

Response headerMeaning
X-Quota-LimitLive requests only: the monthly quota of the plan.
X-Quota-UsedLive requests only: screenings counted this month, this one included.
X-Quota-ResetLive requests only: when the count resets (the start of the next UTC month).
X-Quota-StateLive requests only: ok, warn (80% used), limit (100%), grace (over 100%, still served) or blocked.
Retry-AfterSeconds to wait before trying again.

The limits per endpoint and plan are on Rate limits and quotas.