Overview
The template hierarchy in Lettr works as follows:Transactional vs. Marketing Templates
Every template belongs to one of Lettr’s two modes: Transactional (sent via the API or SMTP) or Marketing (used by campaigns). Folders are mode-scoped too — a folder holds templates of one mode, and the folder pickers in the move and duplicate dialogs only show folders of the mode you’re browsing, so you can’t accidentally move a marketing email into a transactional folder.Choosing the mode over the API
The API can create a template in either mode. Passpurpose when you create one:
"transactional"— the default, used when you omit the field"campaign"— a marketing template, the only kind a campaign can pick
GET /folders is the only call that returns a folder ID, and it reports each folder’s mode:
purpose and folder_id must agree. If you omit folder_id, the template goes to the main folder of its mode in the project. If folder_id names a folder of the other mode, the request is rejected with 422 rather than filing the template somewhere campaigns can’t see it.
In the app, the folder wins: moving a template into a folder of the other mode switches the template to that folder’s mode, the same way duplicating into a folder does. A transactional email moved into a marketing folder becomes a marketing email and shows up in the marketing grid and the campaign picker.
Other behaviors
A few more things that follow from mode-scoping:- Copying to the other mode — Use the Copy to Transactional / Copy to Marketing action on a template to create a copy in the other mode. The copy is named “name (Copy)”, gets a new unique slug, and carries over all versions and merge tags. It lands in your current folder if that folder already belongs to the target mode, otherwise in the project’s default folder for that mode.
- Moving or duplicating into a folder — A moved or duplicated template takes on the mode of the folder it lands in, not the mode of the original.
- Returning to the list — The ← Emails link on an email’s detail page takes you back to the list with your folder and search still applied. Deleting an email from the list keeps you in the same folder, with the same view, search and sort.
- Deleting a folder keeps its templates — Templates in a deleted folder are not deleted with it. Each one is moved to the project’s default folder for its mode.
If you don’t specify a
project_id, Lettr uses the default project for your team.Listing Templates by Project
When retrieving templates via API, templates are returned with their project context:?project_id=123. If omitted, your team’s default project is used.
Default Project
Every team has a default project. This project:- Cannot be deleted
- Receives templates when no project is specified
- Is used when API calls don’t include a
project_id
Best Practices
Project Organization
- By Brand: Create separate projects for each brand if you send emails from multiple brands
- By Product: Separate projects for different products or services
- By Environment: Consider separate projects for production vs. staging if testing extensively
Folder Organization
- By Email Type: Group transactional, marketing, and notification emails
- By Customer Journey: Organize by lifecycle stage (onboarding, engagement, retention)
- By Frequency: Separate one-time emails from recurring ones
Naming Conventions
Use consistent naming patterns:Related Topics
Template Editor
Create templates with the visual editor
Templates Introduction
Get started with email templates
Template Versions
Manage multiple versions of templates
Storage Domains
Configure custom domains for template assets