Creating Email Alerts via API

Email Alert API

The Email Alert API allows you to programmatically create, manage, and customize email notifications for your monitoring events.

Creating an Email Alert

To create a new email alert, send a POST request to the alerts endpoint:

curl -X POST "https://api.uptimekeeper.com/v1/alerts" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "email",
    "name": "Website Down Alert",
    "recipients": ["[email protected]", "[email protected]"],
    "monitor_ids": ["mon_12345", "mon_67890"],
    "triggers": ["down", "degraded"],
    "threshold_seconds": 60,
    "include_recovery": true
  }'

API Parameters

ParameterTypeDescription
typestringMust be “email” for email alerts
namestringA descriptive name for this alert
recipientsarrayList of email addresses to notify
monitor_idsarrayList of monitor IDs to trigger this alert
triggersarrayEvent types that trigger the alert (down, degraded, etc.)
threshold_secondsintegerHow long a condition must persist before alerting
include_recoverybooleanWhether to send notifications when services recover

Updating an Email Alert

To update an existing email alert, send a PUT request:

curl -X PUT "https://api.uptimekeeper.com/v1/alerts/alert_12345" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "recipients": ["[email protected]", "[email protected]"]
  }'

Deleting an Email Alert

To delete an email alert, send a DELETE request:

curl -X DELETE "https://api.uptimekeeper.com/v1/alerts/alert_12345" \
  -H "X-API-Key: your_api_key"