Integrations · Developers

Sign-up fraud screening REST API

The InlineShield REST API screens a sign-up before your server creates the account. Use a browser script plus one server call to /api/v1/siteverify, or a single server-only call to /api/v1/verify. Both return a verdict, a risk score, triggers, plain-language reasons and a recommended action you can act on in a few lines of code.

Last updated

Option 1: browser script and siteverify

  1. Add the script to your sign-up page, with the site key from the console. It checks the browser and adds a token to the form as the field betshield_token.
  2. When the form arrives, your server sends the token and the email to POST /api/v1/siteverify with your secret API key in the X-Api-Key header.
  3. Create the account, hold it, or refuse it based on the answer.
Sign-up page
<script src="https://api.inlineshield.io/inlineshield.js" data-sitekey="YOUR_SITE_KEY" async></script>

Server code, ready to paste

These are the same snippets the console's Setup page gives you, with your keys filled in there. Each one calls /api/v1/siteverify, falls back to /api/v1/verify when the browser token is missing, and accepts the sign-up if InlineShield can't be reached unless you switch it to reject.

# $TOKEN is the betshield_token form field, $EMAIL the submitted email
curl -X POST https://api.inlineshield.io/api/v1/siteverify \
  -H "X-Api-Key: $INLINESHIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"token\": \"$TOKEN\", \"email\": \"$EMAIL\"}"

# Switch on action: "allow" → create the account; "hold" → create it pending and store reviewId; "block" → reject the signup.
# A "hold" answer also carries a reviewId (rev_...): keep it, the signup is resolved later by a
# webhook (signup.approved / signup.rejected) or by GET https://api.inlineshield.io/api/v1/reviews/<reviewId>.

# If the answer is {"success": false, "error": "NO_TOKEN"} (script blocked, timed out or
# missing), judge the signup server-side instead, with the visitor's IP and User-Agent
# taken from YOUR incoming request, and switch on "action" the same way
# (strict mode, REQUIRE_INLINESHIELD_TOKEN = true in the other snippets, rejects instead):
curl -X POST https://api.inlineshield.io/api/v1/verify \
  -H "X-Api-Key: $INLINESHIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"email\": \"$EMAIL\", \"ip\": \"$VISITOR_IP\", \"userAgent\": \"$VISITOR_UA\"}"

# HTTP 401 (bad API key) means reject. HTTP 402 {"error": "QUOTA_EXCEEDED", ...} means the
# account is over its monthly check limit: treat it like "InlineShield unavailable", exactly as
# for a timeout, 5xx, any other non-2xx answer, non-JSON, or a /verify answer with no
# "decision" field: accept the signup and log it (INLINESHIELD_FAIL_CLOSED = true in the other
# snippets rejects instead).

The PHP example loads InlineShield's PHP SDK files, which you download from the console's Setup page.

Option 2: server only, with /api/v1/verify

No script on the page? Call POST /api/v1/verify from your registration handler with the email, the visitor's IP address and their User-Agent, all taken from your own incoming request. Send the player's IP, not your server's: a cloud server's IP is a datacenter IP and would be held.

Server-only check
curl -X POST https://api.inlineshield.io/api/v1/verify \
  -H "X-Api-Key: $INLINESHIELD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "ip": "203.0.113.10", "userAgent": "Mozilla/5.0 …"}'

Reading the answer

  • decision: ALLOWED, QUARANTINED (held for review) or BLOCKED.
  • action: allow, hold or block. A hold also carries a reviewId.
  • recommendedAction: allow, allow_no_bonus, review or block; the signup.approved webhook can later say require_kyc. See risk verdicts.
  • riskScore (0–100) and reasons in plain language.

Held sign-ups are settled later by a signed webhook (signup.approved or signup.rejected) or by asking GET /api/v1/reviews/<reviewId>. Webhooks carry an HMAC-SHA256 signature in the X-InlineShield-Signature header. Changes to the API are listed in the integration changelog.

Frequently asked questions

Which languages have ready-made code?

PHP, Node.js, Python, Java and C#, plus cURL for anything else. The console's Setup page shows the same code with your keys filled in.

siteverify or verify: which should I use?

Use the browser script and /api/v1/siteverify when you can: the browser check adds signals a server can't see, such as headless browser hints and the time zone. Use /api/v1/verify when you can't change the sign-up page.

What if InlineShield is slow or down?

The snippets accept the sign-up and log a warning if InlineShield is unreachable, times out or errors. Set INLINESHIELD_FAIL_CLOSED to true to reject instead.

What happens when I go over my monthly quota?

/api/v1/verify answers HTTP 402 and /api/v1/siteverify answers success: false, both with QUOTA_EXCEEDED, and the snippets treat it like "InlineShield unavailable". You also get an email before you reach the limit.

Is there a sandbox?

There is no separate sandbox host yet. The console's Setup page has a "Send a test signup" button: it runs one sign-up through InlineShield with your own keys, creates a held test sign-up you can approve to try your webhook, and does not count against your quota.

How do I authenticate?

Server calls send your secret API key in the X-Api-Key header. The site key in the browser script is public and only identifies your site.

Get your API key

The Free plan includes 1,000 screenings a month. Create an account, add your keys and see real verdicts on your own traffic. No card, no sales call, no setup fee.