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
This call returns detailed results for screenshots including their upload locations, send times, completion times, and information about bounces, if any. <test_id> is a test ID returned from test creation or the get test list functions. The <client_id> is required and restricts the returned data exclusively to the specified client. If the client is not present in the test or is invalid, an error will be returned.
- US Mailgun
https://api.mailgun.net/v2/preview/tests/{test_id}/results/{client_id}
- EU Mailgun
https://api.eu.mailgun.net/v2/preview/tests/{test_id}/results/{client_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}/results/{client_id}'
{ "android10_gmailapp_pixel4_dm": { "id": "android10_gmailapp_pixel4_dm", "displayname": "Gmail App Pixel 4", "client": "Gmail App", "os": "Android 10 (Dark Mode)", "category": "Mobile", "browser": "", "screenshots": { … }, "thumbnail": "https://images.emailonacid.com/1234", "fullthumbnail": "https://images.emailonacid.com/90479d4733fc5f409475644cb01384b0b21bc53f1c32e0ed609756dfb63d2f5%3A1741804257", "status": "Complete", "statusdetails": { … } } }
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 }