pydo.uptime.update_alert()

Generated on 8 May 2026 from pydo version v0.34.0

Usage

client.uptime.update_alert(
    check_id="4de7ac8b-495b-4884-9a69-1050c6793cd6",
    alert_id="17f0f0ae-b7e5-4ef6-86e3-aa569db58284",
    body={
        "name": "Landing page degraded performance",
        "type": "latency",
        "threshold": 300,
        ...,
    },
)
Returns JSONRaises HttpResponseError

Description

To update the settings of an Uptime alert, send a PUT request to /v2/uptime/checks/{check_id}/alerts/{alert_id}.

Parameters

check_id string required

A unique identifier for a check.

alert_id string required

A unique identifier for an alert.

name string required

Example: Landing page degraded performance

A human-friendly display name.

type string required

The type of alert.

One of: latency, down, down_global, ssl_expiry

threshold integer optional

Example: 300

The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.

comparison string optional

The comparison operator used against the alert's threshold.

One of: greater_than, less_than

notifications object required

The notification settings for a trigger alert.

Show child properties
email array of strings required

Example: ['[email protected]']

An email to notify on an alert trigger. The Email has to be one that is verified on that DigitalOcean account.

slack array of objects required

Slack integration details.

Show child properties
channel string required

Example: Production Alerts

Slack channel to notify of an alert trigger.

url string required

Example: https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ

Slack Webhook URL.

period string required

Period of time the threshold must be exceeded to trigger the alert.

One of: 2m, 3m, 5m, 10m, 15m, 30m, 1h

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "name": "Landing page degraded performance",
  "type": "latency",
  "threshold": 300,
  "comparison": "greater_than",
  "notifications": {
    "email": [
      "[email protected]"
    ],
    "slack": [
      {
        "channel": "Production Alerts",
        "url": "https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ"
      }
    ]
  },
  "period": "2m"
}

resp = client.uptime.alert_update(check_id="4de7ac8b", alert_id="da9da9", body=req)

Response Example

Show Response Example
{
  "alert": {
    "id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
    "name": "Landing page degraded performance",
    "type": "latency",
    "threshold": 300,
    "comparison": "greater_than",
    "period": "2m"
  }
}

More Information

See /v2/uptime/checks/{check_id}/alerts/{alert_id} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.