Skip to main content
PATCH
Change an alert

Authorizations

Authorization
string
header
required

An API key that starts with cs_sk_, created under API and MCP, API keys. A key covers every site of its workspace or a chosen list, and carries permissions per resource (Analytics, Revenue and payments, Goals and events, Funnels, Sites, Notes, Alerts) and extras (Visitor details, Raw events export, Team members, Workspace name, See API keys, Manage API keys). A change acts for the key's creator, with their current role. A request outside them answers 403 naming the missing permission.

Path Parameters

siteId
string
required

The site's id, from GET /sites.

alertId
string<uuid>
required

The rule's id.

Body

application/json
name
string
Required string length: 1 - 80
ruleType
enum<string>
Available options:
traffic_spike,
traffic_drop,
no_traffic,
error_spike,
new_error,
vitals_regression,
monitor_down,
goal_completed,
revenue_received,
revenue_milestone,
usage_limit
threshold
number | null
windowMinutes
integer
Required range: 5 <= x <= 10080
cooldownMinutes
integer
Required range: 0 <= x <= 10080
config
object

Settings of the rule type.

channelIds
string[]
Maximum array length: 20
Minimum string length: 1
enabled
boolean

Response

Done.

alert
object

The rule.