Retrieve a template
GET
/{template_id}Returns one template with its status, category and content. Useful to check whether a template is approved before you send it.
Authorization
apiKey apikey<token>
Your HostMentor API key, from the dashboard under Messaging → WhatsApp → API keys.
In: header
Path Parameters
template_id*string
ID of the template, returned when you create or list templates.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://wa.hostmentor.com/v3/594425479261596" \ -H "apikey: YOUR_API_KEY"{ "id": "594425479261596", "name": "flash_sale", "language": "en", "status": "APPROVED", "category": "MARKETING", "components": [ { "type": "LIMITED_TIME_OFFER", "limited_time_offer": { "text": "Flash sale!", "has_expiration": true } }, { "type": "BODY", "text": "40% off hosting plans, today only." }, { "type": "BUTTONS", "buttons": [ { "type": "COPY_CODE", "example": [ "FLASH40" ] }, { "type": "URL", "text": "Shop now", "url": "https://example.com/{{1}}", "example": [ "https://example.com/flash-sale" ] } ] } ]}