Alerts

Enable, disable or change an alert rule

Changes an alert rule: enabled (false pauses it: it creates no new alerts and undelivered ones are not sent), its destination (validated for the rule's channel) or its restrictions. For engines, devices and countries, a list replaces that restriction, null removes it and an omitted field keeps it. A summary_digest rule also takes cadence, weekday, hour and time_zone; omitted ones keep their stored value, including the time zone. Type and channel cannot change; create a new rule instead. Requires the write scope.

post/alert-rules/{rule_id}

Request

  • Base URL: https://adslighthouse.com/api/v1
  • URL: https://adslighthouse.com/api/v1/alert-rules/{rule_id}
  • Auth: HTTP bearer

Path parameters

rule_idstring required

The alert rule id from list_alert_rules.

Request body

enabledboolean

false pauses the rule; true resumes it.

targetstring

New destination for the rule's channel. An empty string on an email rule notifies the account owner.

enginesstring[] nullable

Only observations from these search engines. Omit or null for every engine.

devicesstring[] nullable

Only observations on these devices. Omit or null for every device.

countriesstring[] nullable

Only observations in these ISO 3166-1 alpha-2 countries, such as US.

cadence'daily' | 'weekly'

summary_digest only: daily or weekly. Required when creating a summary.

weekday'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday'

summary_digest only: the day of a weekly summary. Default monday.

hourinteger

summary_digest only: local delivery hour, 0 to 23. Default 8 (08:00).

time_zonestring

summary_digest only: IANA time zone such as America/New_York. Defaults to the acting person's time zone when creating, and keeps the stored zone when updating.

Response

Enable, disable or change an alert rule

idstring required
project_idstring nullable required
project_namestring nullable required
brand_namestring required
type'competitor_new' | 'competitor_returning' | 'hijack_detected' | 'affiliate_detected' | 'ranking_drop' | 'nklg_re_enable' | 'ingestion_failed' | 'summary_digest' required
type_labelstring required
channel'email' | 'webhook' | 'slack' required
destinationstring nullable required

Email address, or the host of a webhook or Slack URL (the full URL is never returned). null for an email rule that goes to the account owner.

enabledboolean required
created_atstring required
request_idstring

Changes

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