Skip to main content
DocsAPI ReferenceHealth API
Back to docs

Health API

Health check endpoint

api
health

Health API

Base path: /api/health

System health check endpoint for monitoring, load balancers, and orchestrators.


GET /api/health

Run health checks against all backend dependencies (PostgreSQL and Redis) and return an aggregate status.

Auth: None (public) Feature gate: None

Response (all healthy):

HTTP status: 200

{
  "status": "ok",
  "timestamp": "2026-03-25T12:00:00.000Z",
  "checks": {
    "database": {
      "status": "ok",
      "latencyMs": 3
    },
    "redis": {
      "status": "ok",
      "latencyMs": 1
    }
  }
}

Response (partial failure):

HTTP status: 503

{
  "status": "degraded",
  "timestamp": "2026-03-25T12:00:00.000Z",
  "checks": {
    "database": {
      "status": "ok",
      "latencyMs": 5
    },
    "redis": {
      "status": "error",
      "error": "Redis unavailable"
    }
  }
}

Response (total failure):

HTTP status: 503

{
  "status": "error",
  "timestamp": "2026-03-25T12:00:00.000Z",
  "checks": {
    "database": {
      "status": "error",
      "error": "Database unavailable"
    },
    "redis": {
      "status": "error",
      "error": "Redis unavailable"
    }
  }
}

Status logic

Overall statusCondition
okAll checks pass
degradedAt least one check passes and at least one fails
errorAll checks fail

Check object

FieldTypeDescription
status"ok" | "error"Individual check result
latencyMsnumberRound-trip time in milliseconds (present only when status is ok)
errorstringError description (present only when status is error)

HTTP status codes

CodeCondition
200Overall status is ok
503Overall status is degraded or error
Back to docsdocs/product/api/health.md