Overview

Most integrations never touch the HTTP API directly: the widget calls the challenge and solve endpoints for you, and an SDK calls siteverify. Read this if you are building your own client.

Base URL

Endpoint Called by Auth
POST /api/v1/challenge the visitor's browser sitekey + Origin
GET /api/v1/challenge/{cid}/{name} the visitor's browser the challenge id
POST /api/v1/solve the visitor's browser the challenge id
POST /api/v1/siteverify your backend secret

Requests

Send parameters as application/x-www-form-urlencoded. Responses are JSON.

Status codes

Business outcomes come back as HTTP 200 with success: false, not as a 4xx. A wrong answer, an expired challenge and an unknown secret are all ordinary results of a working endpoint, so branch on success and error-codes, never on the status code.

{ "success": false, "error-codes": ["challenge-expired"] }

A real HTTP error still means what you expect: 404 for a challenge image that does not exist, 429 when a rate limit trips.

Every failure code is listed on Error codes.

CORS

The browser-facing endpoints are cross-origin by design.

  • Origin is checked against the sitekey's domain allowlist, and only a matching origin is echoed back. Unknown origins are never reflected.
  • Vary: Origin is always sent.
  • Access-Control-Allow-Credentials is never sent. Do not send cookies; the widget uses credentials: 'omit'.
  • OPTIONS preflights are answered with 204 and are cached for 600 seconds.

Rate limits

/api/v1/challenge and /api/v1/solve are limited to roughly 10 requests per second per IP. That is a flood guard, not the cost control — the real price a bot pays is the proof of work, plus the escalating difficulty a failing client earns. The limit is deliberately loose because a university or a mobile carrier puts thousands of legitimate visitors behind one address.

/siteverify carries no IP rate limit at all. It is called server-to-server, so every request from a busy customer arrives from one address; limiting it there would throttle exactly the wrong people. It already requires a valid secret, and volume is bounded by your plan quota.