Alerts

Updates an existing alert

put/api/v2/alerts/{id}

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v2/alerts/{id}
  • Auth
    HTTP bearer

Path parameters

idstring required

Alert ID

Request body

dashboardIdstring nullable

Dashboard ID for tile-based alerts.

tileIdstring nullable

Tile ID for tile-based alerts. Must be a line, stacked bar, or number type tile.

savedSearchIdstring nullable

Saved search ID for saved_search alerts.

groupBystring nullable

Group-by key for saved search alerts.

thresholdnumber required

Threshold value for triggering the alert. For between and not_between threshold types, this is the lower bound.

thresholdMaxnumber nullable

Upper bound for between and not_between threshold types. Required when thresholdType is between or not_between, must be >= threshold.

interval'1m' | '5m' | '15m' | '30m' | '1h' | '6h' | '12h' | '1d' required

Evaluation interval.

scheduleOffsetMinutesinteger nullable

Offset from the interval boundary in minutes. For example, 2 with a 5m interval evaluates windows at :02, :07, :12, etc. (UTC).

scheduleStartAtstring date-time nullable

Absolute UTC start time anchor. Alert windows start from this timestamp and repeat every interval.

source'saved_search' | 'tile' | 'inline'

Alert source type. "saved_search" alerts monitor a saved search, "tile" alerts monitor a dashboard tile, and "inline" alerts carry their own chart configuration (see AlertChartConfig) without requiring a saved search or dashboard.

thresholdType'above' | 'below' | 'above_exclusive' | 'below_or_equal' | 'equal' | 'not_equal' | 'between' | 'not_between' required

Threshold comparison direction.

namestring nullable

Alert name template (Handlebars), rendered as the notification title. When omitted, a default title is generated from the display name, value and threshold.

displayNamestring nullable

Display name shown in the alerts list and in notification titles. Defaults to the name of the referenced saved search, dashboard tile, or inline chart when omitted or null.

tagsstring[] nullable

Tags for the alert. Defaults to the tags of the referenced saved search or dashboard when omitted or null; inline alerts have no parent to inherit from and default to an empty list.

messagestring nullable

Alert message template.

notestring nullable

Freeform note for the alert. Supports markdown formatting.

numConsecutiveWindowsinteger nullable

Fire the alert only after its condition has been met for this many consecutive evaluation windows. While the condition is met but fewer than this many consecutive windows have violated, the alert is in the PENDING state.

Example request

{
  "dashboardId": "65f5e4a3b9e77c001a567890",
  "tileId": "65f5e4a3b9e77c001a901234",
  "savedSearchId": "65f5e4a3b9e77c001a345678",
  "groupBy": "ServiceName",
  "chartConfig": {
    "displayType": "line",
    "sourceId": "65f5e4a3b9e77c001a111111",
    "select": [
      {
        "valueExpression": "Duration",
        "alias": "Request Duration",
        "where": "service:api",
        "metricName": "http.server.duration",
        "periodAggFn": "delta",
        "numberFormat": {
          "mantissa": 2,
          "thousandSeparated": true,
          "factor": 1,
          "currencySymbol": "$",
          "numericUnit": "bytes_iec",
          "unit": "ms"
        }
      }
    ],
    "groupBy": "host",
    "lineInterpolation": "step",
    "numberFormat": {
      "mantissa": 2,
      "thousandSeparated": true,
      "factor": 1,
      "currencySymbol": "$",
      "numericUnit": "bytes_iec",
      "unit": "ms"
    },
    "seriesLimit": 5,
    "formulas": [
      {
        "expression": "A / (A + B) * 100",
        "alias": "Success rate %",
        "numberFormat": {
          "mantissa": 2,
          "thousandSeparated": true,
          "factor": 1,
          "currencySymbol": "$",
          "numericUnit": "bytes_iec",
          "unit": "ms"
        }
      }
    ],
    "name": "Error Rate Query",
    "where": "ServiceName:api"
  },
  "threshold": 100,
  "thresholdMax": 500,
  "scheduleOffsetMinutes": 2,
  "scheduleStartAt": "2026-02-08T10:00:00.000Z",
  "channel": {
    "webhookId": "65f5e4a3b9e77c001a789012"
  },
  "channels": [
    {
      "webhookId": "65f5e4a3b9e77c001a789012"
    }
  ],
  "name": "Errors for {{group}} hit {{value}}",
  "displayName": "Checkout error spike",
  "tags": [
    "checkout",
    "p1"
  ],
  "message": "Test Alert Message",
  "note": "Threshold raised from 50 to 100 on 2026-01-15. See [runbook](https://wiki.example.com/runbook).",
  "numConsecutiveWindows": 3
}

