HostMentor Docs

Create a template

POST/{waba_id}/message_templates

Submits a new template for WhatsApp to review. It starts as PENDING; the decision arrives on your webhook as a template status event, usually within minutes.

Pick a kind of template in the example list on the right. Templates with an image, video or document header need a sample file first.

Authorization

apiKey
apikey<token>

Your HostMentor API key, from the dashboard under Messaging → WhatsApp → API keys.

In: header

Path Parameters

waba_id*string

ID of your WhatsApp Business Account (whatsapp_business_account_id in List your phone numbers).

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://wa.hostmentor.com/v3/105954558954427/message_templates" \  -H "apikey: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "order_shipped",    "language": "en",    "category": "UTILITY",    "components": [      {        "type": "HEADER",        "format": "TEXT",        "text": "Order {{1}} shipped",        "example": {          "header_text": [            "#1042"          ]        }      },      {        "type": "BODY",        "text": "Hi {{1}}, your order {{2}} is on its way and should arrive by {{3}}.",        "example": {          "body_text": [            [              "Priya",              "#1042",              "Friday"            ]          ]        }      },      {        "type": "FOOTER",        "text": "Reply STOP to opt out"      }    ]  }'
{  "id": "594425479261596",  "status": "PENDING",  "category": "UTILITY"}