Error codes

Failures are returned as HTTP 200 with success: false and an error-codes array. Branch on the code, never on the status.

{ "success": false, "error-codes": ["invalid-input-origin"] }

Issuing a challenge

Code Cause Fix
missing-input-sitekey no sitekey sent, or longer than 64 characters send the site's public key
invalid-input-sitekey no site has that sitekey check for a typo, or that the site still exists
invalid-input-origin the request's Origin host is not on the site's allowlist add the hostname in the dashboard; see Sites and domains
quota-exhausted monthly quota and credits are used up. Accompanied by "unavailable": true top up or upgrade. Show a quiet state, not an error.

Solving

Code Cause Fix
invalid-challenge malformed challenge id, or a challenge of an unknown type request a new challenge
challenge-expired expired, already solved, or never existed — one code for all three, on purpose request a new challenge
invalid-proof-of-work the nonce does not meet the required leading zero bits recompute against pow.challenge and pow.bits; see Submit a solution
incorrect-solution the answer is wrong, or the solution object has the wrong shape for the type let the visitor retry; three wrong attempts destroy the challenge

Verifying

Code Cause Fix
missing-input-response no response token sent read the privcaptcha-response form field
missing-input-secret no secret sent pass your site secret
invalid-input-secret no active site holds that secret check the value, and whether it was rotated
invalid-input-response unknown, expired, already-used token, or a token minted for another site treat as failure; reset the widget and let the visitor solve again

SDK-only

Code Cause Fix
verification-unavailable the SDK could not reach or parse a response from /siteverify treat as failure. This is the fail-closed path and is generated client-side, never returned by the API.

Rate limiting

Exceeding the per-IP limit on the challenge or solve endpoints returns HTTP 429 with a plain message rather than an error-codes payload. Send Accept: application/json so the response comes back as JSON rather than an HTML error page.