marketing_templates_write
Arguments
ID!
required
The template’s
id, or its legacyId from an earlier version of the Redo API.Metadata fields to change.
Surgical section edits, applied in order.
Show fields
Show fields
Insert a new section.
Show fields
Show fields
ID
Insert immediately after this section id. Column children are not valid anchors. Omit after, before, and parent to insert last but above the footer.
ID
Insert immediately before this section id. Column children are not valid anchors.
Insert a button section.
Insert a Chrome dinosaur section.
Insert a column layout. Pass
columns for the complete child list, or omit it for empty slots (columnCount, default 2).Insert a discount section.
Insert a footer section.
Insert a header section.
Insert an HTML section.
Insert an image section.
Int
Deprecated. Do not send. Column children are a complete
columns list; parent without this field still appends to an interactive-review success section.Insert a line section.
Insert a menu section.
ID
An interactive-review id. Appends the inserted block to that review’s success section. Cannot combine with after or before. Column children are not filled this way; pass
columns on the column payload.Insert a products section. The trigger must provide Cart Context. Not a column child. recommendedProductFilterId is a product filter id, or 00000000feedb10cfeedb10c when this trigger already carries products.
Insert a QR code section.
Insert a scratch-to-reveal section.
Insert a shoppable products section. The trigger must provide Cart Context. Not a column child. productFilterId is a product filter id.
Insert a socials section.
Insert a spacer section.
Insert a subscription add-to-order section.
Insert a skip-or-delay section.
Insert a subscription swap-product section.
Insert a table section.
Insert a text section.
Insert an order-summary section. The trigger must provide a Trackable Summary. Not a column child.
Insert a tracking-info section. The trigger must provide a Tracker. Not a column child.
Remove a section.
Show fields
Show fields
ID!
required
The section’s id (
blockId).Patch an existing section.
Show fields
Show fields
Patch a button section.
Patch a Chrome dinosaur section.
Patch column layout, or replace children with a complete
columns list. Decreasing columnCount without columns is rejected if trailing slots still have sections.Patch a discount section.
Patch a footer section.
Patch a header section.
Patch an HTML section.
ID!
required
The section’s id (
blockId).Patch an image section.
Patch a line section.
Patch a menu section.
Patch a products section.
Patch a QR code section.
Patch a scratch-to-reveal section.
Patch a shoppable products section.
Patch a socials section.
Patch a spacer section.
Patch a subscription add-to-order section.
Patch a skip-or-delay section.
Patch a subscription swap-product section.
Patch a table section.
Patch a text section.
Patch an order-summary section.
Patch a tracking-info section.
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
mutation {
updateEmailTemplate(id: "...", input: { ... }, operations: { ... }) {
contentBackgroundColor
createdAt
emailBackgroundColor
id
legacyId
linkColor
name
previewText
# ...
}
}