Skip to content

Domain Tracking

Mailgun offers tracking for clicks, unsubscribes, and opens, with optional HTTPS protocol support on tracking URLs. To enable HTTPS, Mailgun uses Let’s Encrypt with HTTP-01 challenges through your existing tracking CNAME record to issue a TLS certificate. This setup also includes support for HTTP Strict Transport Security (HSTS) for enhanced security.

Get tracking settings

Request

Use to check if open, click and unsubscribe tracking are active/inactive.

Security
basicAuth
Path
namestringrequired

The name of the domain to fetch tracking details for.

curl -i -X GET \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/domains/{name}/tracking'

Responses

A 200 response

Bodyapplication/json
trackingobject(github.com-mailgun-domains-httpapi-trackingSettings)required
Response
{ "tracking": { "open": {}, "click": {}, "unsubscribe": {}, "web_scheme": "http" } }