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.
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.
RequestCreateEmailTemplateRequest
ResponseContentTemplateGetResponse
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
Related Types
ContentTemplate
Field
Type
Description
id
string
kind
ContentTemplateKind
name
string
Name is bounded to 200 characters; description to 200 in lists, 2000 in detail.
description
string
metadata_truncated
bool
created_at
int64
updated_at
int64
versioned
bool
Email/document templates have editable drafts and optional publication. Advanced-task definitions are live, unversioned settings, not draft templates.
has_draft
bool
has_unpublished_changes
bool
Draft source/config differs from current publication, or nothing is published. Does not compare names/descriptions. Always false for unversioned definitions.
current_publication
ContentTemplatePublication
current_draft_revision_id
optional string
Only document templates have numbered draft revisions.
current_draft_revision_number
optional int32
task_type
string
Only advanced-task definitions: checklist, flow_event, workflow, external, permission, or customer_filter. No filters, selectors or execution config.