data-* attributes on the script tag. All configuration is read when the widget initializes.
Configuration Options
The widget supports the following configuration attributes:Required Attributes
Required. The URL of your backend chat API endpoint.The widget sends POST requests to this endpoint with the message data:Example:
Required. Your widget API key for authentication.This key is sent in the
x-widget-api-key header with every request. It must match the WIDGET_API_KEY environment variable in your backend.Example:Optional Attributes
The title text displayed in the widget header.Example:Default value:
"Assistant"The initial message shown when the widget is opened for the first time.Example:Default value:
"Hi! Ask me anything and I will help you out."The placeholder text shown in the message input field.Example:Default value:
"Type your message..."The corner where the widget appears on the page.Accepted values: Default value:
"left" or "right"Example:"right"Any value other than
"left" will default to "right".The primary color used for the widget theme (header gradient, input focus, etc.).Accepted formats: Any valid CSS color (hex, rgb, hsl, color name)Example:Default value:
"#0ea5e9" (cyan/blue)Configuration Implementation
The widget reads configuration from the script tag’s dataset:Complete Configuration Example
Here’s an example with all options configured:Environment-Specific Configuration
You can use different configurations for development and production:Development
Production
Next Steps
Embedding
Learn how to embed the widget on your site
Customization
Customize the widget styling and behavior