# Create an alert

Create an alert on a dashboard chart or an exploration. Send `dashboard_id` with `chart_id`, or `exploration_id`. The chart must be a line, bar, tail or table chart. The exploration in `exploration_id` must be one of your Telemetry explorations.

[endpoint]
method = "POST"
base_url = "https://telemetry.betterstack.com"
path = "/api/v3/alerts"

[[body_param]]
name = "name"
required = true
type = "string"
description = "Alert name. Until you rename the alert, its name follows the chart's name."

[[body_param]]
name = "alert_type"
required = true
type = "string"
description = "Alert type. An update can change it.<br/>Valid values:<br/>`threshold`: Fires when the value crosses a threshold.<br/>`relative`: Compares the value with the previous period as a percentage change.<br/>`anomaly_rrcf`: Uses machine learning anomaly detection. Table charts don't accept it."

[[body_param]]
name = "dashboard_id"
type = "string or null"
description = "Dashboard of the chart this alert watches. `null` for an alert on an exploration. Set it with `chart_id` for an alert on a dashboard chart, or set `exploration_id` instead. Can't be changed after the alert is created."

[[body_param]]
name = "chart_id"
type = "string or null"
description = "Chart this alert watches, on the dashboard in `dashboard_id`. `null` for an alert on an exploration. Can't be changed after the alert is created."

[[body_param]]
name = "exploration_id"
type = "string or null"
description = "Exploration this alert watches. `null` for an alert on a dashboard chart. Set it instead of `dashboard_id` and `chart_id` for an alert on an exploration. Can't be changed after the alert is created."

[[body_param]]
name = "operator"
type = "string"
description = "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.<br/>Valid values:<br/>`equal`: A `threshold` alert fires when the value equals `value` or `string_value`.<br/>`not_equal`: A `threshold` alert fires when the value differs from `value` or `string_value`.<br/>`higher_than`: A `threshold` alert fires when the value is above `value`.<br/>`higher_than_or_equal`: A `threshold` alert fires when the value is at or above `value`.<br/>`lower_than`: A `threshold` alert fires when the value is below `value`.<br/>`lower_than_or_equal`: A `threshold` alert fires when the value is at or below `value`.<br/>`increases_by`: A `relative` alert fires when the value rises by `value` percent or more.<br/>`decreases_by`: A `relative` alert fires when the value falls by `value` percent or more.<br/>`changes_by`: A `relative` alert fires when the value rises or falls by `value` percent or more."

[[body_param]]
name = "value"
type = "number or null"
description = "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts."

[[body_param]]
name = "string_value"
type = "string or null"
description = "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only."

[[body_param]]
name = "paused"
default = "false"
type = "boolean"
description = "Whether the alert is paused. Send it as a JSON boolean, because the string `\"true\"` is ignored."

[[body_param]]
name = "query_period"
type = "integer or null"
description = "The time window of data each check looks at, in seconds. Defaults to `aggregation_interval`, then `check_period`, then 60."

[[body_param]]
name = "confirmation_period"
default = "60"
type = "integer"
description = "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once."

[[body_param]]
name = "recovery_period"
default = "60"
type = "integer or null"
description = "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically."

[[body_param]]
name = "aggregation_interval"
type = "integer or null"
description = "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds. Defaults to `query_period`, then `check_period`, then 60."

[[body_param]]
name = "check_period"
type = "integer or null"
description = "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value. Required when creating a threshold or relative alert."

[[body_param]]
name = "series_names"
type = "array of strings"
description = "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`. Setting either one replaces both."

[[body_param]]
name = "series_names_except"
type = "array of strings"
description = "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used. Setting either one replaces both."

[[body_param]]
name = "source_variable"
type = "string or null"
description = "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`."

[[body_param]]
name = "source_mode"
default = "source_variable"
type = "string"
description = "How the alert picks its sources.<br/>Valid values:<br/>`source_variable`: Runs on the sources in `source_variable`.<br/>`platforms_single_source`: Runs on the one source in `source_variable`, limited to `source_platforms`.<br/>`platforms_all_sources`: Runs on every source that matches `source_platforms`."

[[body_param]]
name = "source_platforms"
default = "[]"
type = "array of strings"
description = "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes."

