Overview
Get a list of all WhatsApp templates in your Minimo account, including their approval status, category, and available components.
Use this endpoint to:
Check which templates are approved and ready to send
Display available templates in your application
Monitor template approval status
Verify template structure before sending messages
Before sending messages, make sure to connect a WhatsApp Business Account by visiting the Channels section at
app.minimo.it/channels .
Response Structure
{
"data" : [
{
"id" : "tmpl_whatsapp_123" ,
"name" : "order_confirmation" ,
"language" : "en" ,
"status" : "APPROVED" ,
"category" : "UTILITY" ,
"namespace" : "e33bca12_1234_4567_abcd_abcdef123456" ,
"createdAt" : "2025-10-01T10:00:00Z" ,
"updatedAt" : "2025-10-05T14:30:00Z" ,
"qualityScore" : {
"score" : "GREEN" ,
"reasons" : null
},
"components" : [
{
"type" : "HEADER" ,
"format" : "TEXT" ,
"text" : "Order Confirmation"
},
{
"type" : "BODY" ,
"text" : "Hello {{1}}, your order {{2}} has been confirmed!" ,
"example" : {
"bodyText" : [[ "John Doe" , "ORD-12345" ]]
}
},
{
"type" : "FOOTER" ,
"text" : "Reply STOP to opt out"
}
]
}
]
}
Template Status
WhatsApp templates can have different statuses:
Status Description Can Send? APPROVEDTemplate approved by Meta ✅ Yes PENDINGWaiting for Meta approval ❌ No REJECTEDMeta rejected the template ❌ No DISABLEDDisabled by you or Meta ❌ No
Only templates with status: "APPROVED" can be used to send messages. Check this field before attempting to send.
Template Categories
Category Description Use Cases UTILITYTransactional updates Order status, booking confirmations, account notifications AUTHENTICATIONSecurity codes OTP, 2FA verification, password resets MARKETINGPromotional content Product launches, special offers, newsletters
Quality Score
Meta assigns a quality score based on how users interact with your messages:
Score Meaning Impact GREENHigh quality Full sending capacity YELLOWMedium quality Monitoring required REDLow quality Reduced sending limits UNKNOWNNot yet rated New template
Templates with RED quality scores may be paused or have limited sending capacity. Improve message quality to restore
full access.
Quality score can decline due to :
High block rates (users blocking your number)
Low engagement (users not responding)
Spam reports
Irrelevant content
Template Components
Templates consist of multiple components:
Optional element at the top
Can be: TEXT, IMAGE, VIDEO, or DOCUMENT
Single variable allowed (for dynamic content)
Body
Required main message content
Supports multiple variables ({{1}}, {{2}}, etc.)
Maximum 1024 characters
Optional additional text at the bottom
No variables allowed
Often used for opt-out instructions
Optional interactive elements
Types: Call-to-action, Quick reply, URL
Up to 3 buttons per template
Use Cases
Check Template Approval Status
Monitor when templates are approved:
async function waitForApproval ( templateName ) {
const maxAttempts = 48 ; // Check for 48 hours
const intervalHours = 1 ;
for ( let i = 0 ; i < maxAttempts ; i ++ ) {
const response = await fetch ( 'https://api.minimo.it/public/v1/templates/whatsapp' , {
headers: {
Authorization: `Bearer ${ apiKey } ` ,
},
});
const { data : templates } = await response . json ();
const template = templates . find (( t ) => t . name === templateName );
if ( template ?. status === 'APPROVED' ) {
console . log ( `Template " ${ templateName } " is now approved!` );
return true ;
} else if ( template ?. status === 'REJECTED' ) {
console . error ( `Template " ${ templateName } " was rejected` );
return false ;
}
// Wait 1 hour before checking again
await new Promise (( resolve ) => setTimeout ( resolve , intervalHours * 60 * 60 * 1000 ));
}
console . error ( 'Template approval timeout' );
return false ;
}
Build Template Selector
Display only approved templates:
async function getApprovedTemplates () {
const response = await fetch ( 'https://api.minimo.it/public/v1/templates/whatsapp' , {
headers: {
Authorization: `Bearer ${ apiKey } ` ,
},
});
const { data : templates } = await response . json ();
// Filter only approved templates
return templates . filter (( t ) => t . status === 'APPROVED' );
}
// Use in UI
const approvedTemplates = await getApprovedTemplates ();
approvedTemplates . forEach (( template ) => {
console . log ( ` ${ template . name } - ${ template . category } ` );
});
Parse template components to find required variables:
function getTemplateVariables ( template ) {
const bodyComponent = template . components . find (( c ) => c . type === 'BODY' );
if ( ! bodyComponent ) return [];
// Extract {{1}}, {{2}}, etc.
const matches = bodyComponent . text . match ( / \{\{ ( \d + ) \}\} / g );
if ( ! matches ) return [];
return matches . map (( m ) => parseInt ( m . match ( / \d + / )[ 0 ]));
}
// Example usage
const template = templates . find (( t ) => t . name === 'order_confirmation' );
const variables = getTemplateVariables ( template );
console . log ( `Template requires ${ variables . length } variables:` , variables );
// Output: Template requires 2 variables: [1, 2]
Filtering & Sorting (Coming Soon)
Future versions will support:
# Filter by status
GET /api/templates/whatsapp?status=APPROVED
# Filter by category
GET /api/templates/whatsapp?category=UTILITY
# Sort by creation date
GET /api/templates/whatsapp?sort=-createdAt
Template Languages
WhatsApp templates can be created in multiple languages:
{
"name" : "order_confirmation" ,
"language" : "en" ,
"status" : "APPROVED"
}
Supported language codes :
en - English
it - Italian
es - Spanish
fr - French
de - German
pt - Portuguese
And 60+ more…
Create separate templates for each language you want to support. Use the same name with different language codes.
Common Errors
Error Cause Solution unauthorizedInvalid API key Check Authorization header no_whatsapp_accountWhatsApp not connected Connect WhatsApp in dashboard rate_limit_exceededToo many requests Implement caching, respect rate limits
Best Practices
Templates don’t change frequently. Cache the response: const CACHE_DURATION = 15 * 60 * 1000 ; // 15 minutes
let templateCache = null ;
let cacheTime = 0 ;
async function getTemplates () {
if ( templateCache && Date . now () - cacheTime < CACHE_DURATION ) {
return templateCache ;
}
const response = await fetch ( 'https://api.minimo.it/public/v1/templates/whatsapp' , {
headers: { 'Authorization' : `Bearer ${ apiKey } ` },
});
templateCache = await response . json ();
cacheTime = Date . now ();
return templateCache ;
}
Regularly check template quality to prevent issues: async function checkTemplateHealth () {
const { data : templates } = await getTemplates ();
const unhealthy = templates . filter ( t =>
t . qualityScore . score === 'RED' || t . qualityScore . score === 'YELLOW'
);
if ( unhealthy . length > 0 ) {
console . warn ( 'Templates need attention:' , unhealthy . map ( t => t . name ));
// Send alert to team
}
}
Always verify template is approved before sending: async function canSendTemplate ( templateName ) {
const { data : templates } = await getTemplates ();
const template = templates . find ( t => t . name === templateName );
return template && template . status === 'APPROVED' ;
}