List Previews
List light and dark previews for a captured message.
List light and dark previews for a captured message.
Scope: email_testing.messages.read
Path Parameters
idstringrequiredThe ID of the captured message, for example d5949378-3069-4d8f-a8f3-6e5edf5d6060. You get it from List Messages or the message.received webhook. It isn't the email's Message-ID header.
Sample Request
Request
curl "https://api.maileroo.com/v1/email-testing/messages/d5949378-3069-4d8f-a8f3-6e5edf5d6060/previews" \
-H "Authorization: Bearer roo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Sample Response
The response is wrapped in a data object.
Response
{
"data": {
"previews": [
{
"id": "7500c25b-42ca-4a31-bf84-860e0b8a2e19",
"message_id": "d5949378-3069-4d8f-a8f3-6e5edf5d6060",
"client": "inbox",
"mode": "light",
"status": "ready",
"renderer": "chrome",
"image_url": "https://api.maileroo.com/v1/email-testing/messages/d5949378-3069-4d8f-a8f3-6e5edf5d6060/previews/7500c25b-42ca-4a31-bf84-860e0b8a2e19/image",
"width": 1520,
"height": 16000,
"warnings": ["gmail_clip", "truncated"]
},
{
"id": "c3d1f0a4-5b6e-4f7a-9c8d-2e1f0a9b8c7d",
"message_id": "d5949378-3069-4d8f-a8f3-6e5edf5d6060",
"client": "inbox",
"mode": "dark",
"status": "ready",
"renderer": "chrome",
"image_url": "https://api.maileroo.com/v1/email-testing/messages/d5949378-3069-4d8f-a8f3-6e5edf5d6060/previews/c3d1f0a4-5b6e-4f7a-9c8d-2e1f0a9b8c7d/image",
"width": 1520,
"height": 16000,
"warnings": ["gmail_clip", "truncated", "images_blocked"],
"blocked_images": [
{ "host": "app.ahrefs.com", "status": 403, "content_type": "text/html" }
]
}
]
}
}Preview warnings
| Warning | Meaning |
|---|---|
gmail_clip | The HTML body is over Gmail's 102 KB limit, so Gmail would clip the email and show "[Message clipped]". |
truncated | The email is taller than 8,000 px, so the preview image stops at 8,000 px (16,000 px at 2x). |
images_blocked | One or more remote images in the email were answered by their host with an HTTP error (for example a 403 from a bot check) or a page instead of an image, so they show as broken in the preview. Your email isn't at fault; blocked_images lists each host and status. |
When images_blocked is present, blocked_images lists the affected remote images. Each item has a host (the image host), status (the HTTP response status), and optional content_type (the response content type without parameters).
Errors
404 Not Found— the resource does not exist or is not owned by the account.