POST
/
stable
/
open
/
whatsapp
/
send-template-message
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

X-Myalice-Api-Key
string
headerrequired

Body

application/json
template_id
string
required

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

channel_id
string
required

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

customer_phone
string
required

Customer phone with country code

attributes
object

Key-pair values of the variables in the template

attachment
object

Key-pair values of the variables in the template

Response

200 - application/json
id
string
required
project_id
integer
required
timestamp
string
required
function_name
string
required
message
string
required
status
string
required
extra
object
required