Skip to content

Siteverify API

The siteverify API is the API used to verify CAPTCHA solutions.

It lives on /api/v0/siteverify of your designated hostname (eg https://global.captcha.party/api/v0/siteverify).

The API only accepts POST requests, with either a JSON or formdata body.

Request payload

The following arguments are allowed:

Name Required Description
solutionyesthe solution to verify
secretyesyour secret
remoteipnoip of the user
useragentnouser agent of the user

remoteip

The remoteip argument is used to verify the user’s IP address matches the one which was used to solve the challenge. This is useful to prevent CAPTCHA farms.

Response payload

The response is a JSON object which is either a success or fail. The response payload will always have the success field.

Success payload

If the success field is true, then the response has the following shape:

{
"success": true,
"timestamp": 1672527600,
"hostname": "example.com",
}

The timestamp is a UNIX timestamp of when the widget started executing the challenge.

Failure payload

If the success field is false, then the response includes an additional errors field which is a list of error codes.

{
"success": false,
"errors": ["..."],
"timestamp": 1672527600,
"hostname": "example.com",
}

5xx responses and non-JSON content

If you receive a non-JSON response or 5xx status code, you should retry the request a few times with a few seconds delay.

If you are still unable to receive a response by our servers after a few retries, you need to make a decision of whether to fail open or fail closed.

If you are encoutering frequent errors, please consult our status page and contact support.

Ratelimits

Captcha.party has a ratelimit of 100 requests per 10 seconds per IP. This limit does not differentiate between valid and invalid requests. If you exceed this limit, you will be blacklisted for 10 seconds and see a 429 response.

Consider using Offline Validation to reduce invalid requests.

Error codes

When the success field is false, the response payload will contain the errors field which is an array of error codes. You can find the meaning of each error-code in the table below:

Error Code Description
bad-requestthe request was invalid or malformed
missing-input-solutionthe solution field was missing in the request
missing-input-secretthe secret field was missing in the request
invalid-input-solutionthe solution field was invalid
invalid-input-secretthe secret field was invalid
invalid-input-remoteipthe remoteip field was invalid
mismatched-sitekey the solution and secret do not belong to the same sitekey
invalid-hostnamethe /siteverify API is called on the wrong hostname
expired-solutionthe provided solution expired
replayed-solutionthe provided solution is replayed (was redeemed before)
mismatched-remoteipthe provided remoiteip and actual do not match
mismatched-useragentthe provided useragent and actual do not match
automation-detectedwe detected the usage of automation software
ratelimit-exceededyou exceeded the ratelimit
internal-erroran internal error occured