Skip to main content
GET
/
api
/
alerts
curl -X GET 'https://localhost:3100/api/alerts?type=prompt_drift&dismissed=false' \
  -H 'Authorization: Bearer fn_sess_abc123def456'
{
  "alerts": [
    {
      "id": "alert_1",
      "type": "prompt_drift",
      "severity": "critical",
      "service": "openai",
      "message": "System prompt drift detected: new prompt differs from baseline",
      "timestamp": 1709500000,
      "dismissed": false
    },
    {
      "id": "alert_2",
      "type": "budget_warning",
      "severity": "warning",
      "service": "anthropic",
      "message": "Daily budget threshold reached: 80%",
      "timestamp": 1709499500,
      "dismissed": false
    }
  ]
}

Authentication

Requires a valid session token in the Authorization header:
Authorization: Bearer <session_token>

Query Parameters

type
string
Filter alerts by type. Valid values:
  • prompt_drift
  • prompt_size
  • budget_warning
  • budget_exceeded
  • onchain_denied
  • rate_limit_hit
  • anomalous_volume
  • new_endpoint
  • time_anomaly
  • high_severity_denied_action
dismissed
boolean
Filter alerts by dismissal status. Set to true to show only dismissed alerts, false for active alerts only.
limit
integer
Maximum number of alerts to return
skip
integer
Number of alerts to skip for pagination (default: 0)

Response

alerts
array
Array of alert objects

Error Responses

error
string
Error message if the request fails
  • 401 Unauthorized: Missing or invalid session token
  • 500 Internal Server Error: Database error
curl -X GET 'https://localhost:3100/api/alerts?type=prompt_drift&dismissed=false' \
  -H 'Authorization: Bearer fn_sess_abc123def456'
{
  "alerts": [
    {
      "id": "alert_1",
      "type": "prompt_drift",
      "severity": "critical",
      "service": "openai",
      "message": "System prompt drift detected: new prompt differs from baseline",
      "timestamp": 1709500000,
      "dismissed": false
    },
    {
      "id": "alert_2",
      "type": "budget_warning",
      "severity": "warning",
      "service": "anthropic",
      "message": "Daily budget threshold reached: 80%",
      "timestamp": 1709499500,
      "dismissed": false
    }
  ]
}

Build docs developers (and LLMs) love