Design Studio emails

Send for inbox previews

Initiate one or more inbox previews for an email. This uses inbox preview credits; check your balance with Get preview credit balance. Learn how billing for inbox previews work before you call this endpoint.

Use List emails to get your email's ID. If the email has translations, call List email translations to get the ID of the language variant you want a preview of.

You can retrieve client IDs from List inbox preview options.

This call does not return the preview file. It returns a run_id; poll Get an inbox preview job with it, then fetch each tile's capture URL from that response.

Submitting the same email, content, and devices again on the same UTC day returns the existing run instead of starting a new one, with replayed set to true and no second charge. The same happens the next day if that run is still processing, or if a concurrent identical request gets there first. Resubmitting a stuck run is safe and free—it hands you the same run back rather than starting a second one.

post/v1/design_studio/emails/{id}/inbox_previews

Path parameters

idstring uuid required

The UUID of the email. If your email has translations, this is the ID of a specific language variant.

Request body

client_idsstring[] required

The identifiers of the preview options you want. You can retrieve client IDs from List inbox preview options.

sample_dataobject

Liquid variables to render with, as a JSON object—any shape is accepted, from flat variables like {"first_name": "Janine"} to nested ones like {"customer": {"first_name": "Janine"}}. Defaults to none, which fails the render on any variable the content needs beyond the ones a preview already sets for you. Set lax_mode to render missing variables as blank instead. Limited to 128 KB.

namestring

A label for the batch of previews, shown in preview history.

lax_modeboolean

Set to true to render liquid variables missing from sample_data as blank instead of failing the job.

Example request

{
  "client_ids": [
    "android12_gmailapp_pixel6_dm",
    "android12_gmailapp_pixel6_dm_dark"
  ],
  "sample_data": {
    "customer": {
      "first_name": "Janine"
    }
  },
  "name": "Welcome email previews"
}

Response

Preview job submitted

run_idinteger

ID of the preview job. Check when it's complete with Get an inbox preview job.

replayedboolean

true when this call returned an existing run instead of starting a new one, and you weren't charged a second time for it. This happens for an identical request (same email, content, and devices) submitted again on the same UTC day, an identical request from the day before that's still processing, or a concurrent identical request that got there first. The run may belong to another client in your workspace, including the Journeys UI—created_at is that run's, and a name you send is applied to it.

Changes

Changed in 1 of the 13 revisions of this API.1