Skip to content

Create/overwrite a human-authored language variant

Requires EDITOR. Always stored as status=published, origin=manual. locale must be supported.

projectId
required
string

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

templateId
required
string

Email template id.

locale
required
string

Language variant locale (normalized against the supported locale set).

Media typeapplication/json
object
subject
required
string
>= 1 characters <= 200 characters
htmlBody
required
string
>= 1 characters <= 200000 characters
textBody
string | null
<= 200000 characters
Examplegenerated
json
{
"subject": "example",
"htmlBody": "example",
"textBody": "example"
}

Upserted variant.

Media typeapplication/json
object
locale
object
id
string
projectId
string
templateId
string
locale
string
subject
string
htmlBody
string
textBody
string | null
status
string
Allowed values: draft published
origin
string
Allowed values: manual ai
createdBy
string | null
createdAt
string | null format: date-time
updatedAt
string | null format: date-time

Unsupported locale or validation error.

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"
}