Skip to main content
Add a Typewise chat to any page with a script tag and a few lines of JavaScript. No bundler or framework needed.

Load the SDK

The script-tag build exposes a global Typewise object:
The Typewise CDN always serves the version that is live on the platform.

Build a chat

This complete page renders the conversation, shows a typing indicator, and sends messages. Replace YOUR_CLIENT_ID and open it in a browser. The highlighted lines are the only SDK calls.
Each li gets the message’s role and status as classes, so you can style visitor messages, replies, and messages still sending.
textContent keeps the example safe from injected HTML. If you render message.content as markdown, sanitize the output first.

Open the chat from a button

The SDK doesn’t render a bubble, so you choose how the chat appears. For example, keep it in a hidden panel and show it on click:

Content Security Policy

If your site sends a CSP header, allow the script host in script-src and the API and real-time domains in connect-src. See Configure CSP.