Developers
Widget & JS API
The chat widget is a single script tag. It renders a launcher, handles the visitor session, and streams the conversation over a WebSocket — you only configure it and, optionally, drive it from your own UI.
Install
Set your workspace ID, then load the script. Put this before </body>:
<script>
window.__everychan = {
workspaceId: "YOUR_WORKSPACE_ID",
// teamId: "OPTIONAL_TEAM_ID" // route to a specific team
};
</script>
<script src="https://everychan-app.dashka.io/widget/widget.js" async></script>Appearance (colour, position, welcome message, pre/post-chat forms) is configured per team in the app under Widget — the script fetches it at load, so you don't hard-code it here.
Control it from JavaScript
Once loaded, the widget exposes window.everychan_widget:
everychan_widget.open(); // open the panel
everychan_widget.close(); // collapse to the launcher
everychan_widget.toggle();
everychan_widget.status; // "open" | "closed"
everychan_widget.onOpen = () => console.log("opened");
everychan_widget.onClose = () => console.log("closed");For example, wire a “Chat with us” button on your pricing page to everychan_widget.open().
allowedDomains) so it can't be embedded elsewhere.Under the hood
If you are building a fully custom client instead of using the drop-in widget, the same two primitives are public:
POST /api/visitors/get_token— mint a visitor session (see Authentication).GET /api/public/widget-config?workspaceId=…— the merged appearance, business-hours state, and active proactive messages.
The conversation itself runs over the chat WebSocket, authorised with the visitor token.