Documentation

Everything needed to drop Katcha into a site: the script tag, the verify endpoint, and how to test both before going live.

Quickstart

Add the widget script to any page with a form you want protected, then verify the resulting token on your server before acting on the submission.

index.html
<script src="https://cdn.katcha.eu/v1/widget.js"
        data-site-key="YOUR_SITE_KEY"
        async></script>

<form id="signup" action="/submit" method="post">
  <input name="email" type="email">
  <button type="submit">Sign up</button>
</form>

Configuration

Pass options as attributes on the script tag, or per-form via data-katcha-* attributes on an individual form.

AttributeValuesDefault
data-site-keystring, requiredNone
data-modeinvisible · widgetinvisible
data-thresholdlow · medium · highmedium
data-langISO language codebrowser default

Server-side verification

Never trust the token on its own. Confirm it server-side before treating a submission as human-verified.

request
POST https://api.katcha.eu/v1/verify
Content-Type: application/json

{
  "token": "<katcha_token from the form>",
  "site_key": "YOUR_SITE_KEY"
}
response
{
  "success": true,
  "risk": "low",
  "reasons": []
}

Error codes

CodeMeaning
invalid-site-keyThe site key doesn't match a registered domain.
token-expired The token wasn't verified within its short validity window. Ask the visitor to resubmit.
token-already-usedTokens are single-use; this one was already verified once.
missing-token No token was attached to the request. Check that the widget script loaded before submit.

Testing

Use a sandbox site key during development. It always returns "risk": "low" so you can build your integration without triggering real detection logic.

Sandbox key: katcha_test_00000000, for local development only, not for production traffic.

Rate limits

Each plan includes a monthly allowance of protected requests (see pricing). Going over it never blocks traffic. Extra requests are billed at your plan's rate on the next invoice, and we email you at 80% and 100% of your allowance.