API reference
Templates
Create, retrieve, list, update and delete stored email templates.
Templates hold a subject, HTML and text body using the template syntax. Send one with template_id on POST /emails.
The template object
{
"id": "tpl_01JD3R2K6Q8W4M1T7Z9X5B3N0C",
"name": "Order confirmation",
"subject": "Your order {{order.number}} is confirmed",
"html": "<h1>Thanks, {{first_name}}!</h1>…",
"text": "Thanks, {{first_name}}! …",
"created_at": "2026-11-10T12:00:00Z",
"updated_at": "2026-11-14T08:12:44Z"
}Create a template
POST
/api/v1/templatesscope: templates:writenamestringrequired- Internal name, unique in the workspace.
subjectstring- Subject line; may contain variables.
htmlstring- HTML body.
textstring- Plain-text body. Generated from the HTML when omitted.
curl https://hulakimail.com/api/v1/templates \
-H "Authorization: Bearer $HULAKIMAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Order confirmation", "subject": "Order {{order.number}} confirmed", "html": "<h1>Thanks, {{first_name}}!</h1>" }'Returns 201 Created with the template in data.
Retrieve a template
GET
/api/v1/templates/{id}scope: templates:readList templates
GET
/api/v1/templatesscope: templates:readPaginated with page and per_page — see Pagination.
Update a template
PATCH
/api/v1/templates/{id}scope: templates:writeSend only the fields you want to change. Emails already queued keep the version they were rendered with.
Delete a template
DELETE
/api/v1/templates/{id}scope: templates:writeReturns 204 No Content. Sending with a deleted template_id returns 404 template_not_found.
Something unclear or missing? Tell us.