PushizoDocs
Messaging & campaigns

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

OperationEndpointScope
List / createGET, POST /v1/apps/{app_id}/templates { name, channel?, tags?, content }analytics:read / admin
Read / update / deleteGET, PATCH (a new version if content is given), DELETE …/templates/{id}
VersionsGET …/templates/{id}/versions; rollback from the dashboard (the previous version is saved as a new version)
Render previewPOST …/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 appPOST …/templates/{id}/copy_to_app { target_app_id, name? }admin
StatisticsGET …/templates/{id}/stats — total/rate summaries for messages sent with the templateanalytics: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:

VariableContent
user.id, user.external_id, user.languageUser 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 rowThe row selected with the Dynamic Content tag
unsubscribe_urlDelivery-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.issues gives 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 default filter.

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.

On this page