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.

What you cannot change

purpose is not updatable. It is set when the template is created and fixed from then on.Sending purpose here is silently ignored — the request returns 200 with Template updated successfully. and the template keeps the mode it already had. Read purpose back from the response if you need to be sure.To move a design into the other mode, use the Copy to Transactional / Copy to Marketing action in the app. It creates a new template carrying the versions and merge tags across; see Transactional vs. Marketing Templates.

Preparation after an update

An update that supplies new json is rendered by a background job, so the response comes back preparation_status: "pending". The previous render stays in place while that runs. The template is still sendable during the window — but it is serving the old content until preparation_status reads ready. A send in between succeeds and quietly delivers the previous version, so poll Get Template before sending if the new content matters.

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.

purpose is not updatable and is not listed below. Sending it here is silently ignored: the request returns 200 with Template updated successfully. and the template keeps the purpose it was created with. To move a template to the other module, copy it — a transactional template cannot become a campaign one in place.

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