Platform Overview
The ChatMe.lk WhatsApp Lead API empowers businesses to automate instant client onboarding through their connected WhatsApp devices with zero socket complexity.
Instant Visitor Welcome
Automatically sends your customized welcome text, company brochure PDF, and promotional flyers to the visitor's WhatsApp.
Real-Time Owner Alert
Sends an instant push notification alert directly to the Business Owner's personal WhatsApp phone with the lead's inquiry details.
Anti-Ban Verification
Validates whether the visitor's phone number is actively registered on WhatsApp before dispatching stanzas, keeping your number safe.
Website Chatbot Widget Embed (1-Line Quick Setup)
Add the ChatMe.lk bilingual chatbot widget to any website with a single line of script.
Paste the following <script> tag into your website template right before the closing </body> tag. Your customized AI persona, greeting message, theme colors, and quick suggestion buttons will load automatically:
Platform Installation Guides
WordPress
Install the WPCode or Insert Headers and Footers plugin → Add the script snippet to the Footer (Body End) section.
Shopify
Go to Online Store > Themes > Edit Code. Open theme.liquid and paste the script directly above </body>.
Wix / Webflow / Squarespace
Navigate to Settings > Custom Code / Tracking Tools → Add Custom Code → Paste in Body - End → Apply to All Pages.
HTML, PHP, React & Next.js
Add to your root index.html template or load dynamically in Next.js via <Script strategy="lazyOnload" ... />.
Security & Authentication
All incoming API requests are authenticated against your domain's unique Secret API Key.
Every customer domain registered on ChatMe.lk receives a cryptographically secure Secret API Key (format: csx_live_...). You can authenticate requests using any of the following standard methods:
Authorization: Bearer YOUR_API_KEY, or in the JSON payload body as "api_key": "YOUR_API_KEY".
Send WhatsApp Welcome Pack & Capture Lead
Submits a new visitor lead into your ChatMe.lk CRM and automatically triggers the instant WhatsApp Welcome Pack.
Request Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| api_key | string | Required* | Your domain secret API key (or pass via Authorization: Bearer header). |
| domain | string | Optional* | Your registered website domain (e.g. example.com). Required if API key is omitted. |
| phone | string | Required | Visitor WhatsApp mobile number (e.g. 0771234567 or +94771234567). |
| name | string | Optional | Visitor full name (defaults to 'Website Visitor'). |
| string | Optional | Visitor email address. | |
| message | string | Optional | Inquiry or requirement text submitted by the customer. |
| custom_message | string | Optional | Custom text to override default welcome text for this specific submission. |
Implementation Code Snippets
Successful Response (200 OK)
WordPress Elementor Pro Forms Integration
Connect WordPress Elementor Pro forms directly via webhooks without installing any extra plugins.
-
1Open your page in Elementor Editor and select your Contact / Lead Form widget.
-
2In the left sidebar, navigate to Actions After Submit → Click + Add Action → Select Webhook.
-
3Open the new Webhook tab:Set Webhook URL to:
https://chatme.lk/api/send-welcome.php -
4In the Form Fields section, click each field and set Advanced > ID names:• Phone Field ID:
phone(orvisitor_phone)
• Name Field ID:name
• Email Field ID:email
• Message Field ID:message -
5Add a Hidden Field named
api_keyand paste your Secret API Key in its Default Value. -
6Click Update / Publish. Your Elementor Form will now automatically trigger WhatsApp Welcome Packs instantly!
WhatsApp Anti-Ban & Delivery Protection
ChatMe.lk includes an enterprise safety layer designed to protect your linked WhatsApp device against spam flags and disconnects.
Silent Pre-Check Verification
Every phone number is verified against WhatsApp metadata servers before dispatching stanzas.
Bad Number Auto-Filter
Invalid numbers, landlines, or unlinked accounts are automatically skipped to preserve socket integrity.
Smart Multi-Device Queue
Outbound welcome packs are throttled with human-like delays adhering to WhatsApp Multi-Device safety limits.
Rate Limiting & Queue Policies
Guidelines on API request throttling and automated delivery rates.
| Policy Rule | Standard Limit | Behavior When Exceeded |
|---|---|---|
| API Request Rate | 60 requests / minute per API key | HTTP 429 Too Many Requests (Cooldown 60s) |
| WhatsApp Outbound Delay | 2.5s – 4.0s randomized delay | Queued smoothly in background worker |
| Concurrent Socket Limit | 1 active device session per domain | Automatic reconnection with QR keep-alive |
Frequently Asked Questions (FAQ)
Quick answers to common developer and integration questions regarding the ChatMe.lk Chatbot & WhatsApp API platform in Sri Lanka.
Simply copy the 1-line <script> tag provided in the Widget Embed section and paste it right before the closing </body> tag of your website template. The widget loads asynchronously without affecting your site's load speed.
Yes. ChatMe.lk is powered by specialized bilingual NLP models designed for Sri Lankan businesses. It effortlessly handles pure Sinhala (සිංහල), Singlish (e.g. "Mata details one"), and English with automatic language detection.
As soon as a website visitor submits their phone number in the chat widget or a contact form, the ChatMe.lk server triggers your connected WhatsApp device to send an instant welcome message accompanied by your uploaded company PDF profile or promo brochure.
In the Elementor editor, open your Form widget settings, add a Webhook action in Actions After Submit, set the Webhook URL to https://chatme.lk/api/send-welcome.php, and add a hidden field for your API key as shown in our Elementor Guide.
Standard rate limits allow up to 60 API requests per minute. Outbound WhatsApp messages are safely throttled with 2.5s – 4.0s intervals through a background queue to ensure compliance with WhatsApp Anti-Ban protocols.