v101

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-08235133843.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 a successful write. Present when an input was discarded or did not take effect as requested. This includes block fields that do not render as their names suggest, sequence email-step formatting restored on top of submitted blocks, and sender-identity conflicts such as a replyToName that differs from the saved profile. Each message identifies the affected input and gives recovery guidance. 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."
  ]
}