Send a Message
1
curl --request GET \
--url https://waba-v2.360dialog.io/v1/configs/templates \
--header 'D360-API-KEY: your_api_key' \
--header 'Content-Type: application/json'2
Thank you for your order, {{1}}! Your confirmation number is {{2}}.3
curl --request POST \
--url https://waba-v2.360dialog.io/messages \
--header 'D360-API-KEY: your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "15551234567",
"type": "template",
"template": {
"name": "order_confirmation",
"language": {
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Maria"
},
{
"type": "text",
"text": "B67890"
}
]
}
]
}
}'4
{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "15551234567",
"wa_id": "15551234567"
}
],
"messages": [
{
"id": "wamid.HBgLMTU1NTEyMzQ1NjcVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3RTcA"
}
]
}5
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "PHONE_NUMBER",
"phone_number_id": "PHONE_NUMBER_ID"
},
"statuses": [
{
"id": "wamid.HBgLMTU1NTEyMzQ1NjcVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3RTcA",
"status": "delivered",
"timestamp": "1675175992",
"recipient_id": "15551234567"
}
]
},
"field": "messages"
}
]
}
]
}Common Template Types
{
"messaging_product": "whatsapp",
"to": "15551234567",
"type": "template",
"template": {
"name": "appointment_reminder",
"language": {
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "John"
},
{
"type": "date_time",
"date_time": {
"fallback_value": "February 25, 2023"
}
}
]
}
]
}
}Last updated
Was this helpful?