Verify a token

The server-to-server call that turns a token into a decision. This is the only endpoint that uses your secret, and the only one that proves anything: a token nobody redeems is just a form field.

POST /api/v1/siteverify

No IP rate limit — see Overview.

Parameter Type Required Description
secret string yes your site's secret, max 128 characters
response string yes the token from the privcaptcha-response form field, max 128 characters
remoteip string no the visitor's IP. Accepted for compatibility with reCAPTCHA and hCaptcha clients; not currently used.
curl -X POST https://privcaptcha.com/api/v1/siteverify \
  -d "secret=sk_your_secret" \
  -d "response=Vv7..."
{
  "success": true,
  "challenge_ts": "2026-08-10T12:34:56+00:00",
  "hostname": "example.com",
  "error-codes": []
}
Field Meaning
success whether the token was valid and has now been consumed
challenge_ts ISO 8601 UTC timestamp of when the puzzle was solved
hostname the host the challenge was issued to. Check it if you serve several domains from one site.
error-codes empty on success; see Error codes

Rules that matter

  • Single-use. A token verifies exactly once. Retrying a submit with the same token fails; call privcaptcha.reset() and let the visitor solve again.
  • 120 seconds. After that the token is gone. Verify during the request that handles the submit, not from a background queue.
  • Bound to your site. A token minted for one site cannot be verified with another site's secret. A rejected cross-tenant attempt does not consume the token — it still belongs to whoever legitimately holds it.
  • Fail closed. If the call times out or errors, treat the request as unverified. "We could not check" must never resolve to "allowed"; every official SDK already does this and reports verification-unavailable.
  • Rotating the secret invalidates the old one immediately.

Compatibility aliases

Two aliases exist so a migrating integration can keep its existing verify code. They redeem exactly the same tokens; only the response shape differs.

Path Shape
/api/v1/siteverify native
/siteverify hCaptcha-shaped: adds credit: false and score: 0.0
/recaptcha/api/siteverify reCAPTCHA-shaped

The extra hCaptcha keys are emitted because drop-in libraries assert on them. score is always 0.0 and carries no meaning here: PrivCaptcha does not profile visitors, so there is nothing to score. Do not branch on it.

See Migrating from reCAPTCHA and Migrating from hCaptcha.