Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.montereyfinancial.dev/llms.txt

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

Email templates are HTML documents with merge field placeholders that get populated with recipient data at send time. Templates sync bidirectionally with Campaigner for delivery.

Template lifecycle

1

Create a template

POST /email-templates/ creates the template in the database and syncs it to Campaigner.
2

Add merge fields

Use merge field placeholders like {{first_name}} or {{account_number}} in your HTML content. See merge fields for available fields.
3

Preview with live data

GET /email-templates/{id}/preview renders the template with real data from a random MSSQL account, or pass ?account_number=123456789 for a specific one.
4

Use in campaigns

Reference the template when creating an email campaign.

Merge field categories

Templates support four categories of merge fields:
CategorySourceExample
databaseMSSQL legacy ERP{{first_name}}, {{account_number}}
workspace_defaultsWorkspace configuration{{company_name}}, {{support_email}}
workspaceCustom fields per workspaceUser-defined fields
assetsAzure Blob Storage{{logo_url}}, {{banner_image}}
Use GET /email-templates/merge-fields to list all available fields grouped by category.

Preview endpoints

EndpointReturns
GET /email-templates/{id}/previewJSON with merged template data
GET /email-templates/{id}/preview/htmlRendered HTML (for browser iframe)
POST /email-templates/preview-rawRender arbitrary HTML content with merge data

Campaigner sync

When you create, update, or delete a template through the API, it automatically syncs with Campaigner via the CreativeSyncService. This ensures templates are available for sending without manual Campaigner configuration.