Feature request: include screenshot_url in the Templates API response
Request: add screenshot_url to GET /api/templates and GET /api/templates/{id}, and
ideally to the campaign message and flow message objects that reference a template.
The Universal Content API already returns screenshot_status and screenshot_url on each
object. The Templates API has no equivalent, it returns only name, editor_type, html,
text, created, updated and definition.
This matters to us because as third-party app that lists or references templates, campaign messages or flow messages currently has no way to show a visual preview. The workarounds (
rendering the returned HTML in a sandboxed iframe, or running our own screenshot
pipeline) are slow, expensive, and produce previews that don't match what the user
already sees in Klaviyo. Also, without webhooks for change events it would be hard to keep these up to date.
This data already exists and is already served to the browser. Two places in the Klaviyo
UI where it is exposed today:
- Templates list (www.klaviyo.com/templates/list) renders a thumbnail on every template card.
- Campaigns list (www.klaviyo.com/omnicampaigns) renders the same thumbnail in the
campaign hover preview.
Both load the image from a presigned S3 URL of the form:
https://klaviyo-template-thumbnails.s3.amazonaws.com/<id>?AWSAccessKeyId=...&Signature=...&Expires=...
A short-lived presigned URL exactly like that one would be perfect. It doesn't need to be
a permanent public asset, returning the same expiring URL the UI already uses is entirely
sufficient for rendering a preview at request time.
