Skip to main content
POST
Preview how a template will render with sample variable values. Use this to test and validate your templates before starting a campaign.

Request Body

Template Syntax

Templates use Jinja2-style syntax:

Available Filters

System Variables

These are always available:

Example Request

Request Body

Response

Response

Example with Missing Variables

Request with missing appointment_date:
Request Body
Response

Example Code

cURL
Python
JavaScript

Template Examples

Welcome message:
Appointment reminder:
SMS message:

Error Handling

If template has syntax errors:
Response (Error)

Best Practices

  1. Always test templates before starting campaigns
  2. Use default filters for optional variables
  3. Keep templates concise - especially for SMS
  4. Use title_case for names to handle different input formats
  5. Test with empty variables to ensure fallbacks work

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for template preview.

template
string
required

Template string to preview

variables
Variables · object
required

Variables for template rendering

Response

Successful Response