Updates the configuration of an existing send alert.
NOTE: This endpoint performs a full replacement (PUT) of the alert resource. To update specific fields like 'alert_channels' without losing existing configuration, you should first fetch the current alert object via a GET request.
Use the attributes from the existing alert to populate the request body, modifying only the 'alert_channels' array (or other desired fields) before sending the PUT request. Omitting existing attributes may result in validation errors or the loss of current settings.
The metric being monitored.
| Enum Value | Description |
|---|---|
| hard_bounce_rate | Hard bounce rate |
| temporary_fail_rate | Temporary fail rate |
| delivered_rate | Delivery rate |
| complained_rate | Complaint rate |
The comparison operator.
| Enum Value | Description |
|---|---|
| = | Equal |
| != | Not equal |
| < | Less than |
| <= | Less than or equal |
| > | Greater than |
| >= | Greater than or equal |
The dimension to apply to the metric.
| Enum Value | Description |
|---|---|
| domain | Sender domain name, e.g. example.com |
| ip | Sending IP address |
| ip_pool | IP Pool ID |
| recipient_provider | Recipient Provider, e.g. Gmail, Other US, etc. |
| subaccount | Subaccount name |
A list of filters to apply to the alert.
- US Mailgunhttps://api.mailgun.net/v1/thresholds/alerts/send/{name}
- EU Mailgunhttps://api.eu.mailgun.net/v1/thresholds/alerts/send/{name}
curl -i -X PUT \
-u '<username>:<password>' \
'https://api.mailgun.net/v1/thresholds/alerts/send/{name}' \
-H 'Content-Type: application/json' \
-d '{
"name": "hard bounce rate",
"metric": "hard_bounce_rate",
"comparator": "<",
"limit": ".98",
"dimension": "subaccount",
"alert_channels": [
"email",
"webhook",
"slack"
],
"period": "1h"
}'{ "message": "string" }