Get Templates
Retrieve and manage your WhatsApp message templates
Templates are pre-approved message formats that ensure your WhatsApp communications comply with WhatsApp Business policies while maintaining consistent messaging with your audience.
WhatsApp templates are essential for business messaging, enabling you to send structured communications to customers while complying with WhatsApp's policies. This guide covers how to retrieve your templates using our API.
Overview
Templates serve as the foundation for all non-session messages on WhatsApp Business. Each template:
- Must be pre-approved by WhatsApp before use
- Belongs to a specific category (Marketing, Utility, Authentication)
- Can include variables that personalize messages for each recipient
- Supports multiple languages and formats (text, media, interactive components)
Legacy API reference
The field reference for this legacy endpoint.
Get Templates
Retrieve all WhatsApp templates associated with your account, including approval status, variables, and other key properties.
Endpoint
GET https://api.insightssystem.com/api:AFRA_QCy/get_templatesAuthentication
All API requests require authentication using your API key. Never share your API keys in client-side code.
Include your API key in all requests using Bearer authentication:
Authorization: Bearer YOUR_API_KEYResponse
The API returns an array of template objects, each containing detailed information about your WhatsApp templates.
Unique identifier for the template
UUID of the account that owns the template
Unique name identifier of the template
Show category options
Promotional content and offers
Transactional messages like order confirmations
Security codes and verification messages
Format type of the template (text, media, etc.)
Language code (e.g., "en", "en_US")
Show status options
Template is ready to use
Template is awaiting WhatsApp review
Template was rejected by WhatsApp
Number of variable placeholders in the template
Format string showing variable placement (e.g., "[b:7]")
UUID of the template in our system
Example Request
curl -X GET \
https://api.insightssystem.com/api:AFRA_QCy/get_templates \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'Example Response
[
{
"id": 300,
"user_id": "a9d7c221-62d2-43b5-810a-8a1a71c7820c",
"name": "exclusive_offer_alert",
"category": "MARKETING",
"type": "text",
"language": "en",
"status": "APPROVED",
"variable_counts": 7,
"template_formate": "[b:7]",
"template_id": "6f6e4113-cc8a-4fbe-b98d-2c631d299c6b"
},
{
"id": 150,
"user_id": "a9d7c221-62d2-43b5-810a-8a1a71c7820c",
"name": "general_communication_message",
"category": "UTILITY",
"type": "text",
"language": "en",
"status": "REJECTED",
"variable_counts": 0,
"template_formate": "[]",
"template_id": "75521873-72cd-4c33-9072-c8b901d6f687"
}
]Response Codes
Your request was successful and the templates have been returned.
Authentication failed. Check that you're using a valid API key.
{
"error": {
"code": "unauthorized",
"message": "Invalid API key provided"
}
}Your account doesn't have permission to access templates.
You've exceeded the rate limit. Implement exponential backoff in your requests.
Something went wrong on our end. Please contact support if the issue persists.
{
"error": {
"code": "server_error",
"message": "An internal server error occurred"
}
}Working with Templates
Retrieve templates
Use the Get Templates API to fetch all templates associated with your account.
Check template status
Verify that your templates are in the "APPROVED" status before using them.
Identify variable placeholders
Note the variable_counts and template_formate to understand how many variables need to be provided when sending a message.
Send messages
Use the template ID and required variables to send messages via the Send Template API.
Template Best Practices
Variable Management
Keep track of which variables correspond to which placeholders in your template. Consider creating a mapping in your application.
Template Versioning
Templates can't be edited after submission, but you can create new versions. Use a versioning system in your template names (e.g., welcome_v2).
Status Monitoring
Regularly check the status of your templates, as WhatsApp can change approval statuses based on user feedback.
Language Support
Create templates in multiple languages to communicate with your global audience in their preferred language.
FAQs
WhatsApp typically reviews templates within 24-48 hours, but this can vary depending on template content and current review volumes.
Templates may be rejected if they violate WhatsApp's Business Policy, contain prohibited content, or don't match the selected category. Check our message templates guide for more information.
No, once submitted, templates cannot be modified. You'll need to create a new template with your desired changes.
Text-only templates have a limit of 1,024 characters. Templates with media have different limits based on the header type.
Need help?
Our support team can assist with template issues, API integration, or any other questions.