[[body_param]]
name = "escalation_target"
default = "current_team"
type = "string or object"
description = "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID."

[[body_param]]
name = "incident_cause"
type = "string or null"
description = "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`."

[[body_param]]
name = "incident_name"
type = "string or null"
description = "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns."

[[body_param]]
name = "incident_per_series"
default = "false"
type = "boolean"
description = "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert."

[[body_param]]
name = "additional_conditions"
type = "array of objects"
description = "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all."

[[body_param]]
name = "additional_conditions[].alert_type"
type = "string"
description = "The type of the condition, `threshold` or `relative`."

[[body_param]]
name = "additional_conditions[].operator"
type = "string"
description = "The comparison the condition makes, from the same values as `operator`."

[[body_param]]
name = "additional_conditions[].value"
type = "number or null"
description = "Threshold value. `null` when the condition compares `string_value`."

[[body_param]]
name = "additional_conditions[].string_value"
type = "string or null"
description = "Threshold value for a string series. `null` when the condition compares `value`."

[[body_param]]
name = "additional_conditions[].series_names"
type = "array of strings"
description = "The series the condition is limited to. An empty list means every series."

[[body_param]]
name = "additional_conditions[].series_names_except"
type = "array of strings"
description = "The series the condition ignores while it watches every other series."

[[body_param]]
name = "variable_values"
type = "array of objects"
description = "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead."

[[body_param]]
name = "variable_values[].name"
type = "string"
description = "The name of a variable on the alert's dashboard or exploration."

[[body_param]]
name = "variable_values[].selected_label"
type = "string"
description = "For a `select_predefined_sql` variable, the label of the filter the alert uses."

[[body_param]]
name = "variable_values[].values"
type = "array of strings"
description = "The values the alert uses for the variable, as strings."

[[body_param]]
name = "on_missing_data"
type = "string"
description = "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses. Defaults to `dont_fire` on threshold and relative alerts. Anomaly alerts don't accept it.<br/>Valid values:<br/>`treat_as_zero`: Checks the missing data as if the value were 0.<br/>`dont_fire`: Starts no incident for missing data.<br/>`treat_as_previous`: Checks the missing data as if it had the previous value.<br/>`start_incident`: Starts an incident when the query returns no data."

[[body_param]]
name = "anomaly_sensitivity"
type = "number"
description = "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts. Defaults to `5.0` on `anomaly_rrcf` alerts. Threshold and relative alerts don't accept it."

[[body_param]]
name = "anomaly_trigger"
type = "string"
description = "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts. Defaults to `any` on `anomaly_rrcf` alerts. Threshold and relative alerts don't accept it.<br/>Valid values:<br/>`any`: Fires on values above or below the prediction.<br/>`higher`: Fires on values above the prediction.<br/>`lower`: Fires on values below the prediction."

[[body_param]]
name = "shown_interval"
type = "integer or null"
description = "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts. Defaults to 10800 when an anomaly alert is created."

[[body_param]]
name = "anomaly_training_range_days"
type = "integer"
description = "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts. Defaults to `7` on `anomaly_rrcf` alerts. Threshold and relative alerts don't accept it."

[[body_param]]
name = "call"
type = "boolean"
description = "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on. Defaults to `false` on create. An alert that routes to an escalation policy doesn't use it."

[[body_param]]
name = "sms"
type = "boolean"
description = "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on. Defaults to `false` on create. An alert that routes to an escalation policy doesn't use it."

[[body_param]]
name = "email"
type = "boolean"
description = "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy. Defaults to `false` on create. An alert that routes to an escalation policy doesn't use it."

[[body_param]]
name = "push"
type = "boolean"
description = "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on. Defaults to `false` on create. An alert that routes to an escalation policy doesn't use it."

[[body_param]]
name = "critical_alert"
type = "boolean"
description = "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on. Defaults to `false` on create. An alert that routes to an escalation policy doesn't use it."

[[body_param]]
name = "metadata"
type = "object or null"
description = "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata. An empty object clears the metadata, which then reads back as `null`."

[[query_param]]
name = "team_id"
type = "string"
description = "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"

