Skip to main content
POST
/
api
/
pub
/
wa
/
send
/
template
Send a Template Message
curl --request POST \
  --url https://app.adsera.in/api/pub/wa/send/template \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-api-secret: <api-key>' \
  --data '
{
  "template": "60c72b2f9b1d8e001f8a1b2d",
  "whatsapp": "60c72b2f9b1d8e001f8a1b2c",
  "phone": "+911234567890",
  "dynamicData": {
    "otpCode": "required in AUTHENTICATION Template",
    "FIRSTNAME": "Guest",
    "order_id": "12345",
    "header_handle": "MEDIA public url according to header type",
    "location": {
      "latitude": 40.741895,
      "longitude": -73.989308,
      "name": "location name",
      "address": "location address"
    },
    "coupon_code": "required in COPY_CODE Buttons"
  }
}
'

Authorizations

x-api-key
string
header
required

Your application's unique ID.

x-api-secret
string
header
required

Your application's secret key.

Body

application/json

Message payload

template
string
required

The _id of the WhatsAppTemplate to send.

Example:

"60c72b2f9b1d8e001f8a1b2d"

whatsapp
string
required

The _id of the WhatsApp account to send from.

Example:

"60c72b2f9b1d8e001f8a1b2c"

phone
string
required

The recipient's phone number in E.164 format.

Example:

"+911234567890"

dynamicData
object

Key-value pairs for dynamic template variables.

Example:
{
"otpCode": "required in AUTHENTICATION Template",
"FIRSTNAME": "Guest",
"order_id": "12345",
"header_handle": "MEDIA public url according to header type",
"location": {
"latitude": 40.741895,
"longitude": -73.989308,
"name": "location name",
"address": "location address"
},
"coupon_code": "required in COPY_CODE Buttons"
}

Response

Message successfully queued. The message object is returned.