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/
Request
Retrieve a paginated list of all accessibility tests that have been submitted. Each test includes details such as its status, the number of checks performed, and, of those checks, how many passes and failures there were. The response is paginated, with a limit of up to 1000 items per page. The total count of records will display in the meta object under the key, 'count'.
- US Mailgun
https://api.mailgun.net/v1/inspect/accessibility
- EU Mailgun
https://api.eu.mailgun.net/v1/inspect/accessibility
- 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/accessibility?limit=0&skip=0'{ "meta": { "count": 9 }, "paging": { "first": "https://api.mailgun.net/v1/inspect/accessibility/tests?limit=100&skip=0", "last": "https://api.mailgun.net/v1/inspect/accessibility/tests?limit=100&skip=0" }, "items": [ { … } ] }
Request
This endpoint allows users to submit an accessibility test for processing. It accepts a set of HTML content, processes it for accessibility issues, and returns a unique job ID for tracking the status of the test. The status of the job will display in the meta object, with a status of 'Processing'.
- US Mailgun
https://api.mailgun.net/v1/inspect/accessibility
- EU Mailgun
https://api.eu.mailgun.net/v1/inspect/accessibility
- 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/accessibility \
-H 'Content-Type: application/json' \
-d '{
"html": "string",
"encoded": true
}'{ "meta": { "created_at": "2025-05-28T05:30:00Z", "status": "Processing" }, "items": { "id": "677ea3cdf1051e25e7dbfe73", "links": { … } } }
- US Mailgun
https://api.mailgun.net/v1/inspect/accessibility/{id}
- EU Mailgun
https://api.eu.mailgun.net/v1/inspect/accessibility/{id}
- 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/accessibility/{id}'{ "meta": { "created_at": "2025-05-28T05:30:00Z", "status": "Complete", "updated_at": "2025-05-28T05:30:10Z" }, "items": [ { … } ] }
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.