Skip to content

Health check

GET
/health
curl --request GET \
--url https://api.surveycoder.io/health

Unauthenticated probe that checks Supabase, Redis, and SPSS microservice connectivity. Returns 200 when all dependencies are healthy, 503 when any dependency is degraded.

All dependencies healthy

Media type application/json

Health check response with dependency statuses.

object
success
required
boolean
data
required
object
status
required

Overall system status.

string
Allowed values: healthy degraded
timestamp
required

Server time when the check ran.

string format: date-time
version
required

Application version from package.json.

string
commit

Short Git commit SHA of the running build.

string
uptime_seconds
required

Seconds since the server process started.

integer
environment

Runtime environment.

string
Allowed values: production development
dependencies
required

Status of each external dependency.

object
key
additional properties
object
status
required
  • ok — dependency reachable and responding.
  • error — dependency unreachable or returning errors.
  • unavailable — dependency not configured (non-critical).
string
Allowed values: ok error unavailable
latency_ms

Round-trip time in milliseconds (omitted if unavailable).

integer
Example
{
"success": true,
"data": {
"status": "healthy",
"version": "1.0.0",
"commit": "a1b2c3d",
"uptime_seconds": 86400,
"environment": "production",
"dependencies": {
"supabase": {
"status": "ok",
"latency_ms": 45
},
"redis": {
"status": "ok",
"latency_ms": 2
},
"spss_service": {
"status": "unavailable"
}
}
}
}

One or more dependencies degraded

Media type application/json

Health check response with dependency statuses.

object
success
required
boolean
data
required
object
status
required

Overall system status.

string
Allowed values: healthy degraded
timestamp
required

Server time when the check ran.

string format: date-time
version
required

Application version from package.json.

string
commit

Short Git commit SHA of the running build.

string
uptime_seconds
required

Seconds since the server process started.

integer
environment

Runtime environment.

string
Allowed values: production development
dependencies
required

Status of each external dependency.

object
key
additional properties
object
status
required
  • ok — dependency reachable and responding.
  • error — dependency unreachable or returning errors.
  • unavailable — dependency not configured (non-critical).
string
Allowed values: ok error unavailable
latency_ms

Round-trip time in milliseconds (omitted if unavailable).

integer
Example
{
"success": true,
"data": {
"status": "healthy",
"version": "1.0.0",
"commit": "a1b2c3d",
"uptime_seconds": 86400,
"environment": "production",
"dependencies": {
"supabase": {
"status": "ok",
"latency_ms": 45
},
"redis": {
"status": "ok",
"latency_ms": 2
},
"spss_service": {
"status": "unavailable"
}
}
}
}