This API provides functionality to create and manage email preview tests, as well as create shareable links.
Returns a list of clients that can perform an email preview.
A 200 response
A 400 response
A 401 response
A 500 response
A 4xx response
{- "clients": {
- "android10_gmailapp_pixel4_dm": {
- "id": "android10_gmailapp_pixel4_dm",
- "client": "Gmail App Pixel 4",
- "os": "Android 10 (Dark Mode)",
- "category": "Mobile",
- "browser": "",
- "rotate": false,
- "imageblocking": false,
- "free": false,
- "default": true
}
}
}
Returns a list of email preview tests.
WARNING: This endpoint is deprecated in favor of our V2 endpoint.
[- {
- "id": "",
- "date": 0,
- "type": "",
- "subject": "",
- "headers": {
- "": ""
}
}
]
Creates a new email preview test.
WARNING: This endpoint is deprecated in favor of our V2 endpoint.
{ "subject": "some subject", "url": "https://example.com", "content_checking": {} }
{- "id": "gmail"
}
Returns the results for the specified email preview test.
{- "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": "",
- "status": "Complete",
- "statusdetails": {
- "submitted": 1741804257,
- "completed": 1741804276,
- "bouncecode": "",
- "bouncemessage": ""
}
}, - "android10_gmailapp_pixel4_lm": {
- "id": "android10_gmailapp_pixel4_lm",
- "displayname": "Gmail App Pixel 4",
- "client": "Gmail App",
- "os": "Android 10",
- "category": "Mobile",
- "browser": "",
- "screenshots": {
}, - "status": "Complete",
- "statusdetails": {
- "submitted": 1741804257,
- "completed": 1741804275,
- "bouncecode": "",
- "bouncemessage": ""
}
}
}
Returns test info.
WARNING: This endpoint is deprecated in favor of our V2 endpoint.
{- "subject": "string",
- "date": 0,
- "completed": [
- "string"
], - "processing": [
- "string"
], - "bounced": [
- "string"
], - "content_checking": {
- "link_validation": {
- "items": {
- "id": "string",
- "links": {
- "self": "string"
}
}, - "errors": [
- {
- "status": "string",
- "title": "string",
- "detail": "string"
}
]
}, - "image_validation": {
- "items": {
- "id": "string",
- "links": {
- "self": "string"
}
}, - "errors": [
- {
- "status": "string",
- "title": "string",
- "detail": "string"
}
]
}, - "accessibility": {
- "items": {
- "id": "string",
- "links": {
- "self": "string"
}
}, - "errors": [
- {
- "status": "string",
- "title": "string",
- "detail": "string"
}
]
}
}
}
Deletes the specified test.
WARNING: This endpoint is deprecated in favor of our V2 endpoint.
{- "success": true
}
This call returns a list of Email Tests along with metadata about each test. Email Tests are stored for 90 days. When query parameters are provided, only the tests matching the specified criteria will be returned; otherwise, all available tests are returned. The response structure remains identical in both cases.
[- {
- "id": "DdbNga1MdL3N7sO19v5MAmpOKIqFrLg9cgpCIgS4othXJ",
- "date": 1739876826,
- "type": "email-test",
- "subject": "subject",
- "headers": { }
}, - {
- "id": "pDdLWjbj3ZbAnHkTbg3QG27mFyoc62OAH1WJXgmb0uNT4",
- "date": 1739874606,
- "type": "email-test",
- "subject": "",
- "headers": { }
}
]
This call creates a new email test and submits it to our system for processing.
All requests must contain a subject property and one source property (either html or url). All other properties are optional. In the following table, each property and its default value is shown.
If content-checking variables (such as those for link validation, image validation, or accessibility) are set in the body of the request, the endpoint will run content-checking on the email content.
The response will include an id property that should be used to request the results or trigger further processes on the email content.
For enterprise customers, the response will also include the customer_id and reference_id that were submitted with the test.
{ "subject": "Example subject", "html": "<html>...</html>", "transfer_encoding": "base64", "charset": "utf-8", "customer_id": "1", "clients": [ "client1", "client2" ], "content_checking": { "link_validation": true, "image_validation": true, "accessibility": true } }
{- "id": "exampleTestID",
- "customer_id": "1",
- "warnings": [
- {
- "name": "InvalidClient",
- "message": "A client ID you have requested (ipadpro_11_15, ipadpro_12_15, iphonese2_15, iphone11pro_15, iphone12promax_15, iphone13promax_15) could not be found. It may be that the code does not exist or that it is no longer supported."
}
], - "content_checking": {
- "link_validation": {
- "items": {
- "id": "67b469d74b911fa30a4d782e",
- "links": {
- "self": "/v1/inspect/links/67b469d74b911fa30a4d782e"
}
}
}, - "image_validation": {
- "items": {
- "id": "67b469d74b911fa30a4d782e",
- "links": {
- "self": "/v1/inspect/images/67b469d74b911fa30a4d782e"
}
}
}, - "accessibility": {
- "items": {
- "id": "67b469d74b911fa30a4d782e",
- "links": {
- "self": "/v1/inspect/accessibility/67b469d74b911fa30a4d782e"
}
}
}
}
}
This call returns detailed results for screenshots including their upload locations, send times, completion times, and information about bounces, if any.
{- "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": "",
- "status": "Complete",
- "statusdetails": {
- "submitted": 1741804257,
- "completed": 1741804276,
- "bouncecode": "",
- "bouncemessage": ""
}
}
}
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.
{- "subject": "Example Subject",
- "date": 1739876826,
- "completed": [
- "client1"
], - "processing": [
- "client2"
], - "bounced": [
- "client3"
], - "content_checking": {
- "link_validation": {
- "items": {
- "links": { }
}
}, - "image_validation": {
- "items": {
- "id": "67b469d74b911fa30a4d782e",
- "links": {
- "self": "/v1/inspect/images/67b469d74b911fa30a4d782e"
}
}
}, - "accessibility": {
- "items": {
- "links": { }
}
}
}
}
{- "test_id": "some-test-id",
- "url_uuid": "some-uuid",
- "url": "share.mailgun.com/email-previews/some-uuid",
- "enabled": true,
- "expires_at": "0001-01-01 00:00:00 +0000 UTC"
}
Re-generates the uuid and share url, and resets the expiration.
{- "test_id": "some-test-id",
- "url_uuid": "some-new-uuid",
- "url": "share.mailgun.com/email-previews/some-new-uuid",
- "enabled": true,
- "expires_at": "0001-01-01 00:00:00 +0000 UTC"
}