AlertsUpdate an alert rule

Update an alert rule

Update a rule (enable/disable, thresholds).

curl -X PUT "https://api.autopil.ai/v1/alerts/rules/example_string" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "name": "John Doe",
  "rule_type": "denial_spike",
  "threshold": 42,
  "window_minutes": 42,
  "cooldown_minutes": 42,
  "webhook_url": "example_string",
  "email": "user@example.com",
  "enabled": true
}'
{
  "name": "John Doe",
  "rule_type": "denial_spike",
  "threshold": 42,
  "window_minutes": 42,
  "cooldown_minutes": 42,
  "webhook_url": "example_string",
  "email": "user@example.com",
  "enabled": true
}
PUT
/v1/alerts/rules/{rule_id}
PUT
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.

API key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.
Content-Typestring
Required

The media type of the request body

Options: application/json
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. API key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.

Path Parameters

Responses

namestring
Required
rule_typestring
Required
Allowed values:denial_spikenew_source_accessisolation_violationhigh_deny_rate
thresholdinteger
Required
window_minutesinteger
cooldown_minutesinteger
webhook_urlstring
emailstring
enabledboolean