Skip to main content
POST
/
api
/
v1
/
templates
Create Template
curl --request POST \
  --url https://api.sequenzy.com/api/v1/templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "subject": "<string>",
  "html": "<string>",
  "blocks": [
    {}
  ],
  "labels": [
    {}
  ]
}
'
{
  "success": true,
  "template": {
    "id": "email_abc123",
    "name": "[Template] Welcome",
    "subject": "Welcome!",
    "labels": ["edm"]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt

Use this file to discover all available pages before exploring further.

Create a reusable email template. You provide either raw html or Sequenzy blocks.

Request

name
string
required
Template name. Sequenzy stores API-created templates with a [Template] prefix.
subject
string
required
Email subject line.
html
string
Raw HTML body. Use this or blocks, not both.
blocks
array
Sequenzy email blocks. Use this or html, not both.
labels
array
Label names to assign to the template. Missing labels are created automatically. The API also accepts label as a compatibility alias.
curl -X POST "https://api.sequenzy.com/api/v1/templates" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Welcome",
    "subject": "Welcome!",
    "labels": ["edm"],
    "html": "<p>Thanks for joining.</p>"
  }'

Responses

{
  "success": true,
  "template": {
    "id": "email_abc123",
    "name": "[Template] Welcome",
    "subject": "Welcome!",
    "labels": ["edm"]
  }
}