Templates
Templates are used for opening conversations with customers who have yet to message you, or who have not sent you a message in the last 24 hours.
Templates must be approved (have a status of APPROVED
) before they can be sent. Templates may be paused or disabled automatically based on customer feedback, engagement, or for violations of WhatsApp Policies.
Types of Templates
Message templates can be categorized as:
- Marketing templates – Enable businesses to achieve a wide range of goals, from generating awareness to driving sales and retargeting customers.
- Utility templates – Follow up on user actions or requests.
- Authentication templates – Verify a user’s identity, potentially at various steps of the customer journey.
Marketing Template Guidelines
Marketing templates are our most flexible. They can enable businesses to achieve a wide range of goals, from generating awareness to driving sales and more.
Note: Examples are illustrative only. Templates with similar content may be categorized differently based on the exact content.
Message Objective: Awareness
Business Goal | Example Templates |
---|---|
Generate awareness of your business, products, or services. | - "Did you know? We installed a new tower in your area so you can enjoy a better network experience. To learn more, visit our site 1." - "Diwali is around the corner! Join us at 1 on October 24 to celebrate with friends and family. For more details, click 2." - "Looking for a getaway this fall? Our newest resort just opened in 1: the perfect place to relax and unwind. Learn more here: 2." |
Message Objective: Sales
Business Goal | Example Templates |
---|---|
Send promotional offers to drive sales. | - "As a thank you for your last order, please enjoy 15% off your next order. Use code LOYAL15 at checkout. Visit our site here 1." - "Refer → save! Use code FRIEND so you both earn $10 off your next order." - "Upgrade to our Premium cabin for more benefits, like extra legroom and priority boarding. Click 1 or log into our app to upgrade." - "You have been pre-approved for our credit card! Enjoy an introductory offer of 1 if you apply via your personalized link: 2." - "Don’t forget! Today only, get double points on your purchases. Visit your nearest store and use your phone number at check-out." |
Message Objective: Retargeting
Business Goal | Example Templates |
---|---|
Promote relevant offers or call-to-actions to retarget customers. | - "Your subscription has expired! Don't miss out on your favorite shows. Re-subscribe now: 1." - "You left items in your cart! Don’t worry, we saved them for you. Click here to checkout: 1." - "Thank you for visiting our site. You can secure your health insurance in a few easy clicks – continue here: 1." - "You didn’t finish your application! Please log into your profile here to pick up where you left off: 1." - "We miss you! Join us for an afternoon or evening of fun with your family. Click here to book with a special rate: 1." |
Message Objective: App Promotion
Business Goal | Example Templates |
---|---|
Request customers to install or take an action with your app. | - "Did you know? You can now checkout in our app. Download it here 1 to try our streamlined experience." - "Thank you for using our app. We noticed you have not used our latest feature, 1. Click here 2 to learn more!" - "In-app only: 20% off this week! Use code SUMMER20 to save. Download our app: 1." - "Hi 1, your friend 2 recently joined our community. Send them a welcome message today: 1." |
Message Objective: Build Customer Relationships
Business Goal | Example Templates |
---|---|
Strengthen customer relationships through personalized messages. | - "1, did you think we’d forget? No way! Happy birthday! We wish you the best in the year ahead." - "As we approach the end of the year, we reflect on what drives us: You. Thank you for being a valued customer." - "Hello, I am the new virtual assistant. I can help you discover products or provide support. Please reach out if I can help!" |
Also considered marketing:
- Templates with mixed content (e.g. order update with a promo).
- Templates where contents are unclear (e.g. only “1” or “Congratulations!”).
Utility Template Guidelines
Utility templates are typically triggered by a user action or request. They must include specificity about the active or ongoing transaction, account, subscription, or interaction.
Message Objective: Opt-In Management
Business Goal | Example Templates |
---|---|
Confirm opt-in or opt-out for receiving messages on WhatsApp. | - "Thanks for confirming opt-in! You’re in. You’ll now receive notifications via WhatsApp." - "Thank you for confirming your opt-out preference. You will no longer receive messages from us on WhatsApp." |
Message Objective: Order Management
Business Goal | Example Templates |
---|---|
Confirm, update, or cancel an order or transaction. | - "Thank you! Your order 1 is confirmed. We’ll notify you once it ships." - "Hooray! Your package from order 1 is on its way. Tracking number: 2, delivery by 3." - "One item from your order 1 is backordered. We’ll update you soon. To cancel and get a refund, click here: 2." - "We received your item from order 1. Your refund for 2 has been processed. Thank you." |
Message Objective: Account Alerts or Updates
Business Goal | Example Templates |
---|---|
Send important account updates. | - "Daily update for account ending in 1: Your balance is 2." - "Reminder: Your monthly payment for your subscription to 1 will be billed on 2." - "To finish setting up your profile, please upload a photo: 1." - "The product 1 ordered on 2 has been recalled. Learn more: 3." - "There is a tornado alert in your area. We recommend staying indoors until 1 o'clock today." |
Message Objective: Feedback Surveys
Business Goal | Example Templates |
---|---|
Collect feedback on orders or interactions. | - "We delivered your order 1! Let us know if there was any issue: 2." - "Your feedback helps us improve. Click here 1 to share your thoughts on your recent visit to our 2 location." - "You chatted with us online about order 1. How was your experience? Fill out this short survey: 2." |
Message Objective: Continue a Conversation
Business Goal | Example Templates |
---|---|
Start an interaction on WhatsApp that began in another channel. | - "Hi! I see you requested support via our online chat. I’m the virtual assistant on WhatsApp. How can I help?" - "Hi 1, following up on your call with customer service on 2. Your case has progressed to the next step. Please log into your account: 3." |
Authentication Template Guidelines
Authentication templates verify a user’s identity (with alphanumeric codes). Only authentication templates can send one-time passcodes.
Message Objective: Authentication
Business Goal | Example Templates |
---|---|
Authenticate users with one-time passcodes. | - "1 is your verification code." - "1 is your verification code. For your security, do not share this code." - "1 is your verification code. This code expires in 15 minutes." |
That’s it! Feel free to customize or expand the examples as needed.
Create Templates on Banricom
🔐 Authentication Requirements
All API requests require two authentication headers:
Header | Description | How to Obtain |
---|---|---|
x-api-key | Your application's secret API key | Generated when you create an app |
x-app-id | Your application's unique identifier | Sent to your organization email after app creation |
📌 Important Security Notes:
- Treat your
x-api-key
like a password - never expose it in client-side code - Always make requests to our API over HTTPS
- Rotate your API keys periodically via the developer dashboard
📜 Hello World Template Example
Parameter | Type | Description | Allowed Values |
---|---|---|---|
templateCategory | string | Template category | MARKETING, UTILITY |
templateName | string | Unique name for the template | - |
headerOption | string | Type of header | "text" |
headerText | string | Header Text | string |
body | string | Template message body | - |
WabaId | number | WhatsApp Business Account ID | - |
POST /whatsapp/templates/create HTTP/1.1
Host: api.banricom.com
x-api-key: your_app_key_here_12345
x-app-id: your_app_id_here_67890
Content-Type: application/json
{
"templateCategory": "marketing",
"templateName": "Testing",
"headerOption": "text",
"headerText" : "Hello world",
"body": "Welcome and congratulations!! \n This message demonstrates your ability to send a WhatsApp message using APIs.",
"WabaId": 225****056,
}
✅ Successful Response (200 OK)
{
"success": true,
"data": {
"app_name": "test-app",
"response": [
{
"Id": "000000000000000000000000",
"Status": "APPROVED",
"Category": "MARKETING",
"TemplateID": "742******492"
}
]
}
}
📜 Create template with header variable
Parameter | Type | Description | Allowed Values |
---|---|---|---|
templateCategory | string | Template category | MARKETING, UTILITY |
templateName | string | Unique name for the template | - |
headerOption | string | Type of header | "text" |
headerText | string | Header Text | string |
HeaderVariables | string | Header Variables | json |
body | string | Template message body | - |
WabaId | number | WhatsApp Business Account ID | - |
POST /whatsapp/templates/create HTTP/1.1
Host: api.banricom.com
x-api-key: your_app_key_here_12345
x-app-id: your_app_id_here_67890
Content-Type: application/json
{
"templateCategory": "MARKETING",
"templateName": "Testing_two",
"headerOption": "text",
"headerText": "Dear {{names}}",
"HeaderVariables": {
"names": "John Doe"
},
"body": "Welcome and congratulations!! This message demonstrates your ability to send a WhatsApp message using APIs.",
"WabaId": 225****056
}
✅ Successful Response (200 OK)
{
"success": true,
"data": {
"app_name": "test-app",
"response": [
{
"Id": "000000000000000000000000",
"Status": "APPROVED",
"Category": "MARKETING",
"TemplateID": "742******492"
}
]
}
}
📜 Create Template with Media Header
Endpoint
POST https://api.banricom.com/whatsapp/templates/create
Description
Creates a WhatsApp Business template with a media header (document, image, or video).
Authentication
- Requires API key and app ID in headers
Request
Headers
Header | Value | Required |
---|---|---|
x-api-key | Your API key | Yes |
x-app-id | Your App ID | Yes |
Content-Type | multipart/form-data | Yes |
Form Data
Field | Type | Description | Required |
---|---|---|---|
file | File | Media file for header (image/document/video) | Yes |
payload | JSON string | Template configuration | Yes |
Payload Structure
{
"templateCategory": "MARKETING",
"templateName": "string",
"headerOption": "document|image|video",
"body": "string",
"WabaId": "number"
}
Parameter | Type | Description | Allowed Values |
---|---|---|---|
templateCategory | string | Template category | MARKETING, UTILITY |
templateName | string | Unique name for the template | - |
headerOption | string | Type of media header | document, image, video |
body | string | Template message body | - |
WabaId | number | WhatsApp Business Account ID | - |
Sample Request
curl -X POST \
-H "x-api-key: your_app_key_here_12345" \
-H "x-app-id: your_app_id_here_67890" \
-F "[email protected]" \
-F "payload='{
\"templateCategory\": \"MARKETING\",
\"templateName\": \"Promo Offer\",
\"headerOption\": \"document\",
\"body\": \"Check our new offers!\",
\"WabaId\": 22****56
}'" \
https://api.banricom.com/whatsapp/templates/create
✅ Successful Response (200 OK)
{
"success": true,
"data": {
"app_name": "test-app",
"response": [
{
"Id": "000000000000000000000000",
"Status": "APPROVED",
"Category": "MARKETING",
"TemplateID": "742******492"
}
]
}
}