Email Preview API (1.0.0)
Mailgun Email Preview service with RESTful JSON HTTP API for providing email previews.
https://api.mailgun.net/
https://api.eu.mailgun.net/
Request
Retrieves detailed information about a specific test, including the subject, submission time (in UNIX timestamp format), processing statuses, and any content checking results. The response includes one to three properties containing arrays of clients: completed (clients that have successfully uploaded screenshots), processing (clients that are still being processed by our system), and bounced (clients that were bounced by the destination and cannot be retried). Additionally, the system will automatically requeue screenshots if they remain in processing for more than three minutes.
- US Mailgun
https://api.mailgun.net/v2/preview/tests/{test_id}
- EU Mailgun
https://api.eu.mailgun.net/v2/preview/tests/{test_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.mailgun.net/v2/preview/tests/{test_id}'
{ "subject": "Example Subject", "date": 1739876826, "completed": [ "client1" ], "processing": [ "client2" ], "bounced": [ "client3" ], "content_checking": { "link_validation": { … }, "image_validation": { … }, "accessibility": { … } } }
- US Mailgun
https://api.mailgun.net/v2/preview/tests/{test_id}
- EU Mailgun
https://api.eu.mailgun.net/v2/preview/tests/{test_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
-u <username>:<password> \
'https://api.mailgun.net/v2/preview/tests/{test_id}'
{ "success": true }
- US Mailgun
https://api.mailgun.net/v2/preview/tests/{test_id}/exports/{job_id}
- EU Mailgun
https://api.eu.mailgun.net/v2/preview/tests/{test_id}/exports/{job_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.mailgun.net/v2/preview/tests/{test_id}/exports/{job_id}'
{ "job_id": "67b469d74b911fa30a4d782e", "test_id": "98b469d74b956fa30a4d125f", "clients": [ "android11_gmailapp_pixel5_dm", "android12_gmailapp_pixel6_dm" ], "job_status": "Completed", "zip_url": "https://example.com/export.zip" }