Why Use Templates?
- Consistency - Maintain brand consistency across all emails
- Efficiency - Write once, use many times
- Personalization - Dynamic variables for each recipient
- Easy Updates - Change template once, affects all future emails
Creating a Template
Create a template with dynamic variables using double curly braces:cURL
Response
response.json
Variable Syntax
Templates support various variable features:Basic Variables
basic-variables.html
Default Values
default-values.html
Conditional Content
conditionals.html
Loops
loops.html
Sending Emails with Templates
Usetemplate_id instead of html when sending:
cURL
Batch Sending with Templates
Send personalized emails to multiple recipients efficiently using the batch endpoint:cURL
Common Template Examples
Order Confirmation
order-confirmation.html
Password Reset
password-reset.html
Managing Templates
Update a Template
cURL
List Templates
cURL
Get a Template
cURL
Delete a Template
cURL