Templates API
Read email templates from your workspace. Access template HTML content, subject lines, and categories for use in external tooling or to reference template IDs when building integrations.
The Template Object
Templates are saved email designs that can be used when creating campaigns. Each template stores the HTML content, default subject, and organizational metadata.
{
"id": "clx_tpl_welcome_id",
"name": "Welcome Email",
"subject": "Welcome to {{workspace_name}}!",
"category": "onboarding",
"isSystem": false,
"workspaceId": "ws_acme_corp_id",
"htmlContent": "<html><body><h1>Welcome, {{first_name}}!</h1>...</body></html>",
"createdAt": "2026-01-05T09:00:00Z"
}| Field | Type | Description |
|---|---|---|
| id | string | Unique template identifier |
| name | string | Template name for internal identification |
| subject | string | Default subject line — may contain merge tags like {{first_name}} |
| category | string | Template category (e.g. onboarding, newsletter, promotional, transactional) |
| isSystem | boolean | true for built-in EmailSendX system templates, false for workspace templates |
| workspaceId | string | The workspace this template belongs to |
| htmlContent | string | Full HTML content of the template — included when retrieving by ID |
| createdAt | string | ISO 8601 creation timestamp |
Merge tags in templates
{{first_name}}, {{workspace_name}}, and {{unsubscribe_link}}. These are resolved at send time using the recipient's contact data.Endpoints
Template endpoints require the templates:read scope.
List Templates
Retrieve templates from the workspace. Use the id parameter to retrieve a single template with its full HTML content. The htmlContent field is omitted from list responses to keep response sizes manageable.
/api/v1/templatesscope: templates:readReturns a paginated list of templates. Pass id to retrieve a single template with full HTML content. Use include_system=true to include built-in EmailSendX templates.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| page | integer | query | optional | Page number (default: 1) |
| limit | integer | query | optional | Results per page, max 100 (default: 50) |
| id | string | query | optional | Retrieve a single template by ID — includes htmlContent field |
| category | string | query | optional | Filter templates by category (e.g. onboarding, newsletter, promotional) |
| include_system | boolean | query | optional | Set to true to include EmailSendX built-in system templates (default: false) |
Response
{
"data": [
{
"id": "clx_tpl_welcome_id",
"name": "Welcome Email",
"subject": "Welcome to {{workspace_name}}!",
"category": "onboarding",
"isSystem": false,
"workspaceId": "ws_acme_corp_id",
"createdAt": "2026-01-05T09:00:00Z"
},
{
"id": "clx_tpl_weekly_digest_id",
"name": "Weekly Digest",
"subject": "Your weekly update from {{workspace_name}}",
"category": "newsletter",
"isSystem": false,
"workspaceId": "ws_acme_corp_id",
"createdAt": "2026-01-12T11:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 7,
"totalPages": 1
}
}Building a template library?
Use the templates API to sync your email templates to external systems or reference template IDs in your workflows.