Prerequisites
Before you begin, you’ll need:- A Dial AI chat ID (see Creating a Chat ID below)
- The backend URL for your Dial AI instance
- A unique anchor ID for mounting the chat button
Creating a Chat ID
To generate a chat ID for your integration:- Navigate to the Flows section in your Dial AI dashboard
- Locate the flow you want to use for the chat
- Click the “Share” button in the top-right corner
- Click “Generate” to create a new chat ID
- Copy the generated chat ID to use in your integration

Basic Integration
Add the following to your HTML file, replacing the placeholder values as needed:- Load the widget script in your
<head>tag:
{version} with a specific release version (e.g. 0.0.1329) from the versions manifest.
- Add the mount point and initialization script:
Configuration Options
TherenderModal function accepts the following configuration options:
iconUrl(string, required): URL to the icon that will be displayed in the chat buttonchatId(string, required): Your unique Dial AI chat identifierbackendUrl(string, required): The base URL of your Dial AI instancebrandVariants(object, optional): Custom color scheme for the chat interface (see Brand Variants below)
Brand Variants
By default, the widget uses the theme configured for the chat link’s tenant. If you need to override this to match your site’s branding, pass abrandVariants object with color values on a scale from 10 (darkest) to 160 (lightest):
brandVariants to use the tenant’s default theme.
CORS Configuration
The widget script is served from our CDN with permissive CORS headers (Access-Control-Allow-Origin: *), so it can be loaded from any domain without additional configuration.
Troubleshooting
- If the chat button doesn’t appear, check your browser’s console for any error messages
- Ensure the anchor element with the specified ID exists in the DOM when the script runs
- Make sure the chat ID and backend URL are correct
Example Implementation
Here’s a complete example of how to integrate the chat button into a simple HTML page:Versions
The widget is hosted on our CDN athttps://cdn.dialai.ca/v1/esm/{version}/dial-ai.js. You can find available versions in the versions manifest. Pin to a specific release version to avoid unexpected changes.
ESM vs UMD
The widget is available in two module formats:- ESM (recommended) — loaded with
<script type="module">. This is the current format used for all new releases (/v1/esm/{version}/dial-ai.js). - UMD (legacy) — loaded with a plain
<script>tag. Older releases (pre-0.0.1323) were published in UMD format and remain available at/v1/umd/dial-ai-{version}.umd.jsfor backward compatibility.