Mailgun Inspect/API Documentation//
- Create Email Preview Test V2
List Clients
Get Test Results
Reprocess Emailpreview Test
Get Test Content (empty)
Get Test Content
Generate Preview Address
List/Search Tests V2
Get Test Results by client ID V2
Get Emailpreview Test Information V2
Delete Emailpreview Test V2
Retrieve Export Job Details for Email Preview Test Screenshots
Retrieve Export Job Details for Email Preview Test Screenshots
Create Export Job for Email Preview Test Screenshots
Generate Preview Address
Create PreviewShare
Get PreviewShare
Update PreviewShare
Delete PreviewShare
Rotate PreviewShare
Returns PreviewShare record by UUID.
List Emailpreview Tests
Create Emailpreview Test
Get Emailpreview Test Info
Delete Emailpreview Test
Create Email Preview Test...
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.
Security
basicAuth
- US Mailgunhttps://api.mailgun.net/v2/preview/tests
- EU Mailgunhttps://api.eu.mailgun.net/v2/preview/tests
curl -i -X POST \
-u '<username>:<password>' \
https://api.mailgun.net/v2/preview/tests \
-H 'Content-Type: application/json' \
-d '{
"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,
"code_analysis": true
}
}'Response
{ "id": "exampleTestID", "customer_id": "1", "warnings": [ { … } ], "content_checking": { "link_validation": { … }, "image_validation": { … }, "accessibility": { … }, "code_analysis": { … } } }