Alert rules

Update an alert rule

Send only the fields to change. { "enabled": false } pauses a rule without touching its scope.

patch/v1/alert-rules/{id}

Request

  • Base URL: https://api.upcheck.so
  • URL: https://api.upcheck.so/v1/alert-rules/{id}
  • Auth: HTTP bearer

Path parameters

idstring required
Example:9b1d...

Opaque identifier.

Request body

namestring
enabledboolean
subject'http' | 'certificate' | 'dns' | 'registration' | 'keyword' | 'content' | 'port'

Which check a monitor, rule or history row is about.

frequency'once' | 'daily' | 'every_12h' | 'every_6h' | 'hourly'

How often a rule may re-deliver the same alert while the condition holds.

channelsstring[]
integrationIdsstring[] nullable

Integrations the webhook channels deliver to. A selected channel with no integration listed here delivers to every integration on that channel. Ids outside this organization are ignored.

emailListIdsstring[]
emailRecipientsstring[]
domainIdsstring[] nullable

Websites the rule is scoped to. Empty or null means every website in the organization.

Example request

{
  "name": "Certificate expiry",
  "triggers": [
    {
      "type": "days",
      "value": 14
    },
    {
      "type": "on_expiration",
      "value": 0
    }
  ],
  "channels": [
    "email",
    "slack"
  ],
  "integrationIds": [
    "9b1d..."
  ],
  "emailListIds": [
    "9b1d..."
  ],
  "domainIds": [
    "9b1d..."
  ]
}

Response

The updated rule.

idstring required

Opaque identifier.

organizationIdstring required

Opaque identifier.

namestring required
enabledboolean required
subject'http' | 'certificate' | 'dns' | 'registration' | 'keyword' | 'content' | 'port' nullable required

Which check a monitor, rule or history row is about.

triggerType'days' | 'weeks' | 'on_expiration' | 'http_down' | 'http_slow' | 'port_down' | 'dns_changed' | 'keyword_failed' | 'content_changed' | 'content_failed' | 'recovered' required
triggerValuenumber required
domainIdsstring[] nullable required
frequency'once' | 'daily' | 'every_12h' | 'every_6h' | 'hourly' required

How often a rule may re-deliver the same alert while the condition holds.

channelsstring[] required
integrationIdsstring[] nullable required
emailListIdsstring[] nullable required
emailRecipientsstring[] nullable required
createdByEmailstring nullable required
createdAtnumber required

Example response

{
  "id": "9b1d...",
  "organizationId": "9b1d...",
  "domainIds": [
    "9b1d..."
  ],
  "integrationIds": [
    "9b1d..."
  ],
  "emailListIds": [
    "9b1d..."
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.