# MonCha documentation This file is generated from the same articles as https://dev-moncha.com/docs/ — every sidebar page, in order. Canonical site: https://dev-moncha.com/ Dashboard: see links inside each article. Support: support@moncha.co Shorter map: https://dev-moncha.com/llms.txt Human-readable docs: https://dev-moncha.com/docs/ --- # Overview Everything you need to train, customize, and ship a MonCha support agent — from your first crawl to webhooks and voice. New here? Start with the [Quickstart](https://dev-moncha.com/docs/quickstart/) — you'll have a bot answering questions from your own website in about five minutes. ## Core ideas - **Grounded answers.** Your bot answers only from the knowledge base you give it, cites its sources, and declines when it doesn't know. - **One message = one answer.** Your customers' questions never count against your quota. - **Bots are independent.** Each bot has its own knowledge, design, conversations, and embed snippet. Extra bot slots are add-ons with isolated quotas. ## Pages - [Quickstart](https://dev-moncha.com/docs/quickstart/) - [Workspaces and access](https://dev-moncha.com/docs/workspaces/) - [Create and purchase bots](https://dev-moncha.com/docs/bots/) - [Transfer a bot](https://dev-moncha.com/docs/bot-transfer/) - [Knowledge base](https://dev-moncha.com/docs/knowledge-base/) - [Import from Notion](https://dev-moncha.com/docs/notion/) - [Import from Google Drive](https://dev-moncha.com/docs/google-drive/) - [Training, refresh and failures](https://dev-moncha.com/docs/knowledge-refresh/) - [Bot settings](https://dev-moncha.com/docs/bot-settings/) - [Test in Playground](https://dev-moncha.com/docs/playground/) - [Install the widget](https://dev-moncha.com/docs/install/) - [Customize the widget](https://dev-moncha.com/docs/customize/) - [Dictation and live voice](https://dev-moncha.com/docs/voice/) - [WhatsApp](https://dev-moncha.com/docs/whatsapp/) - [Email Inbox](https://dev-moncha.com/docs/inbox/) - [Work with inbox threads](https://dev-moncha.com/docs/inbox-operations/) - [Conversations and handoff](https://dev-moncha.com/docs/conversations/) - [Tickets and departments](https://dev-moncha.com/docs/tickets/) - [Contacts and visitor identity](https://dev-moncha.com/docs/contacts/) - [Leads](https://dev-moncha.com/docs/leads/) - [Bookings](https://dev-moncha.com/docs/bookings/) - [Email notifications](https://dev-moncha.com/docs/notifications/) - [Analytics and metrics](https://dev-moncha.com/docs/analytics/) - [Country and regional analytics](https://dev-moncha.com/docs/regions/) - [Scheduled chat summaries](https://dev-moncha.com/docs/chat-summaries/) - [Team roles and permissions](https://dev-moncha.com/docs/team/) - [Plans and quotas](https://dev-moncha.com/docs/plans/) - [Renewals and payment recovery](https://dev-moncha.com/docs/billing/) - [Billing history and receipts](https://dev-moncha.com/docs/invoices/) - [Usage pools and reset dates](https://dev-moncha.com/docs/usage/) - [Enterprise](https://dev-moncha.com/docs/enterprise/) - [API & Agents overview](https://dev-moncha.com/docs/api/) - [API tokens and scopes](https://dev-moncha.com/docs/api-tokens/) - [REST API reference](https://dev-moncha.com/docs/api-reference/) - [API errors and limits](https://dev-moncha.com/docs/api-errors/) - [MCP connections and tools](https://dev-moncha.com/docs/mcp/) - [Connect an MCP client](https://dev-moncha.com/docs/mcp-clients/) - [Functions](https://dev-moncha.com/docs/functions/) - [Webhooks](https://dev-moncha.com/docs/webhooks/) - [Webhook event reference](https://dev-moncha.com/docs/webhook-events/) - [Enterprise Vendor API](https://dev-moncha.com/docs/vendor-api/) - [Vendor integration workflow](https://dev-moncha.com/docs/vendor-recipes/) - [Sponsored bots and ownership](https://dev-moncha.com/docs/sponsorships/) - [Troubleshooting](https://dev-moncha.com/docs/troubleshooting/) --- # Quickstart From zero to a bot answering customers on your site — about five minutes. Human page: https://dev-moncha.com/docs/quickstart/ ## How to install MonCha From a new account to a live widget: create an account, train the bot on your site, then paste one script tag. ## 1. Create your account Sign up at [app.dev-moncha.com](https://app.dev-moncha.com/signup) with Google or email. Every new account starts on a 7-day Growth trial — no credit card. ## 2. Teach it your content Go to Knowledge Base → Add source and paste your website URL. MonCha discovers your pages, crawls them, and builds a searchable index. You can also upload PDFs and Word docs, add YouTube videos, write exact Q&A pairs, or paste raw text. Watch the status column — documents move from queued to processing to ready. Fresh content takes a minute or two to become searchable. ## 3. Try it Open Playground and ask your bot something only your website would know. If the answer is wrong or missing, add a Custom Response in the Knowledge Base — an exact Q&A pair always wins. ## 4. Make it yours Under Widget, set the bot name, colors, welcome message, and quick prompts, with a live preview. Under Bot settings, pick the reply language, persona, and what the bot should say when it doesn’t know. ## 5. Put it on your site Copy the snippet from Install and paste it before your closing tag: ``` ``` On WordPress? Use the [free plugin](https://dev-moncha.com/wordpress/) instead. Want the chat embedded inside a page rather than floating? See the Install guide. ## 6. Lock it down Each bot has its own Allowed domains list, under Bot settings, for the bot selected in the sidebar. Add every domain (and its subdomains are covered automatically) allowed to embed it — leaving the list empty allows any domain; adding even one locks that bot to only the listed domains, and it stops rendering elsewhere. ## What next - [Turn on voice so customers can just talk.](https://dev-moncha.com/docs/voice/) - [Capture leads and offer human handoff.](https://dev-moncha.com/docs/leads/) - [Watch what customers ask — especially the unanswered ones.](https://dev-moncha.com/docs/analytics/) --- # Workspaces and access Choose the right workspace and understand ownership and bot access. Human page: https://dev-moncha.com/docs/workspaces/ **Before you start:** Sign in with the account that owns the workspace or has accepted its invitation. ## Choose the workspace before the bot A workspace owns its subscription, team and bots. A bot has its own knowledge, settings, widget and conversation history. The workspace selector and bot selector in the dashboard are different controls. A team member can belong to another person’s workspace without becoming its billing owner. 1. Open the Workspace selector in the dashboard sidebar. 2. Select your personal workspace or a team workspace you have joined. 3. Select the bot you intend to manage. 4. Confirm both selections before changing knowledge, integrations or settings. ## What access follows your account The workspace owner controls billing and ownership. Admins manage day-to-day configuration and integrations. Agents work on support and leads. Members have read access. Bot assignments further limit which bots a teammate can access; a role does not override the assigned bot list. - [Full role and permission matrix](https://dev-moncha.com/docs/team/) ## A workspace or bot is missing - Accept the invitation using its intended email address. Signing into another account does not accept it. - Ask the workspace owner to check your membership and bot assignments. - If you recently changed accounts, reload and confirm the account currently signed in. - An API token belongs to the workspace where it was created. Switching the dashboard does not retarget an existing token. --- # Create and purchase bots Understand trial bots, included slots, extra bots and enterprise tiers. Human page: https://dev-moncha.com/docs/bots/ **Before you start:** Owners and admins can create/configure bots. Purchases and billing management require the workspace owner. ## Choose the right kind of bot | Situation | How capacity works | | --- | --- | | New account / active trial | The trial includes one bot. Subscribe before adding more bots. | | Paid standard plan | Use an available included slot. Bots using the plan pool share that pool’s allowances. | | Extra bot purchase | Purchase a slot with its own Starter, Growth or Scale allowances. Its subscription and renewal are visible in Billing. | | Enterprise workspace | Choose a Starter, Growth or Scale tier with available contract capacity. Each enterprise bot has its tier allowance. | | Sponsored customer bot | A separate Vendor authorization flow creates a customer-owned bot funded by the enterprise. See Sponsored bots. | ## Create, train and publish 1. Open Bots and choose the create action. 2. Enter a unique name. For enterprise, select a tier with an available slot. 3. If included capacity is full, the owner purchases the required extra slot or adjusts the contract. 4. Wait for payment confirmation and the dashboard to show the available bot/slot. 5. Select the new bot, add knowledge and test in Playground. 6. Copy the installation snippet for that bot. Each bot has its own ID; an old snippet continues to target the old bot. ## Purchase and lifecycle checks Opening the checkout success URL does not itself activate a purchase. MonCha waits for confirmed payment. Refresh Billing after checkout and check the owner account if the bot has not appeared. Avoid buying the same slot again while confirmation is pending. - A duplicate bot name requires a new name; use the suggested alternative if shown. - An enterprise tier can be full even if another tier has spare slots. - Review an extra bot’s billing term before removing or cancelling it; cancellation and deletion have different purposes. - Use a transfer request to move ownership, rather than sharing your owner login. --- # Transfer a bot Check recipient eligibility and complete an ownership transfer. Human page: https://dev-moncha.com/docs/bot-transfer/ **Before you start:** The sending workspace owner initiates a transfer. The recipient needs a MonCha account, an eligible paid subscription and an available bot slot. ## Before sending a request A free account or ordinary free trial cannot receive a bot transfer. The recipient’s paid subscription must be in good standing and its available capacity is checked. If the recipient has no account, invite them to sign up first; send the transfer after they meet the requirements. You cannot transfer to your own account. ## Complete the transfer 1. Open the bot’s transfer controls as the owner. 2. Enter the recipient’s account email and review the eligibility result. 3. Send the transfer request. 4. The recipient opens the transfer invitation and signs in with the invited email. 5. The recipient reviews the bot and accepts or rejects the request. 6. After acceptance, both parties verify ownership in the dashboard and the recipient checks the bot’s setup and installation details. ## If acceptance fails - Wrong account/workspace: use the exact invited account, including its verified email. - No free slot or subscription no longer eligible: restore eligibility, then retry the pending request if still valid. - Request expired, already handled or no longer valid: review the displayed state and ask the sender for a new request. - Do not confuse transfer with a sponsored-bot payment takeover; sponsorship has its own consent and funding flow. - [Sponsored bots and ownership](https://dev-moncha.com/docs/sponsorships/) --- # Knowledge base Everything your bot knows. It answers only from here — nothing else. Human page: https://dev-moncha.com/docs/knowledge-base/ ## Sources you can add - **Website** — paste a URL. MonCha finds linked pages (set crawl depth and include/exclude paths) and lets you pick which to ingest. - **Sitemap** — point at `sitemap.xml` to pull a clean list of pages. - **Files** — upload PDF, DOCX, XLSX, XLS, TXT, CSV or MD, up to 10 MiB per file. - **YouTube** — paste a video URL; the transcript becomes searchable content. - **Text snippets** — paste content that lives nowhere on your site. - **Custom responses** — exact question/answer pairs. For connected content, use the [Notion](https://dev-moncha.com/docs/notion/) or [Google Drive](https://dev-moncha.com/docs/google-drive/) import guide. These imports are text snapshots; website auto-sync does not refresh them. ## Custom responses are your override switch When a bot answers something wrong, don't fight the crawler — add a Custom Response. You write the question and the exact answer, and it wins over crawled content. This is the fastest way to fix a bad answer, and the most reliable way to control high-stakes replies (refunds, pricing, policies). ## Advanced crawl options When adding a website you can control what gets read: - **Main content only** — strips navigation, headers, and footers (on by default). - **Include / exclude CSS selectors** — target `main` or drop `.comments`. - **Include / exclude paths** — crawl `/docs/*` but skip `/blog/*`. - **Custom headers** — pass an `Authorization` or `Cookie` header to crawl protected pages. - **Depth & max pages** — how far to follow links, and a hard cap. ## Keeping content fresh - **Manual resync** — re-crawl one document, or all of them, any time. - **Auto-sync** — MonCha re-crawls on a schedule set by your plan (monthly on Growth, weekly on Scale). Use manual sync when you need an earlier refresh; scheduled processing does not guarantee next-day updates. Deleting a document removes its content from the bot immediately, and frees the pages back into your quota. ## How pages are counted One page = 2,500 characters of cleaned text. A long article may count as several pages; a short one counts as one. Re-syncing a document doesn't double-count it — only the difference is applied. ## Suggest FAQs from your content On the **Widget** page, *Suggest from knowledge base* reads what you've indexed and proposes quick prompts your customers are likely to ask. Review them, keep the good ones. ## Per-bot knowledge Each bot has its own knowledge base. Switch bots with the selector at the top of the sidebar — the Knowledge Base page always shows the selected bot's content. Your plan includes 1–3 bots; buy extra bot slots on Billing if you need more. Extra bots have their own page quota (same as that SKU's plan), not shared with the plan pool. See [Plans & quotas](https://dev-moncha.com/docs/plans/). --- # Import from Notion Authorize Notion, select shared pages and import into the selected bot. Human page: https://dev-moncha.com/docs/notion/ **Before you start:** An owner or admin connects the provider. You need permission to share the relevant Notion pages and capacity in the bot’s knowledge allowance. ## Connect and import pages 1. Select your workspace and destination bot, then open Integrations. 2. Choose Connect for Notion and authorize the intended Notion workspace/pages. 3. Return to MonCha and load the available page list. 4. Select the pages to import. A request supports up to 50 pages. 5. Start the import, then open Knowledge Base to track processing. 6. Wait for the documents to be ready and ask a question about the imported content in Playground. ## What is imported MonCha reads the selected page content and queues text-backed knowledge documents. An import is a snapshot of readable content. Notion imports do not become publicly crawled Notion URLs, and the website auto-sync schedule does not automatically refresh these snapshots. Re-import changed content deliberately and remove obsolete duplicates from Knowledge Base. ## Troubleshoot or disconnect - Missing pages: confirm that the integration has access to them in Notion. - Authorization denied or expired: reconnect the intended account from Integrations. - Some pages did not queue: empty/unreadable pages can be skipped; inspect the resulting knowledge list. - Disconnect stops access to the provider connection. Remove imported knowledge separately if it should no longer be used by the bot. - If Connect is unavailable, provider setup may not be enabled in this environment; contact support. --- # Import from Google Drive Connect Google, select supported files and track the import. Human page: https://dev-moncha.com/docs/google-drive/ **Before you start:** An owner or admin connects Google Drive. Use an account that can read the intended source files and select the destination bot before importing. ## Connect and import 1. Open Integrations and connect Google Drive. 2. Complete Google consent using the account containing the documents. 3. Return to MonCha and load the available supported files. 4. Select the files and import them; each request accepts up to 50 selections. 5. Review the queued documents in Knowledge Base. 6. When processing completes, verify the content with a source-specific question in Playground. ## Refresh and account changes Drive content is extracted into text-backed knowledge documents. Website auto-sync does not re-fetch the private Drive file. Import updated content when the source changes, and remove obsolete knowledge when appropriate. Disconnecting Google removes the connection; it does not automatically erase previously imported documents. ## When an import is incomplete - Check that you connected the correct Google account and can open the file there. - Use the supported files shown by the picker; an empty or unsupported file may not produce a knowledge document. - Reconnect if loading files fails or the provider permission was revoked. - Check the import’s queued count and each document’s processing status instead of assuming every selected file succeeded. - For a one-off file, you can also download a supported format and upload it through Knowledge Base. --- # Training, refresh and failures Read processing states, retry failed knowledge and understand auto-sync. Human page: https://dev-moncha.com/docs/knowledge-refresh/ **Before you start:** Owners and admins manage knowledge. Processing and refresh are subject to the selected bot’s page allowance. ## Read the processing state | State | Meaning | Next action | | --- | --- | --- | | Queued | Accepted for processing; the answer index is not ready yet. | Wait and refresh the knowledge list. | | Processing | Content is being extracted and indexed. | Allow processing to finish before testing new content. | | Ready | The document has been indexed. | Test a specific fact and inspect the cited source. | | Failed | Extraction or indexing could not finish. | Read the displayed error, correct the source and retry. | ## Manual refresh and auto-sync Use the document refresh/sync action when a public website page changes and you need a new crawl. Growth website auto-sync is monthly; Scale is weekly. Contract settings can differ. A scheduled crawl is not a promise that content published tonight will be indexed tomorrow. - A login-protected page, blocked crawler or inaccessible URL may not provide readable content. - Files and imported Notion/Drive text are snapshots; replace/re-import changed content. - Do not repeatedly queue the same source while its existing job is running. - Quota admission can prevent additional knowledge from being queued; check Usage and the selected bot. ## Verify an update 1. Open the exact source and confirm the new fact is present. 2. Refresh or re-import the correct knowledge document. 3. Wait for Ready and check the last synced/processing information. 4. Ask a narrow question in a fresh Playground conversation. 5. If the answer is stale, check for another document containing the old fact and correct that source too. --- # Bot settings How your assistant thinks, sounds, and answers. Human page: https://dev-moncha.com/docs/bot-settings/ ## Model - **Fast** — best for most support queries. Quick, cheap, accurate on grounded answers. - **Quality** — deeper reasoning for complex or nuanced questions. Slower. ## Language **Default language** sets the first message and the fallback when nothing else is detected. Chat works in all 24 languages. Configure and test the selected voice mode for your bot language — see [Voice](https://dev-moncha.com/docs/voice/). **Language behavior** controls switching: - **Match the visitor** (recommended) — the widget auto-detects the page language (from ``, the URL like `/jp`, or the browser) and greets in it; if the customer then writes in another language, the bot follows theirs. - **Fixed** — always reply in the default language, whatever the visitor writes. **Supported languages** is the allowlist the bot may switch into — leave all on, or restrict it (e.g. only English + Japanese). Answers come from your knowledge base in whatever language you wrote it; MonCha bridges the language at answer time, so you don't maintain a separate KB per language. To translate the welcome message and quick prompts per language, use the widget's Localization tab. See [Install](https://dev-moncha.com/docs/install/) for per-page overrides. ## Conversation memory How many previous exchanges the bot considers when replying (0–6). Higher means better follow-up questions (“and how much does *that* cost?”), at slightly higher cost per message. ## Fallback message Sent verbatim when the knowledge base has nothing relevant. This matters: without a good fallback, a bot that doesn't know sounds evasive. A good one moves the customer forward — *“I don't have that yet. Email support@yourcompany.com and we'll sort it out.”* MonCha never invents answers from general knowledge. If your content doesn't cover it, the bot says so. ## Instructions vs. persona They're separate on purpose: - **Instructions** — rules the bot must follow. What to do, what to avoid, how to structure answers. - **Persona** — tone and voice. Warm and enthusiastic, or precise and formal. ## User data collection Ask visitors for their name, email, or phone before or during the chat. Set it to **optional** (skippable) or **mandatory** (chat is blocked until submitted). Captured contacts land on your [Leads](https://dev-moncha.com/docs/leads/) page and trigger an email. ## Notification email Where new leads, “talk to a human” requests, and [booking](https://dev-moncha.com/docs/bookings/) requests are sent. Defaults to your login email; set a shared inbox here if your team handles support together. ## Delete a bot In Bot settings (or the Bots list), delete requires typing the bot name exactly. Once deleted, the widget stops appearing on integrated sites immediately — even if the embed snippet is still on the page. Remove the script when you can; see [Install → Uninstall / delete a bot](https://dev-moncha.com/docs/install/). Deleting an extra bot does **not** cancel the paid slot. The slot stays on your subscription until you remove it on Billing. See [Plans & quotas → Buy Extra bots](https://dev-moncha.com/docs/plans/). ## Active / inactive Use the **Active / Inactive** toggle next to Rename on Bot settings to take a bot offline without deleting it. While inactive, the widget stops showing on your website (same as a deleted bot for visitors). Playground, knowledge base, and the rest of the dashboard keep working so you can keep editing. Turn it back to Active and the widget appears again on the next page load. --- # Test in Playground Check answers, fallback and changes before visitors use your bot. Human page: https://dev-moncha.com/docs/playground/ **Before you start:** Open Playground for the selected bot. Test calls use the bot’s configured knowledge and available service access; monitor Usage when testing. ## Run a useful launch check 1. Select the bot and confirm its source documents are Ready. 2. Ask a question with a known answer in your content. 3. Check the answer and source links against the actual source. 4. Ask a question that your content does not answer and inspect the fallback. 5. Try a follow-up question and another supported language relevant to your audience. 6. Repeat after changing the persona, instructions or knowledge. ## Test the installed channel too Playground validates answer behavior. The installed website widget, WhatsApp and email have their own setup and visitor interactions. Test the real channel to check domain permissions, forms, microphone access, ticket creation and booking requests. Use test identities and a suitable workspace when creating sample leads or sending notifications. ## Improve a weak answer - Wrong fact: correct the source and refresh knowledge. - Missing fact: add a concise document or Q&A with the answer. - Wrong tone: update the persona/instructions, then retest. - No answer after an import: confirm that processing finished for the selected bot. - Access or quota error: check Billing and Usage before changing the prompt. --- # Install the widget Three ways to put your bot in front of customers. Human page: https://dev-moncha.com/docs/install/ ## Install with an AI agent (fastest) If you use **Claude Code**, **Cursor**, **GitHub Copilot**, **Codex**, or **Windsurf**, you don't have to edit anything by hand. Paste this one line into your agent: ``` Fetch https://dev-moncha.com/agent-setup/prompt.md and follow it to install MonCha on this site. My tenantId is YOUR_TENANT_ID. ``` Your agent reads the published instructions, detects your framework (Next.js, React, Vue, Astro, WordPress, Shopify…), drops the widget in the right place, wires up multilingual pages correctly, and connects the MonCha [MCP server](https://api.dev-moncha.com/mcp) so it can manage your bot — add knowledge, ask the bot, pull analytics — without leaving your editor. Grab your Tenant ID from **Dashboard → Install** (it's pre-filled in the copy button there). The instructions are published at `https://dev-moncha.com/agent-setup/prompt.md`, so you or your agent can verify them at any time. Prefer to do it manually? Everything below gives the same result. ## Floating bubble (most common) Paste this before your closing `` tag. The launcher appears in the corner; the design comes from your dashboard, so you never need to change this snippet again. ``` ``` ### Running more than one bot? Pass the bot's id — find it on the Install page after selecting that bot. Plan-included bots and extra bots both embed this way: ``` MonCha.init({ tenantId: 'YOUR_TENANT_ID', chatbotId: 'YOUR_BOT_ID' }); ``` ## Inline (embedded in a page) Puts the chat inside a page — a help center, a contact page — instead of a floating bubble. No script needed; it's an iframe: ``` ``` Keep `allow="microphone"` if you want voice to work inside the iframe. Add `?chatbotId=…` to the src to pick a specific bot. Because an iframe can't see the host page's language, pass it explicitly per language variant — `?language=ja-JP` (e.g. use the iframe on your `/jp` page with `…/embed/YOUR_TENANT_ID?language=ja-JP`). ## Inline container (no iframe) Prefer to render the chat directly in your page markup (no iframe isolation)? Add a `div` with the widget class and your IDs, then load the script with `?hideBubble=true`. The widget mounts inside the div automatically — no `init()` call, and you can add as many containers as you like: ```
``` ## WordPress Install the [free MonCha plugin](https://dev-moncha.com/wordpress/), paste your Tenant ID under **Settings → MonCha**, and the widget appears site-wide. No theme editing. ## Options reference - `tenantId` — required. From **Dashboard → Install**. - `chatbotId` — optional. Defaults to your first bot. - `mode` — `'floating'` (default) or `'inline'`. - `hideButton` — keep the floating widget but hide its bubble; open it only via `MonCha.open()`. - `primaryColor`, `position`, `language` — override the dashboard settings for this embed only. ## Control it from your code (SDK) After the snippet loads, `window.MonCha` lets you drive the widget from your own buttons, links, or app logic: ``` MonCha.open() // + close() / toggle(); open({ reset: true }) starts fresh MonCha.isOpen() // true/false MonCha.sendMessage('What are your pricing plans?') // send now MonCha.prefill("Hi, I'd like help with…") // fill the box, user edits & sends MonCha.reset() // start a new conversation MonCha.reload() // re-mount after client-side navigation // Steer the bot for the current page (prepends/appends to its instructions) MonCha.setContext({ prefix: 'You are a sales assistant. Guide users to book a demo.', suffix: 'Current page: Pricing', }) MonCha.setCss(':host #header { background: #072A54 }') // custom CSS ``` Migrating from another provider? The same actions also work as a command queue — `MonCha.push(['do','message:send','hi'])`, `MonCha.push(['set','context',[prefix, suffix]])` — and can be buffered before the script loads with `window.MonCha = window.MonCha || []`. ### Identify signed-in visitors If your site has logged-in users, call this after login (and again on logout to clear it) so their [leads](https://dev-moncha.com/docs/leads/) and [tickets](https://dev-moncha.com/docs/tickets/) carry their real name/email instead of relying on the AI to extract them: ``` MonCha.identify({ userId: 'usr_8f21', email: 'priya@example.com', name: 'Priya Sharma' }) ``` Add a server-computed `userHash` — HMAC-SHA256 of `userId` with the identity secret shown on **Dashboard → Install** — to prove the identity. That verifies the visitor, so their tickets follow them across devices/browsers instead of staying tied to one. Without it, `identify()` still labels the contact, just per-device. ## Languages — one snippet, every language You don't need a different snippet per language. The widget detects the page language **once, when `MonCha.init()` runs**, in this order: an explicit `language` passed to `init()` (if not `'auto'`) > `` > a `?lang=`/`?locale=`/`?language=` query string > the URL path (e.g. `/jp/`) > the visitor's browser — then greets and replies in it, limited to the languages you allow in [Bot settings → Language](https://dev-moncha.com/docs/bot-settings/). A visitor on `/jp` gets a Japanese bot automatically; one on `/th` gets Thai. If your site carries the locale in a non-standard query key, name it with `langParam` — e.g. `langParam: 'ui_lang'` reads `?ui_lang=jp`. To pin one fixed language on a page instead of auto-detecting, pass `language`: ``` MonCha.init({ tenantId: 'YOUR_TENANT_ID', language: 'ja-JP' }); ``` Codes: `en-IN`, `ja-JP`, `ko-KR`, `zh-CN`, `ms-MY`, `id-ID`, `th-TH`, `vi-VN`, `fil-PH`, `ar-AE`, `hi-IN`, `ta-IN`, `sw-KE`, `ha-NG`, `yo-NG` and more. The same `language` field works on the [REST API](https://dev-moncha.com/docs/api/) `/chat` call and the MCP `ask_bot` tool. ### Header language switcher → widget language (no page reload) **Required:** when the visitor changes language in your site header, the MonCha widget must switch too — greeting, UI, and replies — **immediately, with no page reload**. Because language is resolved once at `init()`, a header / SPA switcher that changes locale without a full reload needs an explicit call. Don't call `MonCha.init()` from a static `index.html` in that case; call it once your i18n store is ready, then call `MonCha.setLanguage()` on every header locale change: ``` // After your i18n store resolves the initial locale: MonCha.init({ tenantId: 'YOUR_TENANT_ID', language: 'ta-IN' }); // On every header language change — widget updates live, no reload: MonCha.setLanguage('ja-JP'); ``` `setLanguage()` swaps the widget language in place — no refresh, no manual cleanup, and no duplicate widget even if you call `init()` more than once. Acceptance test: change language in the header → widget greeting/UI updates immediately. ## Allowed domains Domain lock is **per bot**, not account-wide. Select the bot in the sidebar, then go to **Bot settings → Allowed domains** and list the domains permitted to embed *that* bot — every other bot keeps its own separate list. A domain you add also covers its subdomains automatically (e.g. adding `example.com` allows `app.example.com` too). By default the list is empty, which means the widget loads on **any** domain — fine for testing, but it also means anyone who copies your snippet can embed your bot and spend your quota. Add at least one domain to lock it down: once a bot has one or more domains listed, its widget stops rendering everywhere else, and the chat/token/lead/ticket APIs reject requests from origins that aren't on the list. Remove every domain again and the bot goes back to allowing all origins. ## Uninstall / delete a bot Deleting a bot from the dashboard removes it immediately. On the next page load, the widget checks your bot id with MonCha — if that bot is gone, **the chat bubble does not render**, even if the embed snippet is still in your site's HTML. The snippet itself is just a script tag on your frontend, so MonCha cannot delete that file for you. After you delete the bot: - The widget disappears from integrated sites right away (no bubble, no chat). - You should still remove the MonCha `