Developer Overview

WebChatAgent gives you three ways to put a chatbot in front of your users. Pick one based on how much control you need over the interface.

IntegrationWhat you getBest for
Widget EmbedA ready-made chat UI from one script tagWebsites and web apps
REST APISend a message, get a reply (request/response)Custom UIs, mobile apps, server scripts
WebSocket APIReal-time message stream with typing and presenceLive chat dashboards, agent tools

All three talk to the same chatbot, share the same knowledge base, and count against the same message quota. You can mix them — for example, embed the widget on your site and build an internal agent dashboard on the WebSocket API.

Widget Embed (fastest)

Add the chatbot to any website with a single script tag and a custom HTML element (<web-chat-agent chatbot-id="...">). No framework, no build step. All colors, texts, and tools are configured in the dashboard and applied automatically. This is the right choice for 90% of websites.

  • Widget Embed Guide — Script tag, custom element, all HTML attributes, custom CSS, inline mode, and SPA usage

REST API

When you need your own chat interface — a mobile app, a custom web component, or a backend automation — call the chat endpoint directly. You send a message plus your chatbotId and receive an AI-generated reply with its sources. A session ID returned in a response header keeps multi-turn conversations coherent.

  • REST API Reference — Endpoints, domain auth, request/response fields, error codes, and code examples in cURL, JavaScript, Python, and PHP

WebSocket API

For live chat, where messages must arrive instantly and you want typing indicators, presence, and auto-translation. The same socket powers visitor widgets and the agent dashboard. Use it to build a custom agent console or to drive live chat from your own backend.

Which should I use?

Use caseRecommended
Add a chatbot to a websiteWidget Embed
Render the chat inside your own page layoutInline Widget (Widget Embed)
Custom chat UI or mobile appREST API
Server-to-server automation (no UI)REST API
Real-time live chat dashboard for human agentsWebSocket API

See Use Cases for concrete scenarios these integrations enable.