Skip to content

Partially update a template

Requires EDITOR. status accepts only draft/active. An already-archived template cannot be edited (400).

projectId
required
string

Tenant project id (row-level isolation on every query).

templateId
required
string

Email template id.

Media typeapplication/json

Partial update; status limited to draft/active.

object
name
string
>= 1 characters <= 120 characters
category
string
Allowed values: transactional marketing
subject
string
>= 1 characters <= 200 characters
previewText
string | null
<= 200 characters
editorDoc
string | null
<= 400000 characters
htmlBody
string
>= 1 characters <= 200000 characters
textBody
string | null
<= 200000 characters
variables
Array<string>
<= 100 items
status
string
Allowed values: draft active
attachments
Array<string>
<= 3 items

Acknowledged.

Media typeapplication/json
object
ok
boolean

Validation error, archived template, or invalid attachments.

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Not authenticated (no valid session/principal).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"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
json
{
"error": "example",
"message": "example"
}

Resource not found (or belongs to another project — indistinguishable).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}