List templates
/{waba_id}/message_templatesReturns your templates, newest first, with their status and content. Use status to list only templates you can send (APPROVED), and fields to return only what you need.
Results come in pages. When paging.cursors.after is present, pass it as after to get the next page.
Authorization
apiKey Your HostMentor API key, from the dashboard under Messaging → WhatsApp → API keys.
In: header
Path Parameters
ID of your WhatsApp Business Account (whatsapp_business_account_id in List your phone numbers).
Query Parameters
Only templates with this status.
Value in
- "PENDING"
- "APPROVED"
- "REJECTED"
- "PAUSED"
- "DISABLED"
- "IN_APPEAL"
- "PENDING_DELETION"
Comma-separated fields to return, such as name,status,language. Leave it out to get everything.
Templates per page.
Cursor for the next page, from paging.cursors.after.
Cursor for the previous page, from paging.cursors.before.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://wa.hostmentor.com/v3/105954558954427/message_templates?fields=name%2Cstatus%2Clanguage%2Ccategory&limit=25" \ -H "apikey: YOUR_API_KEY"{ "data": [ { "id": "594425479261596", "name": "order_shipped", "language": "en", "status": "APPROVED", "category": "UTILITY", "components": [ { "type": "BODY", "text": "Hi {{1}}, your order {{2}} has shipped.", "example": { "body_text": [ [ "Priya", "#1042" ] ] } } ] }, { "id": "594425479261597", "name": "diwali_offer", "language": "en", "status": "REJECTED", "category": "MARKETING", "rejected_reason": "INCORRECT_CATEGORY", "components": [ { "type": "BODY", "text": "Get 30% off everything this Diwali!" } ] } ], "paging": { "cursors": { "before": "QVFIUmxtNVRpSjJ", "after": "QVFIUlZAPOEdrMVJ" } }}Templates
WhatsApp message templates: categories, approval, placeholders, buttons and rules. Create, list, edit and delete templates with the API.
Create a template POST
Create a WhatsApp message template and submit it for approval: text, media, buttons, coupons, carousels, catalogs and one-time passwords.