LoadingSend templates and replies, manage contacts and templates, start bot flows and receive signed webhooks. JSON in, JSON out, Bearer authentication.
Create an API key in Settings, then call POST /v1/messages. Phone numbers use E.164 format.
curl -X POST https://www.klickkonnect.com/app/api/v1/messages \
-H "Authorization: Bearer $KLICKKONNECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+9477XXXXXXX",
"type": "template",
"template": {
"name": "order_confirmation",
"language": "en",
"variables": ["Nimali", "NS-20431", "LKR 12,450"]
}
}'
| POST | /v1/messagesSend text, media, buttons, or a template (type field) |
| GET | /v1/messages/{id}Get a message and its delivery status |
| GET | /v1/templatesList templates with category, language and status |
| GET | /v1/contactsList contacts, filter by tag or opt-in |
| POST | /v1/contactsCreate or update a contact by phone number |
| DELETE | /v1/contacts/{phone}Delete a contact and its data |
| POST | /v1/broadcastsCreate a broadcast to a segment |
| POST | /v1/flows/{id}/startStart a bot flow for a contact |
| GET | /v1/conversationsList inbox conversations |
| GET | /v1/conversations/{id}/messagesMessages in a conversation |
Base URL https://www.klickkonnect.com/app/api. Rate limit 600 requests per minute per key. Errors return a code and a readable message.
Events: message.received, message.sent, message.status (sent, delivered, read, failed), template.status, conversation.assigned, contact.opted_out. Respond with 200 within 5 seconds; failed deliveries retry with backoff for 24 hours.
POST https://your-site.com/hooks/klickkonnect
X-Klickkonnect-Signature: sha256=5f2b...c91e
X-Klickkonnect-Event: message.received
{
"event": "message.received",
"id": "evt_01J9ZK4Q",
"created_at": "2026-10-06T19:22:41Z",
"data": {
"message_id": "msg_7Hc2",
"from": "+9477XXXXXXX",
"contact_name": "Nimali Perera",
"type": "text",
"text": "Can it come after 6 pm?",
"conversation_id": "conv_88a1"
}
}// Verify the signature (Node / Express)
import crypto from "crypto";
app.post("/hooks/klickkonnect", express.raw({ type: "application/json" }), (req, res) => {
const expected = "sha256=" + crypto
.createHmac("sha256", process.env.KLICKKONNECT_WEBHOOK_SECRET)
.update(req.body)
.digest("hex");
const given = req.get("X-Klickkonnect-Signature") || "";
if (given.length !== expected.length ||
!crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected))) {
return res.sendStatus(401);
}
const event = JSON.parse(req.body);
// handle event.event ...
res.sendStatus(200);
});If your shop is custom PHP, Node or any other code, post each order and cart event to your store webhook. Klickkonnect then sends the WhatsApp messages: order confirmed, paid, shipped with a tracking link, out for delivery, delivered, cancelled, refunded, cash on delivery confirmation and abandoned cart reminders. You switch each message on in the app under Commerce, Order messages.
https://www.klickkonnect.com/app/ecom.php?s=STORE_TOKEN (the token has 32 characters).| Method | POST with a JSON body |
| Event | Header X-Klickkonnect-Event, or an event field in the body |
| Secret | Header X-Klickkonnect-Secret, or a signature in X-Klickkonnect-Signature: sha256=HEX (HMAC-SHA256 of the raw body) |
| Always send | id (the same on every event for one order or cart) and phone. Without a phone number no message can be sent. |
| Other fields | number, name, total, currency, payment_method (cod for cash on delivery), items (name, quantity, price), tracking_url, cart_url |
| Answers | 200 saved, 401 wrong secret, 404 wrong token, 403 workspace suspended |
Tracking is stored as a link, not a bare number. Point tracking_url at your own tracking page or your courier's public tracking page.
order.created | Customer places an order. Sends the confirmation, or the COD Confirm / Cancel buttons when payment_method is cod. |
order.updated | Order details changed. Blank phone or name never erases saved values. |
order.paid | Payment received later (bank transfer, COD collected). |
order.shipped | Courier collected the parcel. Send tracking_url to include a tracking link. |
order.out_for_delivery | Courier is delivering today. |
order.delivered | Parcel delivered. |
order.cancelled | Order cancelled. |
order.refunded | Refund issued. |
cart.abandoned | Customer entered a phone number at checkout and left. Up to three reminders are scheduled. |
cart.completed | Customer finished checkout. Stops any remaining reminders. |
POST https://www.klickkonnect.com/app/ecom.php?s=STORE_TOKEN
Content-Type: application/json
X-Klickkonnect-Event: order.created
X-Klickkonnect-Secret: YOUR_WEBHOOK_SECRET
{
"id": "1024",
"number": "TR-1024",
"name": "Nimali Perera",
"phone": "0771234567",
"total": 18500,
"currency": "LKR",
"payment_method": "cod",
"items": [
{ "name": "Silk saree, ruby", "quantity": 1, "price": 18000 },
{ "name": "Blouse stitching", "quantity": 1, "price": 500 }
]
}<?php
const KK_HOOK = "https://www.klickkonnect.com/app/ecom.php?s=TOKEN";
const KK_SECRET = "PASTE_WEBHOOK_SECRET";
function kk_event(string $event, array $data): bool {
$body = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$ch = curl_init(KK_HOOK);
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CONNECTTIMEOUT => 3, CURLOPT_TIMEOUT => 4,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Klickkonnect-Event: " . $event,
"X-Klickkonnect-Signature: sha256="
. hash_hmac("sha256", $body, KK_SECRET),
],
]);
$res = curl_exec($ch);
$code = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($code !== 200) error_log("Klickkonnect $event failed: HTTP $code $res");
return $code === 200;
}
// When the order is saved:
kk_event("order.created", [
"id" => "1024", "number" => "TR-1024", "name" => "Nimali Perera",
"phone" => "0771234567", "total" => 18500, "currency" => "LKR",
"payment_method" => "cod",
"items" => [["name" => "Silk saree", "quantity" => 1, "price" => 18500]],
]);
// When the courier has collected the parcel:
kk_event("order.shipped", [
"id" => "1024", "phone" => "0771234567",
"tracking_url" => "https://your-shop.com/track?no=TR301026001",
]);Sending messages yourself from code uses the REST API above, which is included from the Pro plan. A checklist with test steps is in the Help Center guide.
Works on any website today, with or without a Klickkonnect account. Paste the snippet before the closing body tag.
<!-- WhatsApp chat button -->
<a href="https://wa.me/97450000000?text=Hi!%20I'd%20like%20to%20know%20more." target="_blank" rel="noopener"
aria-label="Chat with us"
style="position:fixed;right:20px;bottom:20px;z-index:9999;display:flex;align-items:center;gap:8px;padding:12px 18px 12px 14px;border-radius:999px;background:#25D366;color:#fff;font:600 15px/1 system-ui,sans-serif;text-decoration:none;box-shadow:0 4px 14px rgba(0,0,0,.2)">
<svg width="22" height="22" viewBox="0 0 24 24" fill="#fff" aria-hidden="true"><path d="M12 2a10 10 0 00-8.6 15.1L2 22l5-1.3A10 10 0 1012 2z"/></svg>
Chat with us
</a>
Pro and Enterprise plans include the REST API, webhooks and a sandbox number.