EmailTemplateVariant type
The subject and bodies of a template for one language, or for every language without its own.
Fields
language
String
A language code from the locales catalogue. Null for the all-languages variant, used for every language without a variant of its own.
subject
String
The subject in Liquid, one line. Null only on a built-in template.
htmlBody
String!
The HTML body in Liquid, exactly as written, at most 256 KiB.
Costs 50 points.
textBody
String
The plain-text body in Liquid, exactly as written. Null when it is derived from the HTML at render.
Costs 50 points.
design
A JSON template's block design. Null on an HTML template. At most 256 KiB, 500 blocks and 4
levels.
The shape, version 1, is a contract: it only grows (new optional keys, new block types). A
version, block type or key the API does not know is refused with VALIDATION and reason
DESIGN_INVALID. The shape is {"version": 1, "layout": {...}, "blocks": [Block]}.
layout (every key optional):
width480-680.backdrop,canvas,textColor,linkColor(#rrggbb).font:ARIAL,HELVETICA,VERDANA,TAHOMA,TREBUCHET,GEORGIA,TIMESorCOURIER.padding0-64.preheader(Liquid outputs).
A Block has:
id([A-Za-z0-9_-]{1,32}, unique) andtype.- An optional
show:{on: all|desktop|mobile, if: {all|any: [{var, op, value}]}}.varis a field of the template's resource kind,vars.<key>or a repeat's item.opiseq,ne,gt,gte,lt,lte,presentorblank. - An optional
repeat:{list, as}, wherelistis aLISTfield, at most 2 deep. - An optional
style. - The keys of its type.
The block types and their keys:
section:align,children; stylebackground,padding,border.columns:columns(2-4 of{width 10-90, children}, summing to 100),stack,valign; stylebackground,padding,gap.heading:level1-3,text,align; stylecolor,size,padding.text:html(a few inline tags with Liquid outputs),align; stylecolor,size,lineHeight,padding.button:text,href,width(auto|full|px),align; stylebackground,color,size,radius,padding.image:src(an http(s) URL, a Liquid output orasset:<uuid>of a public asset),alt,width,href,align; stylepadding.divider: stylecolor,thickness,padding.spacer: styleheight.footer:align; stylecolor,size,padding.html:html(raw Liquid HTML, rendered unchecked).
Colours are #rrggbb, and padding is [top, right, bottom, left], 0-80. text, html,
href, alt, src and preheader may hold Liquid output tags (double curly braces). Only
html blocks may hold Liquid {% %} tags.
Costs 50 points.