Manage email content templates from the CLI.

Email Templates

Customize the content of transactional emails that AscendKit sends to your users. Every email AscendKit delivers — verification, password reset, magic link, welcome, and journey emails — is rendered from a template. You can modify the default templates or create new ones for use in journeys.

Templates support HTML and plain-text bodies with {{variable}} placeholders that are filled at send time (e.g., {{userName}}, {{appName}}, {{verificationLink}}). Every update creates a new immutable version, so you can review and roll back changes.

List templates

ascendkit template list
ascendkit template list --query "welcome"
ascendkit template list --system true
ascendkit template list --query "receipt"

Create a template

ascendkit template create \
  --name "Welcome Email" \
  --slug welcome-email \
  --subject "Welcome to {{appName}}" \
  --body-html "<h1>Welcome, {{userName}}!</h1>" \
  --body-text "Welcome, {{userName}}!" \
  --category marketing

View a template

ascendkit template show tpl_abc123

Update a template

ascendkit template update tpl_abc123 \
  --subject "New subject line" \
  --change-note "Updated subject for A/B test"

# --html and --text are accepted as aliases for --body-html and --body-text
ascendkit template update tpl_abc123 \
  --html "<h1>Hello, {{userName}}!</h1>" \
  --text "Hello, {{userName}}!"

ascendkit template update tpl_abc123 \
  --category transactional \
  --change-note "This journey email is operational, not marketing"

Each update creates a new immutable version. Previous versions are preserved.

Tip: Run ascendkit template update <id> --help to see all available flags before editing.

Template categories

Templates support a category field:

  • marketing injects the unsubscribe footer and List-Unsubscribe headers for journey sends.
  • transactional skips unsubscribe injection for operational emails like password resets, magic links, OTPs, and receipts.

The CLI defaults new templates to marketing. Set --category transactional when the email should never present an unsubscribe action.

View version history

ascendkit template version list tpl_abc123
ascendkit template version show tpl_abc123 2

Delete a template

ascendkit template remove tpl_abc123

Personalizing templates for your brand

When customizing templates for your app, follow this workflow:

  1. Set environment variables first — use ascendkit vars set dashboardUrl "https://yourapp.com/dashboard" so templates can reference {{dashboardUrl}} dynamically. Note: {{appName}} is automatically resolved from your environment name
  2. Use {{variable}} placeholders — don't hardcode your app name or URLs in template HTML. If you rename your app or change domains, you only need to update the environment variable
  3. Review linked surveys — if you update survey invite templates, also review the survey questions themselves with ascendkit survey show to ensure they match your branding
  4. Verify after updating — run ascendkit template show tpl_xxx after updates to confirm the HTML and variables rendered correctly
  5. Check for warnings — the CLI will warn you if a template update removes variables that were present in the previous version