Sending WhatsApp Template Text Messages

This API allows you to send WhatsApp Messages after 24 hours window. You can make use of this API to send Bulk Personalised Messages by passing the dynamic variables in multi dimensional array.

Example Your order {{1}} for a total of {{2}} is confirmed. The expected delivery is {{3}}

In order to send the above message you need to pass only the exact value of {{1}}, {{2}}. {{3}} in the "template_globalmessage" or "template_message" variable as array and WhatsApp will construct the message with the value you passed and sends the message. i.e you dont need to pass the entire message body or structure in order to send a template message.

Sending WhatsApp Template Text Messages

POST https://pickyassist.com/app/api/v2/push

Request Body

NameTypeDescription

token

string

Your API Token for Authentication

application

number

8 = WhatsApp Official Account

template_id

string

Template ID of the approved template

template_globalmessage

array

You need to pass only the dynamic variable value in array "template_message" Don't pass your entire message structure here

language

string

Pass the language of the template message, by passing multiple languages you able to send same message in different languages

globalmedia

string

URL from we need to fetch the media , if specified this media will be send to all users.

template_header

string

Header applicable only for sending documents (only pdf supports now) Maximum 60 Characters

data

array

This is a multi dimensional array through which used to send personalised bulk messages using single API request

number

number

WhatsApp Mobile Number with country code without 0 or + prefix

template_message

array

This is an array through which you need to pass the value of the dynamic variable in your template. Please note you only need to pass the value of the dynamic variable as per the order its approved.

language

string

Pass the language of the template message

media

string

You can pass media url if you want to send dynamic media to each number, if the media is static then we highly recommend to pass the URL via "globalmedia" variable

template_header

string

Header is currently applicable only for documents (currently only PDF) , you can pass customised PDF name as header and maximum character limit is 60.

{
  "status": 100,
  "push_id": "34",
  "message": "Success"
}

Sample Request Body JSON for Sending Personalised Text Message

{ 
   "token":"782a357a2c87687a11f54b83fd1a017f05eb6794",
   "application":8,
   "template_id":"VG7935",
   "data":[ 
      { 
         "number":"919444444444",
         "template_message":[ 
            "abc",
            "111",
            "222",
            "333",
            "Picky"
         ],
         "language":"en"
      },
      { 
         "number":"1439900889900",
         "template_message":[ 
            "xyz",
            "101",
            "202",
            "303",
            "Picky"
         ],
         "language":"en"
      }
   ]
}

Sample Request Body JSON for Sending Personalised Text Message with Dynamic Header

Please note this is applicable only if you have requested the template with Dynamic header, it's possible to pass the dynamic variable value globally or dynamically for each mobile number, below is the example of passing template header value globally i.e same for all messages.

{ 
   "token":"782a357a2c87687a11f54b83fd1a017f05eb6794",
   "application":8,
   "template_id":"VG7935",
   "template_header":["123"],
   "data":[ 
      { 
         "number":"919444444444",
         "template_message":[ 
            "abc",
            "111",
            "222",
            "333",
            "Picky"
         ],
         "language":"en"
      },
      { 
         "number":"1439900889900",
         "template_message":[ 
            "xyz",
            "101",
            "202",
            "303",
            "Picky"
         ],
         "language":"en"
      }
   ]
}

Sending message with dynamic header for each mobile number , below method helps you to pass header dynamic variable differently for each mobile number

{ 
   "token":"782a357a2c87687a11f54b83fd1a017f05eb6794",
   "application":8,
   "template_id":"VG7935",
   "data":[ 
      { 
         "number":"919444444444",
         "template_header":["123"],
         "template_message":[ 
            "abc",
            "111",
            "222",
            "333",
            "Picky"
         ],
         "language":"en"
      },
      { 
         "number":"1439900889900",
         "template_header":["123"],
         "template_message":[ 
            "xyz",
            "101",
            "202",
            "303",
            "Picky"
         ],
         "language":"en"
      }
   ]
}

Sample Request Body JSON for Sending Bulk Text Message

{ 
   "token":"782a357a2c87687a11f54b83fd1a017f05eb6794",
   "application":8,
   "template_id":"VG7935",
   "template_globalmessage":[ 
            "abc",
            "111",
            "222",
            "333",
            "Picky"
         ],
   "language":"en",
   "data": [
        {
            "number": "93432434343"
        },
        {
            "number": "13374125202"
        }
    ]
}

Sample Response

{
  "status": 100,
  "push_id": "34",
  "message": "Success"
}

Last updated