Skip to main content

Update Alert Rule

developer
PUT/v1/alerts/rules/:id

Updates the configuration of an existing alert rule. Supports partial updates — only include the fields you want to change. Modify trigger thresholds, add or remove notification channels, adjust cooldown periods, or toggle the rule between active and paused states.

What It Does

Accepts a partial update payload and applies changes to the specified alert rule. Updates are atomic — either all changes apply or none do. The rule's updated_at timestamp is set automatically.

Why It's Useful

Adjust monitoring as requirements evolve without recreating rules. Tune thresholds after initial deployment, add new team members to notification channels, or temporarily pause rules during planned maintenance windows. Following SRE best practices, regular threshold review prevents alert fatigue while maintaining detection effectiveness.

Use Cases

DevOps Engineer

Threshold Tuning

After initial deployment, adjust an SSL expiry alert from 30 to 90 days to match your organization's certificate renewal lead time.

Fine-tune alerting sensitivity based on operational experience.

SRE

Maintenance Window Silence

Temporarily disable DNS change alerts during a planned migration, then re-enable after verification.

Prevent alert storms during known infrastructure changes.

IT Manager

Channel Management

Update email notification settings for critical rules when changing incident management tooling.

Keep notification routing current as your toolchain evolves.

Parameters

NameTypeRequiredDescription
domainstringRequiredRule ID (path parameter) and partial update payload in request bodyExample: {"threshold_value": 90, "enabled": true}

Response Fields

FieldTypeDescription
rule.idstringAlert rule ID
rule.updated_atstringISO 8601 update timestamp
rule.enabledbooleanCurrent enabled state
rule.threshold_valuenumberUpdated threshold value
rule.channelsarrayUpdated notification channels

Code Examples

cURL
curl "https://api.edgedns.dev/v1/alerts/rules/:id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "domain={"threshold_value": 90, "enabled": true}"
JavaScript
const response = await fetch(
  'https://api.edgedns.dev/v1/alerts/rules/:id?domain=%7B%22threshold_value%22%3A%2090%2C%20%22enabled%22%3A%20true%7D',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    'https://api.edgedns.dev/v1/alerts/rules/:id',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={
    'domain': '{"threshold_value": 90, "enabled": true}'
    }
)

data = response.json()
print(data)

Read the full Update Alert Rule guide

Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.

Read the guide →

Related Endpoints

External References

Learn more about the standards and protocols behind this endpoint.

Try This Endpoint

Test the Update Alert Rule endpoint live in the playground.