Templates and Liquid
Versioned message templates — creating, versions and rollback, render preview, copying to another app, the template gallery, statistics and Liquid personalization syntax.
A template (tpl_…) is a versioned record that keeps notification/campaign/journey content in one place: every save creates a new version, and you can roll back to a previous one. Its content fields are the same as POST /v1/notifications (headings, contents, channel fields, email_mjml…). In the dashboard: Messages → Templates; for email, the drag-and-drop email editor and a ready-made gallery.
API
| Operation | Endpoint | Scope |
|---|---|---|
| List / create | GET, POST /v1/apps/{app_id}/templates { name, channel?, tags?, content } | analytics:read / admin |
| Read / update / delete | GET, PATCH (a new version if content is given), DELETE …/templates/{id} | |
| Versions | GET …/templates/{id}/versions; rollback from the dashboard (the previous version is saved as a new version) | |
| Render preview | POST …/templates/{id}/render { channel, language?, user?: { external_id, tags, properties }, custom_data?, content?, version? } → per-channel output (push: heading/body; email: subject, preheader, html, text; SMS: body, encoding, segments) | analytics:read |
| Copy to another app | POST …/templates/{id}/copy_to_app { target_app_id, name? } | admin |
| Statistics | GET …/templates/{id}/stats — total/rate summaries for messages sent with the template | analytics:read |
Examples: API → Templates. Pass template_id when sending; fields in the body override the template.
Liquid
Pushizo provides sandboxed personalization with LiquidJS (no file/network access, time and output limits). Variables:
| Variable | Content |
|---|---|
user.id, user.external_id, user.language | User identity |
user.tags.*, user.properties.* | Tags and properties |
subscription.channel, subscription.language, subscription.timezone, subscription.device.* | Recipient subscription |
event.name, event.properties.* | The event that triggered the journey |
feed.<name>.* | Data Feeds (JSON fetched from an external source) |
| Content table row | The row selected with the Dynamic Content tag |
unsubscribe_url | Delivery-specific unsubscribe link (email) |
Hi {{ user.tags.first_name | default: "there" }},
{% if user.properties.ltv > 500 %}your VIP discount is ready{% else %}10% off, today only{% endif %}.
{% if feed.profil %}You have {{ feed.profil.puan }} points!{% else %}Discover your points!{% endif %}- In email HTML bodies, output is HTML-escaped; for intentional raw HTML use
{{ value | raw }}. - Standard LiquidJS tags and filters (
if,for,assign,date,upcase,truncate,default,json…) are available. - A syntax error returns
422 HS_CONTENT_INVALID(details.issuesgives line/column); the dashboard editor previews live. - Dynamic content response time: Data Feed calls are cached and have timeouts; if one fails, fall back with the
defaultfilter.
Gallery and AI
The template gallery offers ready-made email/push templates by industry; the AI content assistant generates heading/body suggestions, tone changes and translations (AI assistant). Generated text can be edited before it is saved to the template.
Pre-send check
Before a campaign is sent or scheduled its content is checked automatically: brand guide, banned phrases and phishing, links, personalization (Liquid) errors and KVKK/İYS rules. Available on every plan…
Dynamic Content (content tables and `{% lookup %}`)
Content tables enable personalization by selecting rows uploaded via CSV based on a key column: for example, campaign copy per city, store or product. Decision record:…