# Email Preview API

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

Version: 1.0.0

## Servers

US Mailgun
```
https://api.mailgun.net
```

EU Mailgun
```
https://api.eu.mailgun.net
```

## Security

### basicAuth

HTTP Basic auth using api:YOUR_API_KEY. See [documentation](https://documentation.mailgun.com/docs/mailgun/api-reference/authentication/)

Type: http
Scheme: basic

## Download OpenAPI description

 - [Email Preview API](https://documentation.mailgun.com/_bundle/docs/inspect/api-reference/openapi-final.yaml)

## Link Validation

 - [GET /v1/inspect/links/{id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/link-validation/get-v1-inspect-links--id-.md): Returns the results of a link validation test.
 - [POST /v1/inspect/links/{id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/link-validation/post-v1-inspect-links--id-.md): Reprocess a link validation test.
 - [DELETE /v1/inspect/links/{id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/link-validation/delete-v1-inspect-links--id-.md): Delete a specific link validation test by its unique test ID. This endpoint allows you to remove a link validation test from the system. If the test ID does not exist, the appropriate error message is
 - [GET /v1/inspect/links](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/link-validation/get-v1-inspect-links.md): Retrieve a list of previous link validation tests based on various filters.
 - [POST /v1/inspect/links](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/link-validation/post-v1-inspect-links.md): Create a link validation test.
 - [POST /v1/inspect/links/html-validate](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/link-validation/post-v1-inspect-links-html-validate.md): Create a link validation test from an HTML input.
 - [POST /v1/inspect/links/{id}/csv](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/link-validation/post-v1-inspect-links--id--csv.md): Compares link validation test results to the spreadsheet provided as a CSV, XLS or XLSX file.
## Image Validation

 - [GET /v1/inspect/images/{id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/image-validation/get-v1-inspect-images--id-.md): Returns the results of an image validation test.
 - [DELETE /v1/inspect/images/{id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/image-validation/delete-v1-inspect-images--id-.md): 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
 - [GET /v1/inspect/images](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/image-validation/get-v1-inspect-images.md): 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
 - [POST /v1/inspect/images](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/image-validation/post-v1-inspect-images.md): Create an image validation test.
 - [POST /v1/inspect/images/html-validate](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/image-validation/post-v1-inspect-images-html-validate.md): Create an image validation test with HTML
 - [POST /v1/inspect/images/upload](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/image-validation/post-v1-inspect-images-upload.md): Create an image validation test by image upload
 - [POST /v1/inspect/images/{id}/reprocess](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/image-validation/post-v1-inspect-images--id--reprocess.md): Reprocess an image validation test.
 - [POST /v1/inspect/images/{id}/optimize](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/image-validation/post-v1-inspect-images--id--optimize.md): Optimizes images by test id
 - [POST /v1/inspect/images/{id}/optimize/{image_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/image-validation/post-v1-inspect-images--id--optimize--image-id-.md): Optimizes a single image by test id
## Accessibility

 - [GET /v1/inspect/accessibility](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/accessibility/get-v1-inspect-accessibility.md): Retrieve a paginated list of all accessibility tests that have been submitted. Each test includes details such as its status, the number of checks performed, and, of those checks, how many passes and
 - [POST /v1/inspect/accessibility](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/accessibility/post-v1-inspect-accessibility.md): This endpoint allows users to submit an accessibility test for processing. It accepts a set of HTML content, processes it for accessibility issues, and returns a unique job ID for tracking the status
 - [GET /v1/inspect/accessibility/{id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/accessibility/get-v1-inspect-accessibility--id-.md): Retrieve the details of a specific accessibility test using the provided test ID. This endpoint returns comprehensive details about the test, including metadata and test results.
 - [DELETE /v1/inspect/accessibility/{id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/accessibility/delete-v1-inspect-accessibility--id-.md): Delete a specific accessibility test by its unique test ID. This endpoint allows you to remove an accessibility test from the system. If the test ID does not exist, the appropriate error message is re
## Code Analysis

 - [GET /v1/inspect/analyze/dictionary](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/code-analysis/get-v1-inspect-analyze-dictionary.md): Returns the lookup dictionary containing variants, clients, platforms, application types, support levels, and categories used in code analysis.
 - [GET /v1/inspect/analyze](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/code-analysis/get-v1-inspect-analyze.md): Returns a paginated list of all code analysis jobs under the account, showing only the latest version of each test. Uses skip/limit pagination and supports filtering by status.
 - [POST /v1/inspect/analyze](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/code-analysis/post-v1-inspect-analyze.md): Create a code analysis test to analyze HTML content for email client feature compatibility.
 - [GET /v1/inspect/analyze/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/code-analysis/get-v1-inspect-analyze--test-id-.md): Returns the latest version of code analysis test results for a given test ID.
 - [POST /v1/inspect/analyze/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/code-analysis/post-v1-inspect-analyze--test-id-.md): Creates a new version of an existing code analysis test with incremented version number.
 - [DELETE /v1/inspect/analyze/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/code-analysis/delete-v1-inspect-analyze--test-id-.md): Deletes all versions of a code analysis test by test ID.
 - [GET /v1/inspect/analyze/{test_id}/versions/{version_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/code-analysis/get-v1-inspect-analyze--test-id--versions--version-id-.md): Returns code analysis test results for a specific test ID and version.
 - [GET /v1/inspect/analyze/{test_id}/versions](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/code-analysis/get-v1-inspect-analyze--test-id--versions.md): Returns all versions available for a given test ID.
 - [POST /v1/inspect/analyze/{test_id}/resolve/{id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/code-analysis/post-v1-inspect-analyze--test-id--resolve--id-.md): Updates the resolved status of a specific instance within a feature in the latest version of a test.
## Email Preview

 - [GET /v1/preview/tests/clients](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v1-preview-tests-clients.md): Returns a list of clients that can perform an email preview.
 - [GET /v1/preview/tests/{test_id}/results](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v1-preview-tests--test-id--results.md): Returns the results for the specified email preview test.
 - [PUT /v1/preview/tests/{test_id}/results/reprocess](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/put-v1-preview-tests--test-id--results-reprocess.md): Reprocesses the test for the passed clients.
 - [GET /v1/preview/tests/{test_id}/content](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v1-preview-tests--test-id--content.md): Gets HTML content of the passed test.
 - [GET /v1/preview/tests/{test_id}/content/{content}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v1-preview-tests--test-id--content--content-.md): Gets HTML content of the passed test.
 - [POST /v1/preview/address](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/post-v1-preview-address.md): Returns or generates an account's email preview address.
 - [GET /v2/preview/tests](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v2-preview-tests.md): 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
 - [POST /v2/preview/tests](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/post-v2-preview-tests.md): 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 optio
 - [GET /v2/preview/tests/{test_id}/results/{client_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v2-preview-tests--test-id--results--client-id-.md): 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 crea
 - [GET /v2/preview/tests/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v2-preview-tests--test-id-.md): 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 on
 - [DELETE /v2/preview/tests/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/delete-v2-preview-tests--test-id-.md): Deletes the specified test and its content checking. Once it is deleted, it cannot be recovered.
 - [GET /v2/preview/tests/{test_id}/exports/{job_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v2-preview-tests--test-id--exports--job-id-.md): Retrieves the status and details of an export job created to collect screenshots for an Email Preview Test. Provide both the test ID and the job ID to fetch the export job information.
 - [GET /v2/preview/tests/{test_id}/exports](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v2-preview-tests--test-id--exports.md): Retrieves the status and details of an export job created to collect screenshots for an Email Preview Test. Provide the test ID to fetch the latest export job information.
 - [POST /v2/preview/tests/{test_id}/exports](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/post-v2-preview-tests--test-id--exports.md): Initiates an export job that collects screenshots for a specified Email Preview Test. Provide the list of client IDs whose screenshots you want to export. The job status can be monitored using the job
 - [POST /v2/preview/address](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/post-v2-preview-address.md): Returns or generates an account's email preview address.
 - [POST /v1/preview/sharing](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/post-v1-preview-sharing.md): Create a shareable link to an email preview test.
 - [GET /v1/preview/sharing/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v1-preview-sharing--test-id-.md): Returns PreviewShare record by TID.
 - [PUT /v1/preview/sharing/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/put-v1-preview-sharing--test-id-.md): Updates PreviewShare record enabled field.
 - [DELETE /v1/preview/sharing/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/delete-v1-preview-sharing--test-id-.md): Delete PreviewShare record by TID.
 - [POST /v1/preview/sharing/{test_id}/rotate](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/post-v1-preview-sharing--test-id--rotate.md): Re-generates the uuid and share url, and resets the expiration.
 - [GET /v1/preview/sharing/public/{id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v1-preview-sharing-public--id-.md)
 - [GET /v1/preview/tests](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v1-preview-tests.md): Returns a list of email preview tests.**WARNING:** *This endpoint is deprecated in favor of our [V2 endpoint](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/tag/Email-Previ
 - [POST /v1/preview/tests](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/post-v1-preview-tests.md): Creates a new email preview test.**WARNING:** *This endpoint is deprecated in favor of our [V2 endpoint](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/tag/Email-Preview/#t
 - [GET /v1/preview/tests/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/get-v1-preview-tests--test-id-.md): Returns test info.**WARNING:** *This endpoint is deprecated in favor of our [V2 endpoint](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/tag/Email-Preview/#tag/Email-Previe
 - [DELETE /v1/preview/tests/{test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/email-preview/delete-v1-preview-tests--test-id-.md): Deletes the specified test.**WARNING:** *This endpoint is deprecated in favor of our [V2 endpoint](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/tag/Email-Preview/#tag/Ema
## Spam Testing

 - [GET /v1/inspect/spam](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/spam-testing/get-v1-inspect-spam.md): Returns a paginated list of all spam tests for the account, ordered by created_at desc. Supports filtering by status and region.
 - [POST /v1/inspect/spam](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/spam-testing/post-v1-inspect-spam.md): Initiates an inbox placement test with subject and HTML provided directly in the request body. Returns immediately with status=processing; poll GET using the Retry-After interval.
 - [GET /v1/inspect/spam/{spam_test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/spam-testing/get-v1-inspect-spam--spam-test-id-.md): Returns the current state of a spam test. A Retry-After: 10 header is set when the test is still processing.
 - [DELETE /v1/inspect/spam/{spam_test_id}](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/spam-testing/delete-v1-inspect-spam--spam-test-id-.md): Permanently deletes the spam test and its results.
 - [GET /v1/inspect/spam/providers](https://documentation.mailgun.com/docs/inspect/api-reference/openapi-final/spam-testing/get-v1-inspect-spam-providers.md): Returns the static list of ESPs supported by spam testing, grouped by category (B2C / B2B).
