Alerts (0.0.1)
Our alerting solution is centered around two concepts: events and channels. The occurrence of an event can be configured to trigger an alert. A channel describes the delivery method for an alert. Every configured alert consists of an event type / channel pair. This level of granularity allows alerting to be configured to your exact preference.
https://api.mailgun.net/
https://api.eu.mailgun.net/
Request
Use this endpoint to update an existing alert setting record.
NOTE: When updating a webhook alert, we will ensure the endpoint is reachable by sending a GET request to the provided URL. If a 200 response is not returned, a 400 will be returned and the alert setting update will be rejected.
- US Mailgun
https://api.mailgun.net/v1/alerts/settings/events/{id}
- EU Mailgun
https://api.eu.mailgun.net/v1/alerts/settings/events/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
-u <username>:<password> \
'https://api.mailgun.net/v1/alerts/settings/events/{id}' \
-H 'Content-Type: application/json' \
-d '{
"event_type": "ip_delisted",
"channel": "email",
"settings": {
"emails": [
"recipient-a@example.com",
"recipient-b@example.com"
]
}
}'
{ "message": "settings updated" }
- US Mailgun
https://api.mailgun.net/v1/alerts/settings/events/{id}
- EU Mailgun
https://api.eu.mailgun.net/v1/alerts/settings/events/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
-u <username>:<password> \
'https://api.mailgun.net/v1/alerts/settings/events/{id}'
{ "message": "settings deleted" }
- US Mailgun
https://api.mailgun.net/v1/alerts/settings
- EU Mailgun
https://api.eu.mailgun.net/v1/alerts/settings
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.mailgun.net/v1/alerts/settings
{ "events": [ { … }, { … }, { … } ], "webhooks": {}, "slack": {} }