Skip to content

Update Alert

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.

Security
basicAuth
Path
idstringrequired

The settings ID.

Bodyapplication/jsonrequired
event_typestringrequired

The type of event for which you would like to receive alerts.

channelstring(github.com-mailgun-alerts-channels-Channel)required

The delivery method for the alert.

Enum ValueDescription
email

email

webhook

webhook

slack

Slack

settingsobject(github.com-mailgun-alerts-internal-settings-ChannelSettings)required

The details pertaining to the specified channel. Please note that the contents of this object differ per channel type.

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"
      ]
    }
  }'

Responses

A 200 response

Bodyapplication/json
messagestringrequired

Response message

Response
{ "message": "settings updated" }