Health API
Liveness and readiness probes for load balancers and orchestrators.
Every operation of the API reference is generated from the contract the API serves, version 0.1.0. Replace YOUR_API_KEY in the samples with your key; each response shows an example in the contract's shape.
Liveness probe
/healthzAuthentication. None: anyone may call it, within a budget per client address where the description says so.
Answers while the process can serve HTTP, without checking any dependency.
Responses
| Status | What it means |
|---|---|
| 200 OK | The process is up. HealthStatus (application/json) |
| Any other status | An error, as RFC 9457 problem details. Problem (application/problem+json) |
Request
curl https://api.zerocaptcha.io/healthzconst response = await fetch("https://api.zerocaptcha.io/healthz");console.log(response.status, await response.text());import requests
response = requests.get( "https://api.zerocaptcha.io/healthz", timeout=30,)print(response.status_code, response.text)Response
{
"status": "ok"
}bad_request
{
"type": "https://zerocaptcha.io/docs/reference/errors/#bad_request",
"title": "Bad request",
"status": 400,
"instance": "/healthz",
"code": "bad_request",
"request_id": "0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b"
}Example values in the contract's shape, version 0.1.0.
Readiness probe
/readyzAuthentication. None: anyone may call it, within a budget per client address where the description says so.
Answers when the service can reach its database, which must reply within two seconds.
Responses
| Status | What it means |
|---|---|
| 200 OK | Ready for traffic. HealthStatus (application/json) |
| 503 Service Unavailable | The database cannot be reached. Problem (application/problem+json) |
| Any other status | An error, as RFC 9457 problem details. Problem (application/problem+json) |
Request
curl https://api.zerocaptcha.io/readyzconst response = await fetch("https://api.zerocaptcha.io/readyz");console.log(response.status, await response.text());import requests
response = requests.get( "https://api.zerocaptcha.io/readyz", timeout=30,)print(response.status_code, response.text)Response
{
"status": "ok"
}service_unavailable
{
"type": "https://zerocaptcha.io/docs/reference/errors/#service_unavailable",
"title": "Service unavailable",
"status": 503,
"instance": "/readyz",
"code": "service_unavailable",
"request_id": "0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b"
}bad_request
{
"type": "https://zerocaptcha.io/docs/reference/errors/#bad_request",
"title": "Bad request",
"status": 400,
"instance": "/readyz",
"code": "bad_request",
"request_id": "0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b"
}Example values in the contract's shape, version 0.1.0.