v1.0.0
OpenAPI 3.1.0

Send for inbox previews

US region

Client Libraries

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.

Path Parameters
  • id
    Type: string Format: uuid
    required

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

Body
required
application/json
  • client_ids
    Type: array string[] 1…150
    required

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

  • lax_mode
    Type: boolean

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

  • name
    Type: string
    max length:  
    191

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

  • sample_data
    Type: object

    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.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/design_studio/emails/{id}/inbox_previews
{
  "client_ids": [
    "android12_gmailapp_pixel6_dm",
    "android12_gmailapp_pixel6_dm_dark"
  ],
  "name": "Welcome email previews",
  "sample_data": {
    "customer": {
      "first_name": "Janine"
    }
  }
}
{
  "replayed": false,
  "run_id": 10
}