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

# Create a Template

> Design a WhatsApp message template, add variables and media, and submit it to Meta for approval.

This is the full step-by-step walkthrough for creating a new template. If you're new to templates, read [Templates Overview](/templates/overview) first.

## Before you start

Have these ready:

* A clear purpose for the message (offer, reminder, confirmation).
* Your copy in the target language.
* If you want a media header: an image, video, or PDF sample file (Meta reviews it).
* A valid template name — lowercase letters, digits, and underscores only.

## Open the template builder

<Steps>
  <Step title="Go to Templates">
    In the sidebar, click **Templates**.
  </Step>

  <Step title="Click 'Add Template'">
    The button sits at the top of the template list.
  </Step>
</Steps>

## Step 1 — Name, category, language

<Steps>
  <Step title="Enter a template name">
    Up to 512 characters. Must match the pattern `^[a-z0-9_]+$` — lowercase letters, digits, and underscores only. No spaces, no capital letters, no dashes. Examples: `welcome_message`, `order_confirmation`, `april_sale_2026`.
  </Step>

  <Step title="Pick a category">
    Choose **Marketing** or **Utility**. See [Templates Overview](/templates/overview) for what each category means.
  </Step>

  <Step title="Pick a language">
    Xobito supports 80+ IANA language codes — `en`, `en_US`, `es`, `pt_BR`, `hi`, `fr`, `de`, `ar`, and many more. Pick the one that matches the language you will actually write the body in.
  </Step>
</Steps>

<Warning>
  Template name must follow the strict pattern `^[a-z0-9_]+$`. Anything else is rejected by the form before submission.
</Warning>

## Step 2 — Header (optional)

The header appears at the top of the message. Choose one type:

<CardGroup cols={2}>
  <Card title="None" icon="minus">
    No header — the body is the first thing the recipient sees.
  </Card>

  <Card title="Text" icon="heading">
    Plain text header. Supports one variable like `{{1}}`.
  </Card>

  <Card title="Image" icon="image">
    Upload a sample JPG or PNG.
  </Card>

  <Card title="Video" icon="video">
    Upload a sample MP4.
  </Card>

  <Card title="Document" icon="file">
    Upload a sample PDF.
  </Card>
</CardGroup>

<Note>
  For IMAGE / VIDEO / DOCUMENT headers, you upload a **sample file** during creation. Meta uses it for review. When you later send the template (in a campaign or chat), you can attach a different file of the same type.
</Note>

If you use a text header with a variable, provide an example value for Meta's sample check.

## Step 3 — Body (required)

The body is the main message text.

<Steps>
  <Step title="Write your core message">
    Keep it clear, friendly, and on-brand. WhatsApp users expect direct, conversational text.
  </Step>

  <Step title="Add variables where you want personalisation">
    Insert `{{1}}`, `{{2}}`, `{{3}}`… wherever you want a value swapped in at send time. Numbers must be sequential starting at `{{1}}`. See [Dynamic Templates](/templates/dynamic-templates).
  </Step>

  <Step title="Provide example values">
    For each variable, enter a realistic sample value. Meta's reviewers use these to see what a real message looks like. Use plausible values like `Alex`, `A1042`, `Friday` — not `test` or `xxx`.
  </Step>
</Steps>

### Body formatting

WhatsApp supports basic rich formatting inside the body:

* `*bold*` renders as **bold**
* `_italic_` renders as *italic*
* `~strike~` renders with a line through
* Triple backticks for monospace
* Line breaks — press Enter

### Example body

```
Hi {{1}}, thanks for choosing us!

Your order *#{{2}}* is confirmed and will be delivered by {{3}}.

Reply HELP for assistance.
```

Example values: `{{1}}=Alex`, `{{2}}=A1042`, `{{3}}=Friday`.

## Step 4 — Footer (optional)

The footer is a small piece of grey text at the bottom of the message. Footers do **not** support variables.

Typical uses:

* Legal disclaimers — "Standard rates apply."
* Opt-out instructions — "Reply STOP to unsubscribe."
* Brand tagline.

