API Reference
Status & SLA
Service health checks, uptime SLAs, and status monitoring
Health Check Endpoints
All health check endpoints are unauthenticated and return JSON with a status field
that can be healthy, degraded, down, or disabled.
Aggregate Health
GET /api/v1/health/allChecks all services in parallel and returns an aggregated status. This is the recommended endpoint for monitoring systems and status pages.
{
"status": "healthy",
"timestamp": "2026-07-25T12:00:00.000Z",
"total_latency_ms": 142,
"services": [
{ "service": "database", "status": "healthy", "latency_ms": 0 },
{ "service": "api-gateway", "status": "healthy", "latency_ms": 45 },
{ "service": "websocket", "status": "healthy", "latency_ms": 32 },
{ "service": "cloud-storage", "status": "healthy", "latency_ms": 18 },
{ "service": "whatsapp", "status": "healthy", "latency_ms": 67 },
{ "service": "firewall", "status": "healthy", "latency_ms": 12 },
{ "service": "freeswitch", "status": "healthy", "latency_ms": 28 }
],
"summary": {
"healthy": 7,
"degraded": 0,
"down": 0,
"disabled": 0,
"total": 7
}
}Individual Service Health
| Endpoint | Service | Description |
|---|---|---|
GET /api/v1/health | Next.js + Database | Platform health (existing endpoint) |
GET /api/v1/health/all | All Services | Aggregated health for all services |
GET /api/v1/health/api-gateway | Fastify API | REST API gateway service |
GET /api/v1/health/websocket | WebSocket Server | Real-time messaging service |
GET /api/v1/health/cloud-storage | Cloud Storage | File storage service |
GET /api/v1/health/whatsapp | WhatsApp Service | WhatsApp attendance bot |
GET /api/v1/health/firewall | Firewall Manager | Network security service |
GET /api/v1/health/freeswitch | FreeSWITCH | SIP/VoIP telephony service |
Each service health endpoint returns a latency_ms field for the upstream probe.
All endpoints return HTTP 200 regardless of service status — check the status
field in the JSON response to determine health.
Response Format
All health endpoints return:
{
"status": "healthy | degraded | down | disabled",
"service": "service-name",
"latency_ms": 42,
"timestamp": "2026-07-25T12:00:00.000Z"
}healthy— Service is fully operationaldegraded— Service is responding but with issues (slow, partial failures)down— Service is unreachable or returning errorsdisabled— Service is intentionally disabled (e.g., FreeSWITCH not enabled)
SLA Tiers
API Uptime SLA
| Tier | Uptime SLA | Downtime Credit | Monthly Allowed Downtime |
|---|---|---|---|
| Free | 99.5% | None | ~3.6 hours |
| Business | 99.9% | 10% of monthly fee | ~43 minutes |
| Professional | 99.95% | 20% of monthly fee | ~22 minutes |
| Enterprise | 99.99% | Custom | ~4.3 minutes |
Webhook Delivery SLA
- Delivery rate: 99.5% of webhooks delivered within 30 seconds
- Retry policy: Up to 5 retries with exponential backoff (1s, 5s, 30s, 2m, 10m)
- Dead letter queue: Failed deliveries after all retries are moved to DLQ
- DLQ retention: 30 days, then auto-expired
Support Response SLA
| Channel | Response Time |
|---|---|
| Developer email | 24 hours |
| Community questions | 48 hours |
| Critical issues (API downtime) | 1 hour |
Maintenance Windows
- Scheduled maintenance does not count against SLA
- Maintenance is announced at least 48 hours in advance
- Maintenance windows are published on the status page
- Emergency maintenance may be performed with shorter notice
Monitoring Integration
Polling Health Endpoints
# Check all services
curl https://dev-next.totalaccess.co.za/api/v1/health/all
# Check individual service
curl https://dev-next.totalaccess.co.za/api/v1/health/websocketPrometheus / Grafana
The existing Grafana/Prometheus monitoring stack can scrape these endpoints.
Each service also exposes a /metrics endpoint with Prometheus-format metrics.
Recommended Polling Interval
- Status page: Every 30 seconds
- Alerting: Every 10 seconds (with 3 consecutive failures before alerting)
- Dashboard: Every 60 seconds