POST WhatsApp Template Message

This API allows you to send approved WhatsApp template messages through BotPenguin using dynamic template variables, media attachments, agent assignment, and conversation tagging.

Parameter Description

  1. userName: refers to the name of the user we intend to send the message

  2. wa_id: refers to the WhatsApp number of the user we intend to send the message NOTE: The number must contain the country code without the plus sign

  3. templateId: refers to the ID of the template NOTE: Template must be approved before using this API

  4. assignTo : refers to the email of custom user or agent.

  5. params: is used for the variables used in the template, it is an empty array in the case of a plain text template with no variables. In case of variables in the template, please refer to the JSON below

  6. tags: refers to label you can assign to conversations or chats to help organize and manage effectively.


API End Points

https://api.v7.botpenguin.com/whatsapp-automation/wa/send-template?apiKey=*API KEY*

Request Headers

Header
Details

authType

Key

Query Params

Header
Details

apiKey

{API KEY Value}


Types of Template Variables:

  1. Name

When you choose Name as the type of variable, each variable in your template body must include a parameter_name field that matches the exact variable name defined in the template.

For example, if your template has a variable called customer_name, your API request body should pass it as shown below:

JSON Example


  1. Number:

When you choose Number as the type of variable, you do not need to pass parameter_name in the request body.

JSON Example

Response

Header

Header
Details

X-Powered-By

Express

Vary

Origin

Access-Control-Allow-Credentials

true

_user

61c1c2058e0****e9bb420f8

_bot

62e77a807f1****ecce980f0

whatsAppId

****bsIWcYgazd5ZDAK

Content-Type

application/json; charset=utf-8

Content-Length

507

Etag

W/"1fb-urlVjgGZAUBRNyxQDAOnZ3ONF1I"

Date

Wed, 03 Aug 2022 11:16:13 GMT

Connection

keep-alive

Keep-Alive

timeout=5

Last updated