Create and Manage Templates
Create, update, duplicate, and delete email templates via the API.
Create and Manage Templates
Templates are the core resource in Templated. This guide walks through the full CRUD lifecycle for templates.
List all templates
Fetch all templates for an account:
curl -b cookies.txt \
https://app.templated.email/api/accounts/{slug}/templatesReturns an array of template summaries.
Create a template
curl -b cookies.txt -X POST \
https://app.templated.email/api/accounts/{slug}/templates \
-H "Content-Type: application/json" \
-d '{
"name": "Product Launch Email",
"html": "<html><body><h1>Launching Soon</h1><p>Get ready.</p></body></html>"
}'Required fields
| Field | Type | Description |
|---|---|---|
name | string | Template name |
Optional fields
| Field | Type | Description |
|---|---|---|
html | string | Raw HTML content |
design | object | Block-based design JSON |
Get a single template
curl -b cookies.txt \
https://app.templated.email/api/accounts/{slug}/templates/{id}Returns the full template including HTML content and design JSON.
Update a template
curl -b cookies.txt -X PUT \
https://app.templated.email/api/accounts/{slug}/templates/{id} \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Template Name",
"html": "<html><body><h1>Updated</h1></body></html>"
}'Duplicate a template
Create a copy of an existing template:
curl -b cookies.txt -X POST \
https://app.templated.email/api/accounts/{slug}/templates/{id}/duplicateReturns the newly created template with a name like "Copy of [Original Name]".
Delete a template
curl -b cookies.txt -X DELETE \
https://app.templated.email/api/accounts/{slug}/templates/{id}Returns 200 on success. This action is irreversible.
Import from HTML
You can create a template by providing raw HTML in the html field of the create endpoint. The platform parses the HTML and generates the block-based design structure automatically.
Next steps
- Generate templates with AI instead of writing HTML manually
- Manage your brand kit to ensure templates match your brand
- Test endpoints interactively in the API Reference