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

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.

Servers

Path parameters

Name Type Required Description
check_id String Yes

A unique identifier for a check.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
id String No

A unique ID that can be used to identify and reference the alert.

threshold Integer No

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

name String Yes

A human-friendly display name.

comparison String No

The comparison operator used against the alert's threshold.

Possible values:

  • "less_than"
  • "greater_than"
period String Yes

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

Possible values:

  • "10m"
  • "30m"
  • "2m"
  • "3m"
  • "5m"
  • "1h"
  • "15m"
type String Yes

The type of alert.

Possible values:

  • "latency"
  • "down_global"
  • "down"
  • "ssl_expiry"
notifications Object Yes

The notification settings for a trigger alert.

notifications.slack[] Array Yes

Slack integration details.

notifications.slack[].channel String Yes

Slack channel to notify of an alert trigger.

notifications.slack[].url String Yes

Slack Webhook URL.

notifications.email[] Array Yes

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

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.