Developer docs

Documentation

Guides and API reference for running AntiBait analysis from the web app or from your own code.

API reference

Health check

Public

Simple health check endpoint for monitoring services. Returns basic system health status without detailed metrics.

API endpoint

GET
GET/api/status/health

Request

No authentication required
No request body needed

This is a public endpoint accessible without API key.

Response

{
  "status": "healthy" | "unhealthy",
  "timestamp": "ISO-8601 string",
  "checks": {
    "database": "ok" | "failed",
    "api": "ok"
  },
  "uptime": number | null
}

Example request

cURL

curl https://antibait.io/api/status/health

Healthy response (200)

{
  "status": "healthy",
  "timestamp": "2025-11-07T12:34:56.789Z",
  "checks": {
    "database": "ok",
    "api": "ok"
  },
  "uptime": 3600
}

Unhealthy response (503)

{
  "status": "unhealthy",
  "timestamp": "2025-11-07T12:34:56.789Z",
  "checks": {
    "database": "failed"
  }
}

Response fields

statusstring

Overall health status: "healthy" or "unhealthy"

timestampstring

ISO-8601 formatted timestamp of the health check

checksobject

Individual health check results for each component (database, api)

uptimenumber | null

Process uptime in seconds (if available)

errorstring (optional)

Error message when service is unavailable

HTTP status codes

200

OK

All systems operational

503

Service unavailable

One or more critical components are down

Usage tips

Caching

Responses are cached for 10 seconds with a 30-second stale-while-revalidate window. This reduces load on the server while providing near real-time health status.

Monitoring integration

Perfect for integration with monitoring tools like UptimeRobot, Pingdom, or Datadog. Configure your monitoring service to check this endpoint at regular intervals and alert on 503 responses.

Lightweight check

This endpoint performs a minimal database connectivity check and returns quickly. For detailed metrics and component status, use the /api/status/metrics endpoint instead.

Need help integrating the API? The support team replies within 24 hours on business days.