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

Request

Delete a specific image validation test by its unique test ID. This endpoint allows you to remove an image validation test from the system. If the test ID does not exist, the appropriate error message is returned.

Security
basicAuth
Path
idstringrequired

The unique identifier of the test.

curl -i -X DELETE \
  -u <username>:<password> \
  'https://api.mailgun.net/v1/inspect/images/{id}'

Responses

A 200 response

Bodyapplication/json
messagestringrequired

Response message

Response
application/json
{ "message": "Image validation test with test id <id> has been successfully deleted." }

Request

Retrieve a paginated list of all image validation tests that have been submitted. The response is paginated, with a limit of up to 1000 items per page. The total count of records will display in the meta object under the key, 'count'.

Security
basicAuth
Query
limitinteger

Max count of items. Max: 1000. Default: 100

skipinteger

Get the list of items starting at the nth element (paging). Default: 0

curl -i -X GET \
  -u <username>:<password> \
  'https://api.mailgun.net/v1/inspect/images?limit=0&skip=0'

Responses

A 200 response

Bodyapplication/json
metaobject or null
paginggithub.com-mailgun-scaffold-httpapi-paging-PagingResponse (object) or null
Any of:
itemsArray of objects(github.com-mailgun-inspect-internal-imagevalidation-ImageValidation)
Response
application/json
{ "meta": { "count": 17 }, "paging": { "first": "https://api.mailgun.net/v1/inspect/accessibility/tests?limit=100&skip=0", "last": "https://api.mailgun.net/v1/inspect/accessibility/tests?limit=100&skip=0" }, "items": [ {} ] }

Request

Create an image validation test.

Security
basicAuth
Bodyapplication/jsonrequired
linksArray of strings
curl -i -X POST \
  -u <username>:<password> \
  https://api.mailgun.net/v1/inspect/images \
  -H 'Content-Type: application/json' \
  -d '{
    "links": [
      "string"
    ]
  }'

Responses

A 200 response

Bodyapplication/json
metaobject or null
itemsobject(github.com-mailgun-inspect-internal-imagevalidation-CreateResource)
Response
application/json
{ "meta": { "status": "Processing" }, "items": { "id": "67a654ba0f53254b9fdca3e2", "links": {} } }

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