Templates
Create Template
Create a new email template with HTML or Topol editor JSON content. Automatically creates and publishes a template version with extracted merge tags.
post/templates
Request
- Base URL: https://app.lettr.com/api
- URL: https://app.lettr.com/api/templates
- Auth: HTTP bearer
Request body
Example request
{
"name": "Welcome Email",
"project_id": 5,
"folder_id": 10,
"html": "<html><body><p>Hello {{NAME}}!</p></body></html>",
"json": "{\"tagName\":\"mj-container\",\"children\":[{\"tagName\":\"mj-text\",\"content\":\"Hello {{FIRST_NAME}}!\"}]}",
"purpose": "campaign"
}Response
Template created successfully
Example response
{
"message": "Template created successfully.",
"data": {
"id": 123,
"name": "Welcome Email",
"slug": "welcome-email",
"project_id": 5,
"folder_id": 10,
"purpose": "campaign",
"preparation_status": "ready",
"active_version": 1,
"merge_tags": [
{
"key": "first_name",
"required": true,
"type": "text",
"children": [
{
"key": "item_name",
"type": "text"
}
]
}
],
"created_at": "2026-01-28T12:00:00+00:00"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.