## Step 5 — Buttons (optional)

Xobito currently supports **Quick Reply** buttons on templates. Quick Reply buttons are tappable buttons that send a preset reply back to your WhatsApp number.

<Note>
  Meta's template platform supports other button types (URL, Phone Number) too, but the Xobito template builder is focused on QUICK\_REPLY handling today. If you need URL or phone buttons, check the builder for availability in your version — if they are not shown, use plain text with a link inside the body instead.
</Note>

Typical Quick Reply use cases:

* Order confirmation: `Confirm` / `Change delivery`.
* Appointment reminder: `I'll be there` / `Reschedule`.
* Quick survey: `👍 Good` / `👎 Bad`.

## Step 6 — Preview and save

<Steps>
  <Step title="Check the live preview">
    The builder renders the template as it will appear on the recipient's phone.
  </Step>

  <Step title="Read it out loud">
    Catch typos, awkward phrasing, or missing variable labels before Meta sees it.
  </Step>

  <Step title="Save">
    Saving the template submits it to Meta automatically. The status moves to **PENDING** while Meta reviews.
  </Step>
</Steps>

## Template lifecycle

Once submitted, your template is one of four statuses:

| Status       | Meaning                                                 |
| ------------ | ------------------------------------------------------- |
| **DRAFT**    | Saved but not yet submitted.                            |
| **PENDING**  | Meta is reviewing.                                      |
| **APPROVED** | Usable immediately in campaigns, chat, and automations. |
| **REJECTED** | Meta rejected it. Review, edit, resubmit.               |

<Warning>
  Only **APPROVED** templates can actually be sent. Attempts to send a DRAFT, PENDING, or REJECTED template are blocked.
</Warning>

Meta rejection reasons are logged internally by Xobito but **the exact rejection reason is not shown in the Xobito UI today**. To understand why a template was rejected:

* Check Meta Business Manager — rejection reasons appear there.
* Or contact support to pull the server-side logs.

See [Meta Approval](/templates/meta-approval) for common rejection causes and fixes.

## Using an approved template

Once the status turns green (APPROVED), you can use the template in:

* **Live chat** — send the template directly inside any conversation.
* **Campaigns** — pick it as the message for a broadcast. See [Create a Campaign](/campaigns/create-campaign).
* **Template bots** — schedule it to send automatically on a trigger or delay.
* **API** — send via the `/messages/template` endpoint.

## Tips for first-time template authors

<AccordionGroup>
  <Accordion title="Start with one simple template">
    Your first template should be a short plain-text message with no variables and no media. It's the fastest path to approval and teaches you the flow.
  </Accordion>

  <Accordion title="Avoid ALL CAPS and too many emojis">
    Meta flags aggressive marketing language. 🎉🎉🎉 BIG SALE 50% OFF!!! is a near-guaranteed rejection.
  </Accordion>

  <Accordion title="Always add an opt-out footer for Marketing templates">
    "Reply STOP to unsubscribe." Makes Meta happy and keeps your quality rating healthy.
  </Accordion>

  <Accordion title="Name templates meaningfully">
    `welcome_new_customer_en` is clearer than `t1` or `test_v3` — you'll thank yourself later.
  </Accordion>

  <Accordion title="Plan versioning up front">
    Approved templates cannot be edited — you create a new template instead. Adopt a naming convention like `_v2` from the start.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Dynamic templates" icon="wand-magic-sparkles" href="/templates/dynamic-templates">
    Personalise the message per recipient using variables.
  </Card>

  <Card title="Meta approval" icon="circle-check" href="/templates/meta-approval">
    Understand how reviews work and why templates get rejected.
  </Card>

  <Card title="Variables & media" icon="image" href="/templates/variables-and-media">
    Full reference for headers, media, and variable rules.
  </Card>

  <Card title="Run a campaign" icon="bullhorn" href="/campaigns/create-campaign">
    Put your approved template to work.
  </Card>
</CardGroup>
