# LaunchChat > AI-powered support chatbot that transforms your documentation into an embeddable widget. ## Quick Start Upload your docs (Word, Markdown, Text, Notion) and get a chat widget in 5 minutes. ## Widget Integration ```html ``` ## Widget JavaScript API ```javascript // Open the chat window window.NotionChatWidget.open() // Close the chat window window.NotionChatWidget.close() // Send a message programmatically window.NotionChatWidget.sendMessage("How do I get started?") // Listen to events window.NotionChatWidget.on("message", (data) => { console.log("New message:", data.content) }) // Remove event listener window.NotionChatWidget.off("message", callback) // Destroy the widget window.NotionChatWidget.destroy() ``` ## Events | Event | Description | Data | |-------|-------------|------| | `open` | Chat window opened | `{ timestamp }` | | `close` | Chat window closed | `{ timestamp }` | | `message` | Message sent/received | `{ content, role, messageId }` | | `escalate` | User requested human support | `{ email, message }` | | `feedback` | User gave feedback | `{ messageId, type: 'positive' | 'negative' }` | ## Configuration Options ```javascript window.NotionChatConfig = { widgetId: "required-widget-id", // Required primaryColor: "#6366f1", // Brand color (hex) greeting: "Hi! How can I help?", // Welcome message placeholder: "Type your question...", position: "bottom-right", // or "bottom-left" theme: "light", // "light", "dark", or "auto" } ``` ## API Endpoints ### Chat API ``` POST /api/widget/chat Content-Type: application/json { "widgetId": "your-widget-id", "message": "User question here", "conversationId": "optional-conversation-id" } ``` ### Widget Config ``` GET /api/widget/config/[widgetId] ``` ## Supported File Formats - Microsoft Word (.docx, .doc) - Markdown (.md, .markdown) - Plain Text (.txt) - Notion pages (via OAuth connection) - Website crawling (via URL) ## Links - Documentation: /docs - API Reference: /api-docs - Dashboard: /dashboard