Response

Successfully updated alert

Example response

{
  "data": {
    "dashboardId": "65f5e4a3b9e77c001a567890",
    "tileId": "65f5e4a3b9e77c001a901234",
    "savedSearchId": "65f5e4a3b9e77c001a345678",
    "groupBy": "ServiceName",
    "chartConfig": {
      "displayType": "line",
      "sourceId": "65f5e4a3b9e77c001a111111",
      "select": [
        {
          "valueExpression": "Duration",
          "alias": "Request Duration",
          "where": "service:api",
          "metricName": "http.server.duration",
          "periodAggFn": "delta",
          "numberFormat": {
            "mantissa": 2,
            "thousandSeparated": true,
            "factor": 1,
            "currencySymbol": "$",
            "numericUnit": "bytes_iec",
            "unit": "ms"
          }
        }
      ],
      "groupBy": "host",
      "lineInterpolation": "step",
      "numberFormat": {
        "mantissa": 2,
        "thousandSeparated": true,
        "factor": 1,
        "currencySymbol": "$",
        "numericUnit": "bytes_iec",
        "unit": "ms"
      },
      "seriesLimit": 5,
      "formulas": [
        {
          "expression": "A / (A + B) * 100",
          "alias": "Success rate %",
          "numberFormat": {
            "mantissa": 2,
            "thousandSeparated": true,
            "factor": 1,
            "currencySymbol": "$",
            "numericUnit": "bytes_iec",
            "unit": "ms"
          }
        }
      ],
      "name": "Error Rate Query",
      "where": "ServiceName:api"
    },
    "threshold": 100,
    "thresholdMax": 500,
    "scheduleOffsetMinutes": 2,
    "scheduleStartAt": "2026-02-08T10:00:00.000Z",
    "channel": {
      "webhookId": "65f5e4a3b9e77c001a789012"
    },
    "channels": [
      {
        "webhookId": "65f5e4a3b9e77c001a789012"
      }
    ],
    "name": "Errors for {{group}} hit {{value}}",
    "displayName": "Checkout error spike",
    "tags": [
      "checkout",
      "p1"
    ],
    "message": "Test Alert Message",
    "note": "Threshold raised from 50 to 100 on 2026-01-15. See [runbook](https://wiki.example.com/runbook).",
    "numConsecutiveWindows": 3,
    "id": "65f5e4a3b9e77c001a123456",
    "teamId": "65f5e4a3b9e77c001a345678",
    "silenced": {
      "by": "65f5e4a3b9e77c001a234567",
      "at": "2026-03-19T08:00:00.000Z",
      "until": "2026-03-20T08:00:00.000Z"
    },
    "executionErrors": [
      {
        "timestamp": "2026-04-17T12:00:00.000Z",
        "message": "Query timed out after 30s"
      }
    ],
    "createdAt": "2023-01-01T00:00:00.000Z",
    "updatedAt": "2023-01-01T00:00:00.000Z"
  }
}

Changes

    • breaking

      added to the ///////////// response property oneOf list for the response status

    • breaking

      added to the ///////////// response property oneOf list for the response status

    • breaking

      added to the ///////////// response property oneOf list for the response status

    • breaking

      added to the ///////////// response property oneOf list for the response status

    • info

      added promql discriminator mapping keys to the //////////// request property

    • info

      added promql discriminator mapping keys to the //////////// request property

    • info

      added promql discriminator mapping keys to the //////////// request property

    • info

      added promql discriminator mapping keys to the //////////// request property

    • info

      added to the //////////// request property oneOf list

    • info

      added to the //////////// request property oneOf list

    • info

      added to the //////////// request property oneOf list

    • info

      added to the //////////// request property oneOf list

    • info

      added promql discriminator mapping keys to the ///////////// response property for the response status

    • info

      added promql discriminator mapping keys to the ///////////// response property for the response status

    • info

      added promql discriminator mapping keys to the ///////////// response property for the response status

    • info

      added promql discriminator mapping keys to the ///////////// response property for the response status

    • info

      added the new optional request property /////////////////

    • info

      added the new optional request property //////////////////

    • info

      added the new optional request property /////////////////

    • info

      added the new optional request property //////////////////

    • info

      added the optional property ////////////////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status

    • info

      added the optional property ////////////////// to the response with the status

    • info

      added the optional property /////////////////// to the response with the status