This triggers the capture of a preview. Once the capture is complete, the content of the JSON response body will contain URLs for each of the image sizes available. A second request will be needed to obtain actual image data.

🚧

This method typically typically blocks for about 6 seconds when a new preview must be captured

The URLs returned will be on subdomains of litmuscdn.com eg https://ol2015.capture.litmuscdn.com/87bf47f2-600e-40eb-8ccb-c9649f17644d/results/ol2015-vertical-allowed.png. GET requests to these URLs will return redirects to the current location of the image asset.

Subsequent requests for a capture that's previously been made will result in a redirect to the cached result of the previous capture. To trigger a new capture a new email_guid must be obtained. Only the initial capture is a billable event, not GETs of the cached preview.

Errors
400 Bad Request
404 Not Found - when the email_guid is not found. This can occur when email assets or stored captures have expired having exceeded their lifetime
500 Internal Server Error - in particular when email clients fail unexpectedly
503 Service Unavailable
504 Timeout - this can occur when an email client takes too long to respond

Different configurations of the same client are considered as separate captures and billed as such. For instance the following would be considered three separate captures:

$ curl -X "GET" "https://instant-api.litmus.com/v1/emails/87bf47f2-600e-40eb-8ccb-c9649f17644d/previews/IPAD?images=allowed&orientation=vertical"
$ curl -X "GET" "https://instant-api.litmus.com/v1/emails/87bf47f2-600e-40eb-8ccb-c9649f17644d/previews/IPAD?images=blocked&orientation=vertical"
$ curl -X "GET" "https://instant-api.litmus.com/v1/emails/87bf47f2-600e-40eb-8ccb-c9649f17644d/previews/IPAD?images=blocked&orientation=horizontal"
Language
Click Try It! to start a request and see the response here!