Skip to main content

Endpoint

GET /api/v1/health
Basic health check endpoint to verify the API service is running and responsive.

Authentication

This endpoint does NOT require authentication. It is publicly accessible for health monitoring and load balancer checks.

Response

Returns a simple JSON object indicating the service health status.
ok
boolean
Always true if the service is responding
status
string
Health status string. Returns "healthy" when service is operational

Status Code

The endpoint returns HTTP status code 200 when the service is healthy.

Example Request

curl -X GET https://your-domain.com/api/v1/health

Example Response

{
  "ok": true,
  "status": "healthy"
}

Use Cases

Load Balancer Health Checks

Configure your load balancer to periodically ping this endpoint:
health_check:
  path: /api/v1/health
  interval: 10s
  timeout: 5s
  healthy_threshold: 2
  unhealthy_threshold: 3

Container Orchestration

Use this endpoint for Kubernetes liveness and readiness probes:
livenessProbe:
  httpGet:
    path: /api/v1/health
    port: 8000
  initialDelaySeconds: 10
  periodSeconds: 30

readinessProbe:
  httpGet:
    path: /api/v1/health
    port: 8000
  initialDelaySeconds: 5
  periodSeconds: 10

Monitoring and Alerting

Integrate with monitoring tools to track uptime:
# Simple uptime monitoring script
while true; do
  STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://your-domain.com/api/v1/health)
  if [ $STATUS -ne 200 ]; then
    echo "Service unhealthy: HTTP $STATUS"
    # Trigger alert
  fi
  sleep 60
done

Implementation Details

This endpoint is implemented in src/apps/calls/api/v1/endpoints/health.py:11 as a simple unprotected endpoint that always returns a successful response when the FastAPI application is running. The health check verifies:
  • The web server is responsive
  • The application can handle HTTP requests
  • Basic routing is functional

What It Does NOT Check

  • Database connectivity
  • External API availability
  • WebSocket connections
  • System resource availability
  • Call processing capability
For more detailed system status, use the metrics endpoint which requires authentication.

Build docs developers (and LLMs) love