Skip to content

Update unsubscribe tracking settings

Request

Use to turn on/off the unsubscribe tracking at the domain level.

Security
basicAuth
Path
namestringrequired

The name of the domain you want to update

Bodymultipart/form-datarequired
activeboolean

This param will toggle the active status of unsubscribe tracking on the domain.

curl -i -X PUT \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/domains/{name}/tracking/unsubscribe' \
  -H 'Content-Type: multipart/form-data' \
  -F active=true \
  -F html_footer=string \
  -F text_footer=string

Responses

A 200 response

Bodyapplication/json
messagestringrequired

A message indicating success

unsubscribeobject(github.com-mailgun-domains-httpapi-unsubscribeSettings)required

Unsubscribe settings

Response
{ "message": "Domain tracking settings have been updated", "unsubscribe": { "active": true, "html_footer": "\n<br>\n<p><a href=\"%unsubscribe_url%\">unsubscribe</a></p>\n", "text_footer": "\n\nTo unsubscribe click: <%unsubscribe_url%>\n\n" } }