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.

POST https://telemetry.betterstack.com/api/v3/alerts

Query parameters

team_id
string

Headers

Authorization
required string
Content-Type
string

Body parameters

name
required string
alert_type
required string
dashboard_id
string or null
chart_id
string or null
exploration_id
string or null
operator
string
value
number or null
string_value
string or null
paused
DEFAULT false boolean
query_period
integer or null
confirmation_period
DEFAULT 60 integer
recovery_period
DEFAULT 60 integer or null
aggregation_interval
integer or null
check_period
integer or null
series_names
array of strings
series_names_except
array of strings
source_variable
string or null
source_mode
DEFAULT source_variable string
source_platforms
DEFAULT [] array of strings
escalation_target
DEFAULT current_team string or object
incident_cause
string or null
incident_name
string or null
incident_per_series
DEFAULT false boolean
additional_conditions
array of objects
additional_conditions[].alert_type
string
additional_conditions[].operator
string
additional_conditions[].value
number or null
additional_conditions[].string_value
string or null
additional_conditions[].series_names
array of strings
additional_conditions[].series_names_except
array of strings
variable_values
array of objects
variable_values[].name
string
variable_values[].selected_label
string
variable_values[].values
array of strings
on_missing_data
string
anomaly_sensitivity
number
anomaly_trigger
string
shown_interval
integer or null
anomaly_training_range_days
integer
call
boolean
sms
boolean
email
boolean
push
boolean
critical_alert
boolean
metadata
object or null
201

Response 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"
    }
  }
}
401

Response 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"
}
403

Response body

{
  "errors": "This API token is read-only and cannot be used for write operations."
}
422

Response body

{
  "errors": [
    "Your plan doesn't include phone call alerts. Upgrade your plan to use them."
  ],
  "invalid_attributes": [
    "call"
  ]
}
422

Response body

{
  "errors": "Sorry, some values are incorrect",
  "invalid_values": {
    "owner": "Give exactly one owner: dashboard_id with chart_id, or exploration_id"
  }
}
422
422

Response 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"
  }
}
422

Response 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."
    ]
  }
}

Response attributes

id
string
type
string
dashboard_id
string or null
chart_id
string or null
exploration_id
string or null
name
string
alert_type
string
operator
string
value
number or null
string_value
string or null
paused
boolean
paused_reason
string or null
query_period
integer or null
confirmation_period
integer
recovery_period
integer or null
aggregation_interval
integer or null
check_period
integer or null
series_names
array of strings
series_names_except
array of strings
source_variable
string or null
source_mode
string
source_platforms
array of strings
escalation_target
string or object
escalation_target.policy_id
string
escalation_target.policy_name
string
escalation_target.team_id
string
escalation_target.team_name
string
incident_cause
string or null
incident_name
string or null
incident_per_series
boolean
additional_conditions
array of objects
additional_conditions[].alert_type
string
additional_conditions[].operator
string
additional_conditions[].value
number or null
additional_conditions[].string_value
string or null
additional_conditions[].series_names
array of strings
additional_conditions[].series_names_except
array of strings
variable_values
array of objects
variable_values[].name
string
variable_values[].selected_label
string
variable_values[].values
array of strings
on_missing_data
string
anomaly_sensitivity
number
anomaly_trigger
string
shown_interval
integer or null
anomaly_training_range_days
integer
call
boolean
sms
boolean
email
boolean
push
boolean
critical_alert
boolean
created_at
datetime
updated_at
datetime
metadata
object or null
team_id
string

Example cURL

On a dashboard chart On an exploration
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"
    ]
  }
}'
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
}'