POST
/
stable
/
open
/
whatsapp
/
send-template
curl --request POST \
  --url https://api.myalice.ai/stable/open/whatsapp/send-template \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-Myalice-Api-Key: <api-key>' \
  --form template_id=102323213 \
  --form channel_id=1022 \
  --form 'customer_phone=+628123456789' \
  --form 'body_vars={
  "1": "John Doe"
}' \
  --form 'button_vars={
  "1": "Home"
}' \
  --form header_type=document \
  --form 'customer_attributes={
  "1": "John Doe"
}'
{
  "success": true,
  "data": {
    "status": "ongoing"
  }
}

Authorizations

X-Myalice-Api-Key
string
header
required

Body

multipart/form-data
WhatsApp Template to send
template_id
string
required

The Id of the Template, can be found in MyAlice Dashboard

Example:

"102323213"

channel_id
string
required

The Id of the WhatsApp Channel, can be found in MyAlice Dashboard

Example:

"1022"

customer_phone
string
required

Customer phone with country code

Example:

"+628123456789"

file
file

File to send

body_vars
object

Key-pair values of the variables in the template body

button_vars
object

Key-pair values of the variables in the template buttons

header_type
enum<string>

Key-pair values of the variables in the template buttons

Available options:
none,
text,
document,
image,
video
Example:

"document"

customer_attributes
object

Key-pair values of the customer variables to be stored against that customer

Response

200
application/json
Successful operation
success
boolean
required
data
object
required