# Email Preview This API provides functionality to create and manage email preview tests, as well as create shareable links. ## List Clients - [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 Test Results - [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. ## Reprocess Emailpreview 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 Test Content (empty) - [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 Test Content - [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. ## Generate Preview Address - [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. ## List/Search Tests V2 - [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 be returned; otherwise, all available tests are returned. The response structure remains identical in both cases. ## Create Email Preview Test V2 - [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 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. ## Get Test Results by client ID V2 - [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. is a test ID returned from test creation or the get test list functions. The is required and restricts the returned data exclusively to the specified client. If the client is not present in the test or is invalid, an error will be returned. ## Get Emailpreview Test Information V2 - [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 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. ## Delete Emailpreview Test V2 - [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. ## Retrieve Export Job Details for Email Preview Test Screenshots - [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. ## Retrieve Export Job Details for Email Preview Test Screenshots - [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. ## Create Export Job for Email Preview Test Screenshots - [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 ID returned in the response. ## Create PreviewShare - [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 PreviewShare - [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. ## Update PreviewShare - [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 PreviewShare - [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. ## Rotate PreviewShare - [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. ## Returns PreviewShare record by UUID. - [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) ## List Emailpreview Tests (deprecated) - [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. _This endpoint is deprecated in favor of our V2 endpoint._ ## Create Emailpreview Test (deprecated) - [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. _This endpoint is deprecated in favor of our V2 endpoint._ ## Get Emailpreview Test Info (deprecated) - [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. _This endpoint is deprecated in favor of our V2 endpoint._ ## Delete Emailpreview Test (deprecated) - [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. _This endpoint is deprecated in favor of our V2 endpoint._