A text message is the simplest call. It works inside the 24-hour customer service window, that is, after the customer has messaged you. To start a conversation outside that window, use a template instead.
curl -X POST \
"https://graph.facebook.com/v23.0/PHONE_NUMBER_ID/messages" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "919867800451",
"type": "text",
"text": { "preview_url": false, "body": "Hi! Thanks for your message." }
}'{
"messaging_product": "whatsapp",
"contacts": [{ "input": "919867800451", "wa_id": "919867800451" }],
"messages": [{ "id": "wamid.HBgL..." }]
}Free-form text only sends if the customer messaged you in the last 24 hours. Outside that window the call is rejected and you must send a template.
Set preview_url to true if your text contains a link you want shown as a preview.
Building an integration? If you hit a wall, message us and a developer will help, the only platform in India that answers you live on WhatsApp.
Ask us on WhatsApp