Skip to main content

What are templates?

In the official WhatsApp API, you can only send messages freely while the 24-hour conversation window is open (i.e., when the customer has recently sent you a message). Outside this window, the only way to start a conversation is through templates — pre-defined messages that must be approved by Meta before they can be sent.
If you’re coming from Z-API, this is one of the biggest differences. In Z-API (unofficial connection) you could send any message at any time. In the official API, outside the 24h window, only approved templates work.

Categories

Each template needs a category that defines the type of communication. Choosing the wrong category can get your template rejected by Meta.
CategoryWhen to useExample
UTILITYTransactional and operational communicationOrder confirmation, delivery status, account update
MARKETINGPromotional communicationCampaign, offer, coupon, product launch
AUTHENTICATIONSecurity and identity validationOTP code, login confirmation, two-factor verification

Template structure

Every template is composed of components. Each component has a role:
ComponentRequiredWhat it does
HEADERNoInitial context — can be text, image, video, or document
BODYYesMain message content
FOOTERNoShort complementary text (e.g., “Do not reply to this message”)
BUTTONSNoUser actions (open URL, call, quick reply)

Placeholders

You can use dynamic variables in text with {{1}}, {{2}}, etc. When creating the template, you must send real examples for each placeholder — Meta uses these examples during review.

Template flow

The API organizes templates by business (WABA — WhatsApp Business Account). Each business has its own templates, approval history, and limits.
1

Identify your WABA

Use the list WABAs endpoint to get the correct businessId for your token.
2

Create the template

Choose the category, build the components with placeholders and examples, and submit for approval.
3

Wait for approval

Meta reviews the template and returns a status: PENDING, APPROVED, or REJECTED.
4

Send messages

With an approved template, you can use it to start conversations with customers outside the 24h window.

Template status

StatusMeaning
PENDINGSubmitted for review, awaiting Meta approval
APPROVEDApproved and ready to use
REJECTEDRejected — review the content and category before resubmitting