Skip to main content
GET
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Template ID (nt_ prefix).

previewRunId
string
required

The preview run to retrieve, identified by the id returned when it was created.

Response

A preview run together with its per-device results.

id
string
required

Unique identifier for the preview run.

template_id
string
required

The template that was rendered.

status
enum<string>
required

Where the run itself has got to. PENDING and RENDERED mean Courier is still preparing the email, SUBMITTED means it is with the rendering service, and COMPLETED means every device has reported. FAILED is the run as a whole failing — an individual device failing never fails the run.

Available options:
PENDING,
RENDERED,
SUBMITTED,
COMPLETED,
FAILED
device_ids
string[]
required

The devices this run was submitted for, snapshotted when the run was created.

created_at
string
required

ISO-8601 timestamp of when the run was created.

results
PreviewResult · object[]
required

One entry per device in device_ids.

template_version
string

The version of the template that was rendered — draft, or a zero-padded published version such as v002. Absent until the render settles.

failure_reason
enum<string>

Why the run failed, when status is FAILED. NO_EMAIL_CHANNEL and TEMPLATE_NOT_SUPPORTED mean there was nothing to render; ALL_DEVICES_UNSUPPORTED means every requested device has been retired and the request can be fixed by choosing others.

Available options:
TEMPLATE_NOT_SUPPORTED,
NO_EMAIL_CHANNEL,
RENDER_FAILED,
ALL_DEVICES_UNSUPPORTED,
VENDOR_ERROR