pydo.uptime.create_alert()
Generated on 8 May 2026
from pydo version
v0.34.0
Usage
client.uptime.create_alert(
check_id="4de7ac8b-495b-4884-9a69-1050c6793cd6",
body={
"name": "Landing page degraded performance",
"type": "latency",
"threshold": 300,
...,
},
)Description
To create an Uptime alert, send a POST request to /v2/uptime/checks/{check_id}/alerts specifying the attributes
in the table below in the JSON body.
Parameters
check_idstring requiredA unique identifier for a check.
idstring optional read-onlyExample:
5a4981aa-9653-4bd1-bef5-d6bff52042e4A unique ID that can be used to identify and reference the alert.
namestring requiredExample:
Landing page degraded performanceA human-friendly display name.
typestring requiredThe type of alert.
thresholdinteger optionalExample:
300The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
comparisonstring optionalThe comparison operator used against the alert's threshold.
notificationsobject requiredThe notification settings for a trigger alert.
Show child properties
emailarray of strings requiredExample:
['[email protected]']An email to notify on an alert trigger. The Email has to be one that is verified on that DigitalOcean account.
slackarray of objects requiredSlack integration details.
Show child properties
channelstring requiredExample:
Production AlertsSlack channel to notify of an alert trigger.
urlstring requiredExample:
https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZSlack Webhook URL.
periodstring requiredPeriod of time the threshold must be exceeded to trigger the alert.
Request Sample
Response Example
More Information
See /v2/uptime/checks/{check_id}/alerts in the API reference for additional detail on responses, headers, parameters, and more.