.hbs template on Paubox once and reference it by name when sending. Variable substitution, conditionals, and loops are resolved server-side before delivery, keeping your send requests small and consistent.
Handlebars syntax
Templates use Handlebars syntax. The most common constructs:Example template
Save the following aswelcome.hbs:
Workflow
1. Upload the template
Upload your.hbs file via POST /dynamic_templates. The data[name] value becomes the identifier you use when sending.
2. Send a templated message
Reference the template by name inPOST /templated_messages. Pass variable values as a JSON string in template_values.
template_values must be a JSON-encoded string, not a JSON object. Stringify it before including it in the request body.