Skip to content

Create Email Template Draft

POST /public-api/publicapi.v1.ContentTemplate/CreateEmailTemplate

Requires settings write access and email_template:create. This creates a reusable draft, not a sent email or a published template.

{
"name": "Inspection follow-up",
"description": "Plain-text follow-up draft",
"subject": "Your inspection",
"content": "Thank you for arranging the inspection.\nOur team will contact you with the next steps."
}

Name is nonblank, maximum 200 characters; optional description maximum 2,000. Subject must be nonblank single-line plain text, maximum 300 bytes. Content must be nonblank plain text, maximum 32,768 bytes. NUL characters are rejected; subject also rejects carriage returns/newlines. HTML and template expressions remain literal text, not markup or executable substitutions. Subject/content are stored as reusable slot defaults.

Returns template metadata with draft/unpublished flags, not its source. No recipient, attachment, arbitrary source JSON, remote rendering, sending, flow assignment, draft editing, or publishing operation is exposed here. Continue editing/publishing in email template settings. Creation is not idempotent; duplicate names can conflict. Inspect the catalog before retrying a timeout.

Generated Reference
POST /public-api/publicapi.v1.ContentTemplate/CreateEmailTemplate

Creates an operational email draft with literal subject/content defaults. Never publishes, assigns to a flow, renders remotely, or sends email. Not idempotent: retrying may conflict with an existing name.

Request CreateEmailTemplateRequest
Response ContentTemplateGetResponse

CreateEmailTemplateRequest

Field Type Description
name string
description string
subject string Required, nonblank, single-line literal subject, not a template expression.
content string Required, nonblank plain text (at most 32 KiB). HTML and {{expressions}} remain literal text. Saved as the default of a reusable multiline content slot. Source JSON, attachments, recipient addresses and sending are not supported.

ContentTemplateGetResponse

Field Type
template ContentTemplate