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

# Templates

> What a template stores, how to create one, and how to reuse, preview, duplicate and delete it across your campaigns.

export const Screenshot = ({id, src, srcDark, alt, caption}) => {
  if (!src) {
    return <Placeholder id={id} kind="screenshot" label="Screenshot coming soon" description={alt} icon={<ImageIcon />} />;
  }
  return <figure className="brd-media" data-media-id={id}>
      <img className="brd-media-frame block dark:hidden" src={src} alt={alt} />
      <img className="brd-media-frame hidden dark:block" src={srcDark || src} alt={alt} />
      {caption && <figcaption className="brd-media-caption">{caption}</figcaption>}
    </figure>;
};

A template is a message you write once and reuse. It holds the content for one or more channels,
plus any placeholders you want filled in when you use it.

<Screenshot id="ss-templates-overview-hero-library" alt="The Templates page listing saved templates with the channels each one covers and a New template button above" />

A template doesn't say who sends it or who receives it. The sender for each channel, the push apps,
the audience and the delivery settings are chosen on each campaign.

## Create a template

Go to **Templates**, select **New template**, enter a **Template name**, pick the **Channels**, and
fill in each channel's block. To design the email body, open the
[email builder](/templates/email-builder). The **Before you save** checklist lists anything missing;
when it reads **Ready**, select **Save template**.

| Channel | Saved in the template                                    |
| ------- | -------------------------------------------------------- |
| Email   | Subject, preview text, and the body                      |
| SMS     | The message                                              |
| Push    | Title, body, click URL, data fields, expiry and priority |

## Limits

| Field                             | Limit                     |
| --------------------------------- | ------------------------- |
| Template name                     | 1 to 255 characters       |
| Email subject, email preview text | Up to 500 characters each |
| SMS message                       | Up to 1,600 characters    |
| Push title                        | Up to 255 characters      |
| Push body                         | Up to 1,000 characters    |
| Placeholder key                   | Up to 64 characters       |
| Placeholder default value         | Up to 1,000 characters    |

## Reuse a template

Starting a campaign from a template **copies** the content in. From then on the two are independent,
so editing a template never changes a campaign that's already drafted, scheduled or sent, and a typo
you fix in the template stays in campaigns you already made from it.

To use one, open the composer, find **Start from a template**, select **Browse templates**, pick one
and select **Continue**. Enter a value for each fill-once placeholder, then select **Apply
template**. Applying it adds the template's channels to the campaign, keeping any you'd already
selected, replaces the content of those channels, names the campaign after the template unless
you've already named it, and leaves the senders, audience and delivery settings as they were.

## Preview a template

To check a template before you use it, open it and select **Preview**. Each fill-once placeholder
gets a field, filled with its default value; change any of them and select **Preview** in the dialog
to see each channel resolved. The preview uses the last saved version, so save your changes first.
Contact-field tags such as `{{first_name}}` stay as they are, because they're filled per recipient
when a campaign sends.

## Duplicate a template

Select the copy button on a template's row. You get a new template named `Copy of` followed by the
original name, with the same channels, placeholders and content. Duplicating is the way to try a
variation without disturbing the template your campaigns are already built from.

## Delete a template

Deleting a template doesn't touch the campaigns you made from it. Their content was copied in when
you applied the template, so drafts, scheduled campaigns and sent campaigns all keep the copy they
already hold.

## Related

<Columns cols={2}>
  <Card title="Email builder" icon="panels-top-left" href="/templates/email-builder">
    Design the email body block by block.
  </Card>

  <Card title="Placeholders and merge tags" icon="braces" href="/templates/placeholders-and-merge-tags">
    Declare fill-once and contact-field placeholders.
  </Card>

  <Card title="Create a campaign" icon="square-pen" href="/campaigns/create-a-campaign">
    Apply a template and send it.
  </Card>
</Columns>