[[header]]
name = "Content-Type"
description = "application/json"
required = false
type = "string"
[/endpoint]

[responses]
[[response]]
status = 201
description = "Returns the newly created alert."
body = '''
{
  "data": {
    "id": "123456789",
    "type": "alert",
    "attributes": {
      "dashboard_id": "123",
      "chart_id": "456",
      "exploration_id": null,
      "name": "High Error Rate",
      "alert_type": "threshold",
      "operator": "higher_than",
      "value": 100,
      "string_value": null,
      "paused": true,
      "paused_reason": "Manually paused",
      "query_period": 600,
      "confirmation_period": 0,
      "recovery_period": 60,
      "aggregation_interval": 300,
      "check_period": 300,
      "series_names": [
        "error"
      ],
      "series_names_except": [],
      "source_variable": "source:t123456_my_app",
      "source_mode": "source_variable",
      "source_platforms": [
        "kubernetes"
      ],
      "escalation_target": {
        "policy_name": "Critical Policy"
      },
      "incident_cause": "Error rate exceeded {{current_value}}",
      "incident_name": "High error rate on Checkout API",
      "incident_per_series": false,
      "additional_conditions": [
        {
          "alert_type": "relative",
          "operator": "increases_by",
          "value": 10
        }
      ],
      "variable_values": [
        {
          "name": "environment",
          "selected_label": "production",
          "values": [
            "production"
          ]
        }
      ],
      "on_missing_data": "dont_fire",
      "shown_interval": null,
      "created_at": "2026-03-25T10:00:00.000Z",
      "updated_at": "2026-03-25T10:00:00.000Z",
      "metadata": {
        "runbook": [
          "http://runbook/high-errors"
        ]
      },
      "team_id": "t123"
    }
  }
}
'''

[[response]]
status = 401
description = "The API token is missing or invalid."
body = '''
{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}
'''

[[response]]
status = 403
description = "The token is read-only, or its scopes don't permit the action."
body = '''
{
  "errors": "This API token is read-only and cannot be used for write operations."
}
'''

[[response]]
status = 422
description = "Sending `call`, `sms`, `push` or `critical_alert` as `true` needs a plan that includes that channel. `errors` lists what the plan doesn't include and `invalid_attributes` names the attributes. Nothing is saved."
body = '''
{
  "errors": [
    "Your plan doesn't include phone call alerts. Upgrade your plan to use them."
  ],
  "invalid_attributes": [
    "call"
  ]
}
'''

[[response]]
status = 422
description = "The request sent both a chart and an exploration, neither, or `dashboard_id` without `chart_id`. The error is in `invalid_values.owner`."
body = '''
{
  "errors": "Sorry, some values are incorrect",
  "invalid_values": {
    "owner": "Give exactly one owner: dashboard_id with chart_id, or exploration_id"
  }
}
'''

[[response]]
status = 422
description = "The `name` or `alert_type` attribute is missing, or `operator` is missing for a threshold or relative alert. Listed in `required_attributes`."

[[response]]
status = 422
description = "The chart's type doesn't support alerts, a threshold or relative alert has neither `value` nor `string_value` or has no `check_period`, `series_names` and `series_names_except` were both sent, or `escalation_target`, `metadata`, `variable_values` or `shown_interval` is invalid. Listed in `invalid_values`."
body = '''
{
  "errors": "Sorry, some values are incorrect",
  "invalid_values": {
    "chart_type": "Alerts are not supported for chart type 'pie_chart'. Supported types: line_chart, bar_chart, tail_chart, table_chart"
  }
}
'''

[[response]]
status = 422
description = "The alert would check the exploration too often over too long a range. The message is in `invalid_values.base`."
body = '''
{
  "errors": "Sorry, some values are incorrect",
  "invalid_values": {
    "base": [
      "This configuration is too resource intensive. Please increase the check period or reduce the data range."
    ]
  }
}
'''
[/responses]

[params]
title = "Response attributes"

[[param]]
name = "id"
type = "string"
description = "The ID of the alert."

[[param]]
name = "type"
type = "string"
description = "Always `alert`."

[[param]]
name = "dashboard_id"
type = "string or null"
description = "Dashboard of the chart this alert watches. `null` for an alert on an exploration."

