API Documentation
POST /screenshots
Generate screenshots for an HTML email.
Screenshot API results are only accessible via the API and do not appear in your preflight.qa account.
Screenshot URLs expire 7 days after the request is made. If you need to access these screenshot images outside this 7 day window you can download and store or host the image asset elsewhere.
Parameters are required unless marked as optional.
| Parameter | Description |
|---|---|
| subject Required | The subject line of the email. Some full display screenshots will also display the subject line. |
| html Required | The HTML text to render within email applications. |
| webhook Optional | If supplied, we send POST updates to this endpoint as screenshots are processed. If not supplied, fetch results later using the uuid from GET /screenshots/:uuid. |
| apps Optional | Email apps and modes to screenshot. If not supplied, we test against all available clients. |
Example Request:
curl -X POST "https://api.preflight.qa/screenshots" \
-H "Authorization: Bearer <api_token>" \
-H "Content-Type: application/json" \
-d '{
"webhook": "https://partner.com/webhook",
"subject": "My email subject line."
"html": "<html>...</html>",
"apps": {
"apple_mail_mac": { "modes": ["light", "dark"] },
"outlook_mac": { "modes": ["light", "dark"] }
}
}' Example Responses
{
"meta": {
"credits": {
"consumed": 4,
"remaining": 312,
"period_ends_at": "2026-05-03T16:57:56Z"
},
"rate_limits": {
"general": {
"limit": 12,
"remaining": 11,
"reset_at": "2026-04-15T09:07:00Z"
},
"screenshots": {
"limit": 1,
"remaining": 0,
"reset_at": "2026-04-15T09:06:45Z"
}
},
"uuid": "1b153496-f702-4f89-85b4-cd1a9516cbbe",
"status": "accepted",
"code": 202
}
} {
"error":{
"status": "Bad Request",
"code": 400,
"message": "No HTML supplied."
}
} {
"error": {
"status": "Too Many Requests",
"code": 429,
"message": "Screenshot creation rate limit exceeded.",
"retry_after": 6,
"rate_limits": {
"general": {
"limit": 12,
"remaining": 9,
"reset_at": "2026-04-15T09:39:00Z"
},
"screenshots": {
"limit": 1,
"remaining": 0,
"reset_at": "2026-04-15T09:39:00Z"
}
}
}
}