Developer docs

Documentation

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

API reference

Status metrics

Public

Comprehensive status page metrics including service health, performance data, and system statistics.

API endpoint

GET
GET/api/status/metrics

Request

No authentication required
No request body needed

This is a public endpoint accessible without API key.

Response

{
  "status": "operational" 
    | "degraded" | "outage",
  "lastUpdated": "ISO-8601 string",
  "metrics": {...},
  "services": [...],
  "incidents": [...]
}

Example response

cURL

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

Response

{
  "status": "operational",
  "lastUpdated": "2026-10-21T12:34:56.789Z",
  "metrics": {
    "avgResponseTime": 8420,
    "successRate": 98.7,
    "dailyAnalyses": 312,
    "totalAnalyses": 48210
  },
  "services": [
    {
      "name": "Email analysis",
      "description": "Phishing analysis of submitted emails, including the AI model",
      "status": "operational",
      "successRate": 98.7,
      "lastCheck": "2026-10-21T12:34:56.789Z"
    },
    {
      "name": "Web application and API",
      "description": "Website, sign-in and REST API",
      "status": "operational",
      "successRate": null,
      "lastCheck": "2026-10-21T12:34:56.789Z"
    },
    {
      "name": "Database",
      "description": "Accounts, history and threat intelligence data",
      "status": "operational",
      "successRate": null,
      "lastCheck": "2026-10-21T12:34:56.789Z"
    }
  ],
  "incidents": []
}

Response fields

statusstring

Overall system status: "operational", "degraded", "outage" or "unknown"

lastUpdatedstring

ISO-8601 formatted timestamp when metrics were last updated

metricsobject

Performance and usage metrics:

  • avgResponseTime – Average time for a full analysis in milliseconds over the last hour, or null if none ran
  • successRate – Percentage of analyses in the last 24 hours that finished without an error, or null if none ran
  • dailyAnalyses – Number of analyses today
  • totalAnalyses – Total analyses performed
servicesarray

Array of service components with health status:

  • name – Service name
  • description – Service description
  • status – Current status (operational, degraded, outage, unknown)
  • successRate – Measured success rate for the last 24 hours, or null for components without one
  • lastCheck – Timestamp of last health check
incidentsarray

Array of current or recent incidents (empty when all systems operational)

Status values

operational

Operational

All services are functioning normally

degraded

Degraded

Some services experiencing issues or reduced performance

outage

Outage

One or more critical services are unavailable

unknown

Unknown

Nothing to measure yet, for example no analyses in the last 24 hours

Usage tips

Caching

Responses are cached for 30 seconds with a 60-second stale-while-revalidate window. This provides a balance between freshness and performance.

Status page integration

This endpoint is designed for building custom status pages. It provides all the data needed to display service health, metrics, and incident history in a user-friendly format.

Metrics tracking

Use the metrics data to track API performance over time. The success rate is calculated from the last 24 hours of analysis requests, and response times are averaged from the last hour.

CORS enabled

This endpoint supports cross-origin requests, making it safe to call directly from client-side applications and status page dashboards.

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