Skip to content

Health Checks

Stronghold exposes three health check endpoints. None of them require authentication.

GET /health

Full health status including service dependency checks.

Terminal window
curl https://api.getstronghold.xyz/health

Response (200)

{
"status": "healthy",
"version": "1.0.0",
"services": {
"api": "up",
"database": "up",
"x402": "up"
},
"timestamp": 1708300000
}
FieldTypeDescription
statusstring"healthy" when all dependencies are up, "degraded" if any dependency is unhealthy
versionstringAPI server version
servicesobjectPer-service status (see values below)
timestampnumberUnix timestamp of the check

Service status values

ValueMeaning
"up"Service is healthy and reachable
"down"Service is unreachable or failing health checks (database)
"not_configured"Service is not configured (e.g. no database or no facilitator URL set)
"unreachable"HTTP connection to the service failed (x402 facilitator)
"error"Service responded with a 5xx status code (x402 facilitator)

Any status other than "up" causes the overall status to become "degraded".

GET /health/live

Kubernetes liveness probe. Returns 200 if the API process is running. This endpoint does not check downstream dependencies.

Terminal window
curl https://api.getstronghold.xyz/health/live

Response (200)

{"status": "alive"}

GET /health/ready

Kubernetes readiness probe. Returns 200 if the database and x402 facilitator are reachable. Returns 503 if any required dependency is unavailable.

Terminal window
curl https://api.getstronghold.xyz/health/ready

Response (200)

{"status": "ready"}

Response (503)

Database unavailable:

{
"status": "not_ready",
"reason": "database_unavailable",
"database": "down"
}

x402 facilitator unavailable:

{
"status": "not_ready",
"reason": "x402_unavailable",
"x402": "unreachable"
}

The x402 field will contain one of the non-"up" service status values described above (e.g. "unreachable", "error", "not_configured").

Use /health/ready in load balancer health checks and Kubernetes readiness probes to prevent routing traffic to instances that cannot serve requests.