Ver en español

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
  }
}