[[param]]
name = "chart_id"
type = "string or null"
description = "Chart this alert watches, on the dashboard in `dashboard_id`. `null` for an alert on an exploration."

[[param]]
name = "exploration_id"
type = "string or null"
description = "Exploration this alert watches. `null` for an alert on a dashboard chart."

[[param]]
name = "name"
type = "string"
description = "Alert name. Until you rename the alert, its name follows the chart's name."

[[param]]
name = "alert_type"
type = "string"
description = "Alert type. An update can change it.<br/>Valid values:<br/>`threshold`: Fires when the value crosses a threshold.<br/>`relative`: Compares the value with the previous period as a percentage change.<br/>`anomaly_rrcf`: Uses machine learning anomaly detection. Table charts don't accept it."

[[param]]
name = "operator"
type = "string"
description = "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.<br/>Valid values:<br/>`equal`: A `threshold` alert fires when the value equals `value` or `string_value`.<br/>`not_equal`: A `threshold` alert fires when the value differs from `value` or `string_value`.<br/>`higher_than`: A `threshold` alert fires when the value is above `value`.<br/>`higher_than_or_equal`: A `threshold` alert fires when the value is at or above `value`.<br/>`lower_than`: A `threshold` alert fires when the value is below `value`.<br/>`lower_than_or_equal`: A `threshold` alert fires when the value is at or below `value`.<br/>`increases_by`: A `relative` alert fires when the value rises by `value` percent or more.<br/>`decreases_by`: A `relative` alert fires when the value falls by `value` percent or more.<br/>`changes_by`: A `relative` alert fires when the value rises or falls by `value` percent or more."

[[param]]
name = "value"
type = "number or null"
description = "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts."

[[param]]
name = "string_value"
type = "string or null"
description = "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only."

[[param]]
name = "paused"
type = "boolean"
description = "Whether the alert is paused."

[[param]]
name = "paused_reason"
type = "string or null"
description = "Why the alert is paused. `Manually paused` for an alert paused by hand, or a sentence that says why Better Stack paused it. `null` when the alert isn't paused."

[[param]]
name = "query_period"
type = "integer or null"
description = "The time window of data each check looks at, in seconds."

[[param]]
name = "confirmation_period"
type = "integer"
description = "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once."

[[param]]
name = "recovery_period"
type = "integer or null"
description = "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically."

[[param]]
name = "aggregation_interval"
type = "integer or null"
description = "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds."

[[param]]
name = "check_period"
type = "integer or null"
description = "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value."

[[param]]
name = "series_names"
type = "array of strings"
description = "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`."

[[param]]
name = "series_names_except"
type = "array of strings"
description = "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used."

[[param]]
name = "source_variable"
type = "string or null"
description = "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`."

[[param]]
name = "source_mode"
type = "string"
description = "How the alert picks its sources.<br/>Valid values:<br/>`source_variable`: Runs on the sources in `source_variable`.<br/>`platforms_single_source`: Runs on the one source in `source_variable`, limited to `source_platforms`.<br/>`platforms_all_sources`: Runs on every source that matches `source_platforms`."

[[param]]
name = "source_platforms"
type = "array of strings"
description = "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes."

[[param]]
name = "escalation_target"
type = "string or object"
description = "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID."

[[param]]
name = "escalation_target.policy_id"
type = "string"
description = "Escalation policy ID."

[[param]]
name = "escalation_target.policy_name"
type = "string"
description = "Escalation policy name."

[[param]]
name = "escalation_target.team_id"
type = "string"
description = "Team ID, such as `t123`."

[[param]]
name = "escalation_target.team_name"
type = "string"
description = "Team name."

[[param]]
name = "incident_cause"
type = "string or null"
description = "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`."

[[param]]
name = "incident_name"
type = "string or null"
description = "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns."

[[param]]
name = "incident_per_series"
type = "boolean"
description = "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert."

[[param]]
name = "additional_conditions"
type = "array of objects"
description = "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all."

[[param]]
name = "additional_conditions[].alert_type"
type = "string"
description = "The type of the condition, `threshold` or `relative`."

