DocsConfiguration

SDK Configuration

The `init` method accepts a configuration object that controls how the SDK connects to your chatbot and how it behaves on your page.

Configuration Options

OptionTypeRequiredDescription
subdomainstringYesYour chatbot's unique identifier (e.g., 'my-bot').
apiUrlstringNoCustom backend API URL if you are self-hosting.
userContextobjectNoMetadata about the current user to personalize the chat.
debugbooleanNoEnable verbose logging in the console (default: false).
widgetShape'circle' | 'rounded-square'NoShape of the floating widget button (default: 'circle').
widgetSize'small' | 'medium' | 'large'NoSize of the floating widget button (default: 'medium').

Advanced Example

init({
subdomain: 'support-bot',
userContext: {
userName: 'John Doe',
plan: 'premium'
},
widgetShape: 'rounded-square',
widgetSize: 'large',
debug: true
});