Skip to main content

Authentication

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

GET /api/alerts/config

Retrieve current alert configuration including toggles for each alert type and retention settings.

Response

toggles
object
Boolean flags for each alert type
retention_days
integer
Number of days to retain alert history before automatic cleanup

PUT /api/alerts/config

Update alert configuration. All fields are optional; only provided fields will be updated.

Request Body

prompt_drift
boolean
Enable/disable prompt drift alerts
prompt_size
boolean
Enable/disable prompt size alerts
budget_warning
boolean
Enable/disable budget warning alerts
budget_exceeded
boolean
Enable/disable budget exceeded alerts
onchain_denied
boolean
Enable/disable on-chain denial alerts
rate_limit_hit
boolean
Enable/disable rate limit alerts
anomalous_volume
boolean
Enable/disable anomalous volume alerts
new_endpoint
boolean
Enable/disable new endpoint alerts
time_anomaly
boolean
Enable/disable time anomaly alerts
high_severity_denied_action
boolean
Enable/disable high-severity denial alerts
retention_days
integer
Number of days to retain alerts (must be positive)

Response

success
boolean
Returns true if configuration was saved successfully
toggles
object
Updated alert toggle settings (same structure as GET response)
retention_days
integer
Updated retention period in days

Error Responses

  • 401 Unauthorized: Missing or invalid session token
  • 500 Internal Server Error: Failed to save configuration file
curl -X GET https://localhost:3100/api/alerts/config \
  -H 'Authorization: Bearer fn_sess_abc123def456'
{
  "toggles": {
    "prompt_drift": true,
    "prompt_size": true,
    "budget_warning": true,
    "budget_exceeded": true,
    "onchain_denied": true,
    "rate_limit_hit": true,
    "anomalous_volume": true,
    "new_endpoint": true,
    "time_anomaly": true,
    "high_severity_denied_action": true
  },
  "retention_days": 30
}

Build docs developers (and LLMs) love