Send Template Message

Send an approved WhatsApp template message to a specific phone number.

POST/v1/messages/send-template

Request Body

Parameters

ParameterTypeRequiredDescription
phoneNumberstringYesRecipient phone number in E.164 format (e.g. +919876543210).
templateIdstringYesThe internal ID of the approved template (as shown in the Template ID Reference section).
variablesobjectNoKey-value pairs for variables, e.g. { "1": "Rahul" }.
mediaHeaderobjectNoObject containing { type: "image", link: "..." } for media templates. If using an image type, the format must be JPEG or PNG.

Implementation Examples

const payload = {
  phoneNumber: "+919876543210",
  templateId: "cm0j1u8v0000...",
  variables: { "1": "Rahul", "2": "20% OFF" }
};

const response = await fetch('https://api.wadoot.com/v1/messages/send-template', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-KEY': 'YOUR_API_KEY_HERE'
  },
  body: JSON.stringify(payload)
});