Create an email template
Requires EDITOR. variables are {{var}} placeholder names. attachments are email_assets ids (≤3, combined ≤7MB). Response may include aliyunDegradeNotice.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”projectId
required
string
Tenant project id (row-level isolation on every query).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
category
string
subject
required
string
previewText
string | null
editorDoc
string | null
htmlBody
required
string
textBody
string | null
variables
Array<string>
status
string
attachments
Array<string>
Responses
Section titled “Responses”Created template.
Media typeapplication/json
object
template
object
id
string
projectId
string
name
string
category
string
subject
string
previewText
string | null
editorDoc
TipTap canvas JSON (stored verbatim).
string | null
htmlBody
string
textBody
string | null
variables
Array<string>
status
string
attachments
Email_assets ids.
Array<string>
sourceLocale
string
createdAt
string format: date-time
updatedAt
string format: date-time
aliyunDegradeNotice
string
Validation error, or invalid/oversized attachment references.
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Not authenticated (no valid session/principal).
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Authenticated but lacks the required project role.
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}