Skip to main content
PUT
Updates an existing template by its slug. You can update the template name, project assignment, or content. Providing new html or json content creates a new version of the template automatically. The html and json fields are mutually exclusive. If neither is provided, only metadata (name, project) is updated without creating a new version.

Authorizations

Authorization
string
header
required

API key for authentication

Path Parameters

slug
string
required

The template slug (URL-friendly identifier)

Example:

"welcome-email"

Body

application/json

Request to update an existing email template. All fields are optional - provide only what you want to change. If html or json is provided, a new active version will be created.

project_id
integer

Project ID to find the template in. If not provided, uses the team's default project.

Required range: x >= 1
Example:

5

name
string

New name for the template

Maximum string length: 255
Example:

"Updated Welcome Email"

html
string

New HTML content for the template. Creates a new active version. Mutually exclusive with json.

Example:

"<html><body><p>Hello {{NAME}}!</p></body></html>"

json
string

New JSON content for Topol visual editor templates. Creates a new active version. Mutually exclusive with html.

Example:

"{\"tagName\":\"mj-container\",\"children\":[{\"tagName\":\"mj-text\",\"content\":\"Hello {{FIRST_NAME}}!\"}]}"

Response

Template updated successfully

Response after successfully updating a template

message
string
required

Human-readable response message

Example:

"Template updated successfully."

data
object
required

View of an updated template