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.

json
{
  "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"
}
FieldTypeDescription
idstringUnique template identifier
namestringTemplate name for internal identification
subjectstringDefault subject line — may contain merge tags like {{first_name}}
categorystringTemplate category (e.g. onboarding, newsletter, promotional, transactional)
isSystembooleantrue for built-in EmailSendX system templates, false for workspace templates
workspaceIdstringThe workspace this template belongs to
htmlContentstringFull HTML content of the template — included when retrieving by ID
createdAtstringISO 8601 creation timestamp

Merge tags in templates

Template subject lines and HTML content may contain merge tags like {{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.

GET/api/v1/templatesscope: templates:read

Returns 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

NameTypeInRequiredDescription
pageintegerqueryoptionalPage number (default: 1)
limitintegerqueryoptionalResults per page, max 100 (default: 50)
idstringqueryoptionalRetrieve a single template by ID — includes htmlContent field
categorystringqueryoptionalFilter templates by category (e.g. onboarding, newsletter, promotional)
include_systembooleanqueryoptionalSet to true to include EmailSendX built-in system templates (default: false)

Response

json
{
  "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.