Send notifications from your website
Send order confirmations, shipping updates, payment reminders, appointment reminders and alerts from your own website, shop or back office. Each one is an approved WhatsApp template with your values filled in.
How it works #
WhatsApp lets a business write first only with a template it has approved. So a notification is: pick the template, give the values for its placeholders, send. The person is saved as a contact, and their reply arrives in your inbox.
-
Get a template approved #
In the app, open Templates, click New template and start from a ready-made message such as “Order confirmed”, “Payment reminder” or “Appointment reminder”. Submit it and wait for approval, usually minutes.
curl "https://chatilo.me/api/v1/templates?status=APPROVED" \ -H "Authorization: Bearer YOUR_API_KEY" -
Send it when something happens #
From your order system, when an order is placed:
curl -X POST "https://chatilo.me/api/v1/messages" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Idempotency-Key: order-1042-confirmed" \ -H "Content-Type: application/json" \ -d '{ "to": "+919876543210", "name": "Grace Miller", "type": "template", "template": { "name": "order_confirmed", "language": "en", "body": [ "Grace", "1042" ] } }'The
Idempotency-Keyheader makes a retry safe: the same key never sends the message twice. -
See what happened #
The answer has the message’s
id. Ask for it later, or subscribe a hook tomessage.statusto be told when it is delivered and read. See Webhooks.curl "https://chatilo.me/api/v1/messages/9001" \ -H "Authorization: Bearer YOUR_API_KEY"
Which notification, which tool #
- One person, one event (order placed, parcel shipped, invoice due): Send a message, as above.
- Many people at once (a notice to every customer): a broadcast.
- A verification code: one-time codes.
- A reply inside 24 hours of the customer’s last message: plain text or a file, with no template needed.
Rules that apply #
- Someone who replied STOP is never messaged: the API answers
opted_out. - Only message people who agreed to hear from you. See the acceptable use policy.
- Meta charges your WhatsApp account for template messages at its own rates.
- A key may make 120 requests a minute.