Introduction
Template management endpoints allow you to retrieve, inspect, and create WhatsApp message templates. Templates are pre-approved message formats required by WhatsApp for business communications.π Get Available Templates
Retrieve all templates available for your company and phone number.Endpoint
Query Parameters
| Parameter | Required | Description |
|---|---|---|
access_key | Yes | Your unique API access key. |
phone_number | Yes | Phone number to filter templates (without β+β sign). |
Response
π Get Template Components
Retrieve detailed information about a specific templateβs components and structure.Endpoint
Query Parameters
| Parameter | Required | Description |
|---|---|---|
access_key | Yes | Your unique API access key. |
template | Yes | ID or name of the template to query. |
Response
π Create New Template
Create a new WhatsApp message template for approval by Meta.Endpoint
Headers
| Key | Value | Required | Description |
|---|---|---|---|
| Content-Type | application/json | Yes | Indicates that the request body is in JSON format. |
Body Request
Required Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
company_id | String | Unique company identifier | "uuid-company" |
waba_id | String | WhatsApp Business Account ID | "123456789" |
name_template | String | Template name (lowercase, underscores only) | "order_confirmation" |
language_template | String | Language code | "es_ES", "en_US" |
category_template | String | Template category | "MARKETING", "UTILITY" |
components_template | Object | Template components structure | See example above |
Template Categories
| Category | Description | Use Case |
|---|---|---|
MARKETING | Promotional messages | Offers, announcements |
UTILITY | Transactional, functional messages | Order updates, alerts |
AUTHENTICATION | Security and verification messages | OTP codes, confirmations |
Component Types
HEADER
- format:
"TEXT","IMAGE","VIDEO","DOCUMENT" - text: Text content (only for TEXT format)
- example: Example for variables
BODY
- text: Main message content
- Variables: Use
{{1}},{{2}}, etc. for dynamic content
FOOTER
- text: Footer text (static only, no variables)
BUTTONS
Array of button objects: URL Button:Response
Template Approval Process
- Submission: Template is sent to Meta for review
- Review: Meta reviews template (usually 24-48 hours)
- Approval/Rejection: Template is approved or rejected with feedback
- Usage: Approved templates can be used in notifications
Template Status Values
| Status | Description |
|---|---|
pending | Submitted for review |
approved | Approved and ready to use |
rejected | Rejected (check feedback for reasons) |
disabled | Temporarily disabled |
π Template Best Practices
Naming Conventions
- Use lowercase letters only
- Use underscores for spaces
- Be descriptive:
welcome_new_uservstemplate1 - Include language if multiple:
welcome_es,welcome_en
Content Guidelines
- Be Clear: Templates should be easily understood
- Variables: Use meaningful placeholders like
{{customer_name}} - Compliance: Follow WhatsApp commerce policies
- Testing: Test with real data before submission
Common Rejection Reasons
- β Generic greetings (βHelloβ, βHi thereβ)
- β Promotional language in UTILITY templates
- β Missing context or unclear purpose
- β Incorrect variable usage
- β Policy violations (spam, inappropriate content)
Approval Tips
- β Include specific business context
- β Use clear, professional language
- β Provide meaningful examples
- β Follow WhatsApp template guidelines
- β Test variable substitution thoroughly
π§ Development Tips
- Cache template information to reduce API calls
- Monitor template status changes
- Have fallback templates for rejected ones
- Use consistent naming across your organization
- Document templates for team reference
