marketing_templates_read
Arguments
ID!
required
The template’s
id, or its legacyId from an earlier version of the Redo API.Returns
The content of an email, as the merchant authored it.
Show fields
Show fields
String!
required
The content canvas background, as set under Email styles in the email builder.
String!
required
The email background, as set under Email styles in the email builder.
ID!
required
The id of this template.
String!
required
The template’s legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
String
The default link color, as set under Email styles in the email builder. Null when the merchant left it unset.
String!
required
The merchant-facing name of the template.
Render this template, to see what recipients get. Use a width of about 375 for a phone.Requires:
marketing_templates_readShow fields
Show fields
ArgumentsFields
ID
Render with this recent event’s data instead of sample data: a 24-character hex event id. A well-formed id that can’t be found falls back to sample data.
Int
Viewport width of the screenshot, 320-1200 pixels.
Int
The screenshot’s full height in pixels.
String!
required
The rendered email HTML, as a recipient’s client would receive it.
String
A link to a full-length PNG screenshot at the requested width. It expires after an hour.
Int
The screenshot’s width in pixels.
String
The preview text shown after the subject in an inbox. Null when the merchant left it unset.
required
The blocks that make up the email body, in order. Nested column children keep their own ids. A type this API version does not model field-by-field is returned as EmailTemplateUnknownSection.
sections with every field selected, as JSON: one element per root block, in order, with __typename and nested column children. Empty or unreadable stored sections are []. Edits go through operations.String!
required
The subject line as authored, before per-recipient substitution. A subject containing
{{ }} placeholders is filled in per customer at send time, and some sends prepend a prefix, so this is not necessarily the subject any one customer saw. Empty when the template has no subject of its own.required
The trigger context this template is valid for. Immutable after create. UNKNOWN when the stored trigger is not modeled in this API version.
Example
query {
emailTemplate(id: "...") {
contentBackgroundColor
createdAt
emailBackgroundColor
id
legacyId
linkColor
name
previewText
# ...
}
}