v93

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01218121759.7 KB
Templates

Create template

Creates a reusable email template from exactly one of prompt, HTML, or Sequenzy blocks.

post/templates

Request body

namestring required
subjectstring

Required with HTML or blocks; optional with prompt, where it overrides the generated subject.

previewTextstring nullable
htmlstring

Raw HTML body. Mutually exclusive with blocks.

blocksobject[]

Sequenzy email blocks. Mutually exclusive with html. Put visual styling under styles; top-level style keys such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.

promptstring

Natural-language request for branded native template blocks.

stylestring

Generation style; valid only with prompt.

tonestring

Generation tone; valid only with prompt.

labelsstring[]

Label names to assign. Missing labels are created automatically.

labelstring[]

Compatibility alias for labels.

Response

Template created

successboolean
warningsstring[]

Non-blocking advisories about the blocks that were written. The write succeeded. Present when a field was not part of the block schema and was discarded, or when a supported field does not control what its name suggests for that block type - for example styles.backgroundColor on a button colors the band behind the button while the fill comes from buttonColor. Each message names the offending path and the fields that block does accept. A sequence email step update also reports the blocks the step's existing Style > Format added back on top of the submitted blocks, because the response echoes node config rather than the stored blocks. Absent when there is nothing to report.

Example response

{
  "success": true,
  "template": {
    "labels": [
      "edm",
      "template"
    ]
  },
  "warnings": [
    "blocks[0].styles.color is not a supported field and was ignored. Button label color comes from the block-level `buttonTextColor` field. Supported styles fields: backgroundColor, backgroundOpacity, bleed, borderColor, borderRadius, borderWidth, paddingBottom, paddingLeft, paddingRight, paddingTop, textAlign, textColor."
  ]
}