Mailgun Email Preview service with RESTful JSON HTTP API for providing email previews.
Email Preview API (1.0.0)
https://api.mailgun.net/
https://api.eu.mailgun.net/
Code Analysis
The Code Analysis API analyzes HTML email content to detect CSS features and provides comprehensive compatibility reports across major email clients, including support statistics, version-specific compatibility data, and detailed feature breakdowns to ensure optimal email rendering.
- US Mailgun
https://api.mailgun.net/v1/inspect/analyze/{test_id}/versions
- EU Mailgun
https://api.eu.mailgun.net/v1/inspect/analyze/{test_id}/versions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.mailgun.net/v1/inspect/analyze/{test_id}/versions'{ "meta": { "count": 3 }, "items": { "versions": [ … ] } }
- US Mailgun
https://api.mailgun.net/v1/inspect/analyze/{test_id}/resolve/{id}
- EU Mailgun
https://api.eu.mailgun.net/v1/inspect/analyze/{test_id}/resolve/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://api.mailgun.net/v1/inspect/analyze/{test_id}/resolve/{id}' \
-H 'Content-Type: application/json' \
-d '{
"resolved": true
}'A 200 response
Test results including detected features and their support data
List of email features detected in the analyzed HTML
Maps note reference IDs to their corresponding implementation notes
Unique identifier for this instance of the feature in the HTML
Line number where the feature was found in the HTML source
Email clients that fully support this feature
Email clients that partially support this feature
{ "meta": { "application_support": { … }, "count": 1, "inbox_provider_support": { … }, "market_support": { … }, "status": "Completed", "version": 1 }, "items": { "id": "67a654ba0f53254b9fdca3e2", "version": 1, "features": [ … ] } }