Skip to main content
POST
https://api.telepie.com/v1/
/
whatsapp
Template with Header Document & Having Variables
curl --request POST \
  --url https://api.telepie.com/v1/whatsapp \
  --header 'apikey: <api-key>'
This endpoint is designed for templates without complex headers but supports parameters for customization. Simply plug in and configure your parameters for easy and efficient use.

Request Body Parameters

from
string
required
The number registered with WhatsApp business from which the message is to be sent. Ensure that the country code is prefixed to the number. For example, if the number is in the India, the format would be: +91XXXXXXXXXX
templateName
string
required
This template name contains only lowercase alphanumeric characters and underscores.
to
string
required
Recipient’s MSISDN
type
string
required
WhatsApp message templates type
components
object
required
To build a message content object for WhatsApp, typically include various fields such as param, header type(text, images, video, and other media).
body
object
required
Template body
params
string
required
If you have a registered template with placeholders and you need to submit parameter values in the same order as in the template, you can represent this as an array of values. Ensure that the values are not null, and if the template was registered without placeholders, you can submit an empty array.
Type(header type document)
string
required
To comply with the requirements, ensure that the URL provided for the image starts with either “https://” or “http://”, and that the image is in one of the supported formats (JPG, JPEG, or PNG) with a maximum size of 5MB.
campaignName
string
The WhatsApp campaign name refers to the specific name or title given to a campaign conducted through WhatsApp
curl -G - /v1/whatsapp\
-H 'apikey':'string'
-H "Content-Type: application/json" \
-d '{
    "from": "91XXXXXXXXXX ",
    "campaignName": "api-test",
    "to": "91XXXXXXXXXX",
    "templateName": "template_name",
    "components": {
    "body":{
        "params":["var1", "var2", "var3"]
    }
    "header":{
        "type":"document",
        "document":{
        "link": "url",
        "filename": "XXXXXXXXXXXXXXX"
        }
    }
    },
    "type": "template"
}