curl --request PUT \
--url https://app.lettr.com/api/templates/{slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Updated Welcome Email"
}
'{
"message": "Template updated successfully.",
"data": {
"id": 123,
"name": "Updated Welcome Email",
"slug": "welcome-email",
"project_id": 5,
"folder_id": 10,
"purpose": "transactional",
"preparation_status": "pending",
"active_version": 2,
"merge_tags": [
{
"key": "NAME",
"required": true
}
],
"created_at": "2026-01-15T10:00:00+00:00",
"updated_at": "2026-01-28T14:30:00+00:00"
}
}Update Template
Update an existing email template’s name and/or content. If content (html or json) is provided, a new active version will be created with extracted merge tags. If project_id is not provided, the template will be looked up in the team’s default project.
curl --request PUT \
--url https://app.lettr.com/api/templates/{slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Updated Welcome Email"
}
'{
"message": "Template updated successfully.",
"data": {
"id": 123,
"name": "Updated Welcome Email",
"slug": "welcome-email",
"project_id": 5,
"folder_id": 10,
"purpose": "transactional",
"preparation_status": "pending",
"active_version": 2,
"merge_tags": [
{
"key": "NAME",
"required": true
}
],
"created_at": "2026-01-15T10:00:00+00:00",
"updated_at": "2026-01-28T14:30:00+00:00"
}
}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 newjson 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
API key for authentication
Path Parameters
The template slug (URL-friendly identifier)
"welcome-email"
Body
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 to find the template in. If not provided, uses the team's default project.
x >= 15
New name for the template
255"Updated Welcome Email"
New HTML content for the template. Creates a new active version. Mutually exclusive with json.
"<html><body><p>Hello {{NAME}}!</p></body></html>"
New JSON content for Topol visual editor templates. Creates a new active version. Mutually exclusive with html.
"{\"tagName\":\"mj-container\",\"children\":[{\"tagName\":\"mj-text\",\"content\":\"Hello {{FIRST_NAME}}!\"}]}"
Was this page helpful?