> ## Documentation Index
> Fetch the complete documentation index at: https://docs.senderz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Templates & content

> The block email builder, raw HTML, SMS and push templates, folders, universal blocks and merge tags.

Templates are your reusable content. A template targets one channel and one format: email blocks, raw HTML, SMS text, or a push notification.

## Formats

<CardGroup cols={2}>
  <Card title="Email blocks" icon="table-cells">
    A drag-and-drop block builder that renders email-safe HTML.
  </Card>

  <Card title="Raw HTML" icon="code">
    Bring your own HTML. Merge tags still resolve.
  </Card>

  <Card title="SMS text" icon="comment-sms">
    Plain text with merge tags and a live segment counter.
  </Card>

  <Card title="Push notification" icon="bell">
    Title, body and URL.
  </Card>
</CardGroup>

## The block builder

The email builder is a two-tab palette — **Blocks** and **Universal Blocks** — over a live canvas. The block set includes hero, image, columns, product, button, split, video, coupon, table, reviews, dropdown (email-safe accordion), section (nested container), and raw HTML.

Every block carries a shared shell: background, padding, radius, max-width, font family and per-block conditional visibility. A **template-level Styles page** sets global defaults (fonts, spacing, heading sizes, mobile optimisation, currency style, default alignment) that cascade into the shell.

<Note>
  Block images support an `imageUrl`; empty blocks fall back to a placeholder.
  The gallery hotlinks curated free Unsplash images for starters.
</Note>

## Folders

Organise templates into folders (channel-agnostic — an email and an SMS template can share a folder). The **My Templates** view shows a folder bar; deleting a folder unfiles its templates rather than deleting them. Folders and search reach every template picker.

## Universal content (reusable blocks)

Save a block once as a **universal block** and drop linked copies into many templates. Edit the source and linked instances refresh on template open — "edit once, updates everywhere." A deleted universal block leaves its linked instances on their last snapshot.

## Merge tags

Personalise with `{{field|fallback}}` syntax:

* Identity: `{{firstName|friend}}`, `{{lastName}}`, `{{email}}`, `{{phone}}`
* Custom: `{{custom.anyKey}}`
* Store: `{{storeName}}`, `{{coupon}}`, `{{link}}`
* Compliance: `%%UNSUBSCRIBE_URL%%` (a sentinel the worker replaces with the real hosted URL)
* Flow event data: `{{amount}}`, `{{orderId}}`, `{{recoveryUrl}}` (flows only)

<Warning>
  Merge tags and the unsubscribe sentinel are **preserved** through AI
  translation and generation — they're never rephrased. See
  [AI provider](/en/integrations/ai-provider).
</Warning>

## The gallery

Starter templates come from an operator-managed gallery (email + SMS), surfaced in the campaign wizard and template picker. Merchants pick one to create a real, editable tenant template.

## Previewing

`GET /templates/:id/preview` renders the template against a sample merge context so you can see it fully personalised before sending.
