Templated

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}/templates

Returns 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

FieldTypeDescription
namestringTemplate name

Optional fields

FieldTypeDescription
htmlstringRaw HTML content
designobjectBlock-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}/duplicate

Returns 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

On this page