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.
Use to check if open, click and unsubscribe tracking are active/inactive.
{- "tracking": {
- "open": {
- "active": true
}, - "click": {
- "active": true
}, - "unsubscribe": {
- "active": true,
- "html_footer": "off",
- "text_footer": "on"
}, - "web_scheme": "http"
}
}
Use to turn on/off the click tracking at the domain level.
{- "message": "Domain tracking settings have been updated",
- "click": {
- "active": true
}
}
Use to turn on/off the open tracking at the domain level.
{- "message": "Domain tracking settings have been updated",
- "open": {
- "active": true
}
}
Use to turn on/off the unsubscribe tracking at the domain level.
{- "message": "Domain tracking settings have been updated",
- "unsubscribe": {
- "active": true,
- "html_footer": "<br>\n<p><a href=\"%unsubscribe_url%\">unsubscribe</a></p>\n",
- "text_footer": "To unsubscribe click: <%unsubscribe_url%>\n\n"
}
}
Initiates regeneration of an expired TLS certificate for the tracking domain in a background task. Once generation is enqueued, you may poll status endpoint in location field to check for success. This will not regenerate an existing certificate that is still valid
A 202 response
A 400 response
A 402 response
A 404 response
A 409 response
A 429 response
{- "message": "Initiated x509 key pair generation",
- "location": "/v2/x509/example.com/status"
}
Initiates generation of a TLS certificate for the tracking domain in a background task. Once generation is enqueued, you may poll the status endpoint in location
field to check for success
A 202 response
A 400 response
A 402 response
A 404 response
A 409 response
{- "message": "Initiated x509 key pair generation",
- "location": "/v2/x509/example.com/status"
}