Skip to content

Email Preview API (1.0.0)

Mailgun Email Preview service with RESTful JSON HTTP API for providing email previews.

Download OpenAPI description
Languages
Servers
US Mailgun
https://api.mailgun.net
EU Mailgun
https://api.eu.mailgun.net

Image Validation

The Image Validation API processes image URLs or uploads to provide comprehensive details such as dimensions, type, file size, and format, reports frame count, animation duration, color depth, and transparency for GIFs, and include image optimization capabilities.

Operations

Accessibility

The Accessibility API evaluates HTML emails against WCAG standards, providing a clear pass/fail assessment to ensure compliance with accessibility guidelines.

Operations

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.

Operations

Email Preview

This API provides functionality to create and manage email preview tests, as well as create shareable links.

Operations

Get Emailpreview Test Info
Deprecated

Request

Returns test info.

WARNING: This endpoint is deprecated in favor of our V2 endpoint.

Security
basicAuth
Path
test_idstringrequired

Test to get the content of

curl -i -X GET \
  -u <username>:<password> \
  'https://api.mailgun.net/v1/preview/tests/{test_id}'

Responses

A 200 response

Bodyapplication/json
subjectstringrequired
dateinteger(int32)required
completedArray of strings
processingArray of strings
bouncedArray of strings
content_checkinggithub.com-mailgun-emailpreview-clients-preview-ContentCheckingResult (object) or null
Any of:
Response
application/json
{ "subject": "string", "date": 0, "completed": [ "string" ], "processing": [ "string" ], "bounced": [ "string" ], "content_checking": { "link_validation": {}, "image_validation": {}, "accessibility": {}, "code_analysis": {} } }

Delete Emailpreview Test
Deprecated

Request

Deletes the specified test.

WARNING: This endpoint is deprecated in favor of our V2 endpoint.

Security
basicAuth
Path
test_idstringrequired

Test to delete

curl -i -X DELETE \
  -u <username>:<password> \
  'https://api.mailgun.net/v1/preview/tests/{test_id}'

Responses

A 200 response

Bodyapplication/json
successbooleanrequired
Response
application/json
{ "success": true }

Spam Testing

The Spam Testing API scores inbox placement by submitting email content to seed accounts across major providers, reporting deliverability, spam filter verdicts, and authentication results to help maximize inbox reach.

Operations