- Product Documentation
- Roadmap
- Support
- Get Started
WhatsApp
Message
- Integration
Introduction
REST API
Chatbot with API
Send WhatsApp Template
Sends a per-approved template message to WhatsApp
The Id of the Template, can be found in MyAlice Dashboard
The Id of the WhatsApp Channel, can be found in MyAlice Dashboard
Customer phone with country code
Key-pair values of the variables in the template
Atttribute in the Template
Key-pair values of the variables in the template
URL of the attachment, must be publicly accessible. Only use if the header is of type image
URL of the attachment, must be publicly accessible. Only use if the header is of type audio
URL of the attachment, must be publicly accessible. Only use if the header is of type video
URL of the attachment, must be publicly accessible. Only use if the header is of type document
curl --request POST \
--url https://api.myalice.ai/stable/open/whatsapp/send-template-message \
--header 'Content-Type: application/json' \
--header 'X-Myalice-Api-Key: <api-key>' \
--data '{
"template_id": "102323213",
"channel_id": "1022",
"customer_phone": "+628123456789",
"attributes": {
"1": "John Doe"
},
"attachment": {
"image": "https://myalice.ai/attachment.jpg",
"audio": "https://myalice.ai/attachment.mp3",
"video": "https://myalice.ai/attachment.mp4",
"document": "https://myalice.ai/attachment.pdf"
}
}'
{
"id": "<string>",
"project_id": 123,
"timestamp": "<string>",
"function_name": "<string>",
"message": "<string>",
"status": "<string>",
"extra": {
"timestamp": "<string>",
"project_id": 123,
"platform_id": 123,
"customer_id": 123,
"customer_phone": "<string>",
"template_id": "<string>",
"template_name": "<string>",
"source": "<string>",
"success": true,
"report": {
"messaging_product": "<string>",
"contacts": [
{
"input": "<string>",
"wa_id": "<string>"
}
],
"messages": [
{
"id": "<string>",
"message_status": "<string>"
}
]
}
}
}
Authorizations
Body
The Id of the Template, can be found in MyAlice Dashboard
The Id of the WhatsApp Channel, can be found in MyAlice Dashboard
Customer phone with country code
Key-pair values of the variables in the template
Atttribute in the Template
Key-pair values of the variables in the template
URL of the attachment, must be publicly accessible. Only use if the header is of type image
URL of the attachment, must be publicly accessible. Only use if the header is of type audio
URL of the attachment, must be publicly accessible. Only use if the header is of type video
URL of the attachment, must be publicly accessible. Only use if the header is of type document
Response
curl --request POST \
--url https://api.myalice.ai/stable/open/whatsapp/send-template-message \
--header 'Content-Type: application/json' \
--header 'X-Myalice-Api-Key: <api-key>' \
--data '{
"template_id": "102323213",
"channel_id": "1022",
"customer_phone": "+628123456789",
"attributes": {
"1": "John Doe"
},
"attachment": {
"image": "https://myalice.ai/attachment.jpg",
"audio": "https://myalice.ai/attachment.mp3",
"video": "https://myalice.ai/attachment.mp4",
"document": "https://myalice.ai/attachment.pdf"
}
}'
{
"id": "<string>",
"project_id": 123,
"timestamp": "<string>",
"function_name": "<string>",
"message": "<string>",
"status": "<string>",
"extra": {
"timestamp": "<string>",
"project_id": 123,
"platform_id": 123,
"customer_id": 123,
"customer_phone": "<string>",
"template_id": "<string>",
"template_name": "<string>",
"source": "<string>",
"success": true,
"report": {
"messaging_product": "<string>",
"contacts": [
{
"input": "<string>",
"wa_id": "<string>"
}
],
"messages": [
{
"id": "<string>",
"message_status": "<string>"
}
]
}
}
}