Install the widget
Paste this before the closing body tag. Replace the id with the one on your chatbot's Embed tab.
<script src="https://chatline.ashishkr.com/widget.js" data-chatline-id="YOUR_BOT_ID" defer></script>
Everything the widget and the API expect, on one page.
Paste this before the closing body tag. Replace the id with the one on your chatbot's Embed tab.
<script src="https://chatline.ashishkr.com/widget.js" data-chatline-id="YOUR_BOT_ID" defer></script>
chatline.open(); chatline.close(); chatline.destroy();
The reply streams back as plain text. The conversation id comes back in the x-conversation-id header; send it on the next request to keep the thread.
curl -N https://chatline.ashishkr.com/api/chat \
-H "content-type: application/json" \
-d '{"chatbotId":"YOUR_BOT_ID","visitorId":"visitor-123","message":"How long is the warranty?"}'