Send WhatsApp Template (v2)
Send a pre-approved WhatsApp template with file/media header support via multipart form data.
Send a pre-approved WhatsApp template message with support for uploading a media header file directly (multipart form data).
POST /stable/open/whatsapp/send-template
Base URL: https://api.myalice.ai. This endpoint accepts
multipart/form-data. Authenticate with the X-Myalice-Api-Key header.
Form fields
The ID of the template.
The ID of the WhatsApp channel.
Customer phone number with country code.
The media file to send as the template header.
One of none, text, document, image, video.
Key–value pairs for the variables in the template body.
Key–value pairs for the variables in the template buttons.
Key–value pairs to store against the customer record.
Example
curl -X POST "https://api.myalice.ai/stable/open/whatsapp/send-template" \
-H "X-Myalice-Api-Key: YOUR_API_KEY" \
-F "template_id=102323213" \
-F "channel_id=1022" \
-F "customer_phone=+628123456789" \
-F "header_type=document" \
-F "file=@invoice.pdf"{
"success": true,
"data": { "status": "ongoing" }
}Errors
Unauthorized. Body: { "detail": string }.