Skip to content

Update open tracking settings

Request

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

Security
basicAuth
Path
namestringrequired

The name of the domain you want to update

Bodymultipart/form-datarequired
activeboolean

Set this param to true or false to toggle open tracking active status. Omit this param to keep current settings.

place_at_the_topboolean

Setting this param to true will place the open tracking pixel at the top of the HTML body when inserted into the email mime. Omit this param to keep current setting.

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

Responses

A 200 response

Bodyapplication/json
messagestringrequired

A message indicating success

openobject(github.com-mailgun-domains-httpapi-openSettings)required

Open settings

Response
{ "message": "Domain tracking settings have been updated", "open": { "active": true } }