Create a New Alert
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.
Path parameters
A unique identifier for a check.
Request body
Example request
{
"id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
"name": "Landing page degraded performance",
"type": "latency",
"threshold": 300,
"comparison": "greater_than",
"notifications": {
"email": [
"bob@example.com"
],
"slack": [
{
"channel": "Production Alerts",
"url": "https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ"
}
]
},
"period": "2m"
}Response
The response will be a JSON object with a key called alert. The value of this will be an object that contains the standard attributes associated with an uptime alert.
Example response
{
"alert": {
"id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
"name": "Landing page degraded performance",
"type": "latency",
"threshold": 300,
"comparison": "greater_than",
"notifications": {
"email": [
"bob@example.com"
],
"slack": [
{
"channel": "Production Alerts",
"url": "https://hooks.slack.com/services/T1234567/AAAAAAAA/ZZZZZZ"
}
]
},
"period": "2m"
}
}Changes
Changed in 4 of the 8 revisions of this API.14
- ○
api tag
DigitalOcean-public.v2-new_Uptimeaddedapi-tag-added
- ○
api tag
Uptimeremovedapi-tag-removed
This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
endpoint added
endpoint-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 436 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
endpoint added
endpoint-added
This revision also has 70 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○