From a system event to a WhatsApp message you can track.
When an order is placed or a booking is confirmed, your server can message through the WhatsApp Business channel connected to MatnBot. Choose an approved template, send a request with an API key, then check its status or receive a webhook update.
{
"channel_id": "<channel-id>",
"recipient": { "type": "phone", "value": "+962790000000" },
"message": {
"type": "template",
"template_id": "<approved-template-id>",
"language": "en",
"parameters": { "order_number": "1042" }
},
"opt_in": {
"confirmed": true,
"source": "checkout",
"captured_at": "2026-09-26T09:00:00Z"
},
"client_reference": "order-1042"
}How to send WhatsApp messages with the API
Connect WhatsApp
Connect your WhatsApp Business account and number through the official flow, and confirm the channel is ready to send.
Create an API key
Create a client with messages.send in the dashboard and grant the right channel. Keep the key on your server only.
Choose the message type
Use an approved template to start contact or outside the customer service window. Use supported text or media within 24 hours of a customer message.
Track the outcome
Send a stable Idempotency-Key when retrying. HTTP 202 means the request was queued; use message status or webhooks for sending, delivery, and failure updates.
Built for business workflows
Traceable status
A message ID, your client reference, and queued, sent, delivered, failed, and other states as events become available.
In the team conversation
API sends appear with clear attribution in the conversation, where a person can take over with context.
Explicit controls
Scoped keys, channel grants, required public IP allowlists, and automation modes that respect human ownership.
Events for your CRM
Signed webhooks with retries and possible duplicate deliveries; deduplicate using the event ID.
WhatsApp rules to account for
Business-initiated messages and messages outside the customer service window need an approved template and appropriate recipient opt-in. The 24-hour window starts with a customer message; an outbound API message does not open it. Account, channel, and recipient restrictions still apply.
Read the WhatsApp Business Messaging Policy ↗Connect what happens next
Explore integrations for orders, media, tickets, and lead events.