Alerts can only be created on explorations with compatible chart types: line_chart, bar_chart, number_chart, or tail_chart. The query must also include the {{time}} variable.
Explore documentation
Create an alert
Creates a new alert for a specific exploration.
URL parameters
The unique identifier of the exploration to add the alert to.
Headers
Bearer $TOKEN
Body parameters
The name of the alert.
The type of alert. Valid types are threshold, relative, and anomaly_rrcf.
The comparison operator. See the Operators section below for valid values based on alert_type.
The threshold value. Required for threshold and relative alert types.
The delay in seconds before an alert is triggered (>= 0).
The evaluation window in seconds.
The delay in seconds before an alert is resolved.
An object defining where to send alert notifications. See the Escalation Target section below.
A key-value object for custom metadata. See the Metadata section below.
Set to true to create the alert in a paused state.
Required if using a global API token to specify which team should own the resource.
The alert was created successfully.
Response body
Validation failed, e.g., due to an incompatible exploration.
Response body
Example Request
Escalation Target
The escalation_target object determines where notifications are sent.
- Escalate to the current team (default): Set
escalation_targettonull. - Escalate to a specific team: Use
"escalation_target": { "team_id": 123 }. - Escalate via an Uptime policy: Use
"escalation_target": { "policy_id": 456 }. When using a policy, notification channels (call,sms, etc.) are managed by the policy itself and are ignored in the API request.
Metadata
The metadata object allows you to attach custom key-value pairs to an alert. This information is included in incident notifications for extra context. Both keys and values must be strings.
Alert Types
| Value | Description |
|---|---|
threshold |
Triggers when a value crosses a static threshold. |
relative |
Triggers on a percentage change from historical data. |
anomaly_rrcf |
Triggers on ML-based anomaly detection. |
Operators
For threshold alerts:
equal, not_equal, higher_than, higher_than_or_equal, lower_than, lower_than_or_equal
For relative alerts:
increases_by, decreases_by, changes_by