Skip to main content

API Reference

Complete reference documentation for the DialogKit ChatBox SDK.

Core APIs

  • Initialization - SDK constructor and configuration
  • Methods - All available methods (Coming Soon)
  • Events - Event listeners and callbacks (Coming Soon)
  • Configuration - Configuration object schema (Coming Soon)
  • Types - TypeScript type definitions (Coming Soon)

Quick Reference

Constructor

new ChatBoxSDK(config)

Essential Methods

chatbox.open()        // Open the widget
chatbox.close() // Close the widget
chatbox.toggle() // Toggle widget visibility
chatbox.setContext() // Update context variables
chatbox.destroy() // Remove widget completely

Event Listeners

chatbox.on('ready', () => {})
chatbox.on('open', () => {})
chatbox.on('close', () => {})
chatbox.on('message', (data) => {})

TypeScript Support

The SDK includes full TypeScript type definitions:

import ChatBoxSDK from '@dialogkit/chatbox-sdk';

const chatbox: ChatBoxSDK = new ChatBoxSDK({
apiKey: 'YOUR_API_KEY'
});

Next Steps