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

# WhatsApp templates

> Create the messages Meta approves, choose when the agent uses each one, and understand the 24-hour window.

WhatsApp only lets a business write freely to someone during the 24 hours after their last message. To write first, or to write again once those 24 hours are over, the agent needs a template that Meta has approved. You create the templates and choose when the agent uses each one in **WhatsApp message templates**.

## The 24-hour window

* When a lead writes to you on WhatsApp, a 24-hour window opens. Inside it, the agent and your team can send any message.
* Each new message from the lead starts the 24 hours again.
* Outside the window, only a template approved by Meta can go out. When the lead replies, a new window opens and the conversation carries on as usual.
* A lead from email or a Meta Ads form has never written to you, so the agent's first message to them is always a template.

In [Conversations](https://docs.newlead.ai/guide/conversations/reply-and-ai-mode.md#the-24-hour-window), once the window has closed, the message box says "24h window expired — Your message will be sent as a template": what you write goes out inside the agent's **Reply after 24 h** template. If the agent has none, it says "24h window expired — Cannot send messages".

## The three moments

Under **When it writes with a template**, you give the agent one template for each moment:

| Moment | When it's used | Rule |
| - | - | - |
| **First contact** | Opens the conversation with leads from email or Meta Ads | Every blank needs a detail to fill it |
| **If the main one cannot go out** | Goes out instead of the first-contact template when Meta rejects, disables, pauses or deletes it, or when a lead is missing a detail it needs | No blanks |
| **Reply after 24 h** | When the lead hasn't written for more than a day: automatic follow-ups, reminders and the messages you write in Conversations | Exactly one blank, filled with what the agent writes |

Each list shows the templates that fit that moment. The ones that don't are at the end, under **Not for this**, with the reason, such as **Has details** or **No agent text**. **Create template** in the list opens the form with that moment already chosen. When you're done, select **Save**.

Without a **Reply after 24 h** template, the agent has no way to write to a lead once the window closes.

## Create a template

**1. Open the panel**

Open the agent and, in **Setup**, select **WhatsApp message templates**. The row appears once WhatsApp is connected.

**2. Start a new template**

Under **Your templates**, select **Create template**, or use **Create template** inside one of the moments.

**3. Say what it's for**

In **What is it for?**, pick the moment. It decides which details you can add to the message.

**4. Name, category and language**

**Name** accepts lowercase letters, numbers and underscores only. For **Category**, use **Utility** for confirmations, reminders and updates (approved within hours), **Marketing** for promotions (slower review, and it uses sending quota) and **Authentication** only for verification codes. **Language** can be Spanish, English or Portuguese (Brazil).

**5. Write the message**

Up to 1024 characters. To insert something that changes for each person, such as **Lead name** or **Business name**, select **Add a detail about the person**. In a **Reply after 24 h** template, use **Agent's text** instead.

**6. Send it to Meta**

Under **Examples for Meta**, write an example for each blank. Meta uses them to review the template and they are never sent to anyone. Select **Send to Meta**.

The template starts as **Pending at Meta**. Review usually takes a few hours, and the agent can't use it until it's **Approved**. **Sync** updates the statuses from Meta. When Meta approves the first-contact template, the first messages that were waiting go out straight away.

### Details you can add

* **First contact**: the lead's details, **Business name**, and the questions of the Meta Ads forms you've switched on in **Lead reception**.
* **Reply after 24 h**: only **What the agent writes**.
* **If the main one cannot go out**: none. It's the one that goes out when a detail is missing.

## Good to know

* Meta decides the status of every template, not you. Besides **Approved** and **Pending at Meta**, you may see **Rejected** (with "Meta rejected it:" and the reason), **Paused by Meta**, **Disabled by Meta** or **Deleted at Meta**.
* If a template assigned to a moment can't be sent, the **WhatsApp message templates** row in **Setup** asks you to **Fix** it.
* If a lead lacks a detail the first-contact template needs, the fallback goes out instead. Without a fallback, that lead gets no first message.
* **Lead name** comes from the lead's details. A form that asks for first name and last name separately only gives the first name.
* Meta doesn't accept a message that starts or ends with a blank, a link inside a blank, the same detail twice, or too many blanks for so little text.
* **Remove** also deletes the template from Meta, in that language. If you use it elsewhere, such as in n8n, it stops working there. You can't remove a template while it's assigned to a moment.
* Templates belong to your WhatsApp Business account. If you reconnect WhatsApp with a different account, the assigned templates are sent to Meta again for approval.
* From n8n you can send any approved template to a phone number: see [n8n](https://docs.newlead.ai/n8n.md).

## Related

* [Connect WhatsApp](https://docs.newlead.ai/guide/channels/connect-whatsapp.md)
* [Lead reception](https://docs.newlead.ai/guide/channels/lead-reception.md)
* [Message status](https://docs.newlead.ai/guide/channels/message-status.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.