Why Use Templates?
Quick Start
1
Create a Template
Go to Emails in your dashboard and click New Email.
2
Design Your Email
Use the visual editor to design your email, or paste custom HTML.
3
Add Variables
Insert dynamic content using
{{variable_name}} syntax.4
Save and Send
Save your template and send emails using its slug.
Try it in the app
Follow an interactive walkthrough of this guide inside Lettr.
Sending with Templates
Reference templates by their slug when sending:Specifying a Template Version
By default, Lettr uses the active version of the template. To use a specific version:Project-Scoped Templates
If your template is in a specific project, include theproject_id:
If no
project_id is specified, Lettr uses your team’s default project. Make sure a default project is configured in your team settings, or the API will return a 404 error.Template vs Inline Content
Choose the approach that fits your use case:Content Priority
When both a template and inline content are provided in the same request:- Template content takes precedence—the template version’s HTML replaces any
htmlparameter - The
subjectin your request is always used—templates do not provide a fallback subject - Inline
htmlortextis only used when notemplate_slugis provided
Template Organization
Lettr provides a hierarchical system to organize templates:- Projects: Separate templates by brand, product, or team
- Folders: Group related templates within projects
- Versions: Track changes and control which version is active
Key Features
Visual Editor
Design emails with Topol’s drag-and-drop editor
Projects & Folders
Organize templates with projects and folders
Template Versions
Manage versions and schedule publishing
Saved Blocks
Create reusable sections and synced content
Loop Blocks
Display repeating content like product lists and order items
Template Language
Personalize emails with merge tags and dynamic content
Template Slugs
Each template has a unique slug used to reference it in API calls:
Slugs are auto-generated from template names but can be customized. They must be unique within a project.
Visual vs Code Editing
Lettr supports two editing modes:Visual Editor (Topol)
- Drag-and-drop interface
- Pre-built content blocks
- Responsive design tools
- No HTML knowledge required
Custom HTML
- Full control over markup
- Import existing templates
- Advanced customization
- Direct code editing
editor_type field (topol or custom_html) that reflects which editing mode is active. You can switch between modes or use both—design visually and fine-tune with code.
Template Parameters Reference
When sending with templates, these parameters control template behavior:
*Required if not providing
html or text content directly.
substitution_data is used to populate merge tags in your template (like {{name}}). metadata is passed through to webhooks for tracking but is not rendered in the email content.Template API
List and retrieve templates programmatically. The list endpoint supports pagination withper_page (default 25, max 100) and page query parameters:
Best Practices
- Use meaningful slugs:
order-confirmationis better thantemplate-1 - Organize early: Set up projects and folders before creating many templates
- Version before changes: Create a version before major redesigns
- Use synced blocks: Share headers and footers across templates
- Test thoroughly: Send test emails before activating new versions
Related Topics
Template Language
Merge tags, conditionals, and loops
Storage Domains
Host template images on your domain
Integrations
Use templates with Stripe, Supabase, WordPress