POST/v2/uptime/checks/{check_id}/alerts

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.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 7 body fields
check_idstringrequired
A unique identifier for a check.

The ''type'' field dictates the type of alert, and hence what type of value to pass into the threshold property.

TypeDescriptionThreshold Value
latencyalerts on the response latencymilliseconds
downalerts on a target registering as down in any regionN/A (Not required)
down_globalalerts on a target registering as down globallyN/A (Not required)
ssl_expiryalerts on a SSL certificate expiring within $threshold daysdays
idstringoptional
A unique ID that can be used to identify and reference the alert.
namestringrequired
A human-friendly display name.
typestringrequired
The type of alert.
Allowed:latencydowndown_globalssl_expiry
thresholdintegeroptional
The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type.
comparisonstringoptional
The comparison operator used against the alert's threshold.
Allowed:greater_thanless_than
notificationsobjectrequired
The notification settings for a trigger alert.
periodstringrequired
Period of time the threshold must be exceeded to trigger the alert.
Allowed:2m3m5m10m15m30m1h

6 status codes
201The 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.
alertobjectoptional
401Authentication failed due to invalid credentials.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404The resource was not found.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429The API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500There was a server error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 401 is returned: Authentication failed due to invalid credentials. A 404 is returned: The resource was not found. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. Any other status is an error: There was an unexpected error.