[[param]]
name = "additional_conditions[].operator"
type = "string"
description = "The comparison the condition makes, from the same values as `operator`."

[[param]]
name = "additional_conditions[].value"
type = "number or null"
description = "Threshold value. `null` when the condition compares `string_value`."

[[param]]
name = "additional_conditions[].string_value"
type = "string or null"
description = "Threshold value for a string series. `null` when the condition compares `value`."

[[param]]
name = "additional_conditions[].series_names"
type = "array of strings"
description = "The series the condition is limited to. An empty list means every series."

[[param]]
name = "additional_conditions[].series_names_except"
type = "array of strings"
description = "The series the condition ignores while it watches every other series."

[[param]]
name = "variable_values"
type = "array of objects"
description = "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead."

[[param]]
name = "variable_values[].name"
type = "string"
description = "The name of a variable on the alert's dashboard or exploration."

[[param]]
name = "variable_values[].selected_label"
type = "string"
description = "For a `select_predefined_sql` variable, the label of the filter the alert uses."

[[param]]
name = "variable_values[].values"
type = "array of strings"
description = "The values the alert uses for the variable, as strings."

[[param]]
name = "on_missing_data"
type = "string"
description = "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses. Only when `alert_type` is `threshold` or `relative`.<br/>Valid values:<br/>`treat_as_zero`: Checks the missing data as if the value were 0.<br/>`dont_fire`: Starts no incident for missing data.<br/>`treat_as_previous`: Checks the missing data as if it had the previous value.<br/>`start_incident`: Starts an incident when the query returns no data."

[[param]]
name = "anomaly_sensitivity"
type = "number"
description = "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts."

[[param]]
name = "anomaly_trigger"
type = "string"
description = "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.<br/>Valid values:<br/>`any`: Fires on values above or below the prediction.<br/>`higher`: Fires on values above the prediction.<br/>`lower`: Fires on values below the prediction."

[[param]]
name = "shown_interval"
type = "integer or null"
description = "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts."

[[param]]
name = "anomaly_training_range_days"
type = "integer"
description = "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts."

[[param]]
name = "call"
type = "boolean"
description = "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on. Only when `escalation_target.policy_id` is `null` and `escalation_target.policy_name` is `null`."

[[param]]
name = "sms"
type = "boolean"
description = "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on. Only when `escalation_target.policy_id` is `null` and `escalation_target.policy_name` is `null`."

[[param]]
name = "email"
type = "boolean"
description = "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy. Only when `escalation_target.policy_id` is `null` and `escalation_target.policy_name` is `null`."

[[param]]
name = "push"
type = "boolean"
description = "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on. Only when `escalation_target.policy_id` is `null` and `escalation_target.policy_name` is `null`."

[[param]]
name = "critical_alert"
type = "boolean"
description = "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on. Only when `escalation_target.policy_id` is `null` and `escalation_target.policy_name` is `null`."

[[param]]
name = "created_at"
type = "datetime"
description = "When the alert was created. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "updated_at"
type = "datetime"
description = "When the alert was last updated. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "metadata"
type = "object or null"
description = "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata."

[[param]]
name = "team_id"
type = "string"
description = "Team that owns the alert's dashboard or exploration, such as `t123`."
[/params]

#### Example cURL

[code-tabs]
```shell
[label On a dashboard chart]
curl --request POST \
  --url https://telemetry.betterstack.com/api/v3/alerts \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "dashboard_id": "123",
  "chart_id": "456",
  "name": "High Error Rate",
  "alert_type": "threshold",
  "operator": "higher_than",
  "value": 100,
  "check_period": 300,
  "confirmation_period": 0,
  "escalation_target": {
    "policy_name": "Critical Policy"
  },
  "metadata": {
    "runbook": [
      "http://runbook/high-errors"
    ]
  }
}'
```
```shell
[label On an exploration]
curl --request POST \
  --url https://telemetry.betterstack.com/api/v3/alerts \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "exploration_id": "789",
  "name": "Status is Error",
  "alert_type": "threshold",
  "operator": "equal",
  "string_value": "error",
  "check_period": 300,
  "confirmation_period": 0
}'
```
[/code-tabs]
