Docs

Everything the widget and the API expect, on one page.

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>

Control it from your page

chatline.open();
chatline.close();
chatline.destroy();

Send a message over HTTP

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?"}'

Errors you may see

  • 403 — the page's domain is not on the chatbot's allowed list.
  • 404 — the chatbot is paused or in draft.
  • 429 — the visitor exceeded the per-minute limit set on the Settings tab.
  • 402 — the account reached its monthly message quota.