Skip to Content
    Qafka
    CTRL K
    CTRL K
    • Introduction
      • Quick Start (React Native)
      • Quick Start (Website)
      • React Native Configuration
      • Overview
      • npm & React
      • Options Reference
      • WordPress
      • React Native Widget
      • Headless SDK
      • Theming
      • Context
      • Navigation
      • External Navigation
      • Handling Tools
      • Voice Chat
      • Sub-Projects
      • Error Handling
      • CLI
      • Dashboard
      • Onboarding
      • Invitations
      • Billing
      • Usage
      • Settings
      • Sign-in & Account
      • Dashboard Assistant
        • Project
        • Overview
        • Conversations
        • Chat Test
        • Sub-Projects
        • Analysis
        • Unanswered Questions
        • Insights
        • Configuration
        • AI Behavior
        • Members
        • Documents
          • Overview
          • Create with AI
          • Versions
          • Response Channel
        • Action Logs
        • Navigation Rules
        • External Destinations
        • Chat Theme
        • PII Masking
        • Websites
        • Mobile Apps
        • API Keys
        • Project Settings
      • API Key Security
    • Introduction
      • Quick Start (React Native)
      • Quick Start (Website)
      • React Native Configuration
      • Overview
      • npm & React
      • Options Reference
      • WordPress
      • React Native Widget
      • Headless SDK
      • Theming
      • Context
      • Navigation
      • External Navigation
      • Handling Tools
      • Voice Chat
      • Sub-Projects
      • Error Handling
      • CLI
      • Dashboard
      • Onboarding
      • Invitations
      • Billing
      • Usage
      • Settings
      • Sign-in & Account
      • Dashboard Assistant
        • Project
        • Overview
        • Conversations
        • Chat Test
        • Sub-Projects
        • Analysis
        • Unanswered Questions
        • Insights
        • Configuration
        • AI Behavior
        • Members
        • Documents
          • Overview
          • Create with AI
          • Versions
          • Response Channel
        • Action Logs
        • Navigation Rules
        • External Destinations
        • Chat Theme
        • PII Masking
        • Websites
        • Mobile Apps
        • API Keys
        • Project Settings
      • API Key Security

    On This Page

    • Core
    • Visitor identity & tools on web
    • Context
    • Appearance
    • Voice (advanced)
    • Agent cursor
    • Callbacks
    • Status
    Question? Give us feedback Edit this page 
    Web SDKOptions Reference

    Options Reference

    Every option createQafka() (and <Qafka />, with the same names as props) accepts.

    Core

    OptionTypeDescription
    publishableKeystringRequired. Your project’s Web key.
    apiUrlstringOverrides the backend URL. Defaults to https://api.qafka.com.
    subProjectIdstringRoutes the conversation to a specific sub-project instead of the parent. See Sub-Projects.
    mode'floating' | 'inline'floating (default) shows a chat bubble that opens a panel. inline renders the widget directly into a container you provide — no bubble.
    containerHTMLElement | stringRequired when mode: 'inline'. An element, or a CSS selector resolved at mount.

    Visitor identity & tools on web

    Every web session is minted at the anonymous trust tier server-side — neither of these options changes that, and neither unlocks tools. Tool availability on web is controlled separately, in the dashboard’s tool editor (Platform must include Web, Web access must be “Open on web (incl. anonymous)”) — see Web SDK Overview › Visitor identity & tools on web.

    OptionTypeDescription
    endUserIdstringA client-supplied grouping id for the conversation — not a verified identity. Throws if passed as an empty or whitespace-only string.
    endUserDataRecord<string, unknown>Extra data alongside endUserId, never sent to the LLM (unlike context) unless a tool’s Description references it with {{endUser.*}}.
    isAuthenticatedbooleanWhether your own app considers the visitor signed in — gates which navigation screens the assistant may suggest. Does not affect tool availability or identify the visitor to the backend. See Navigation › Filtering by Auth State.

    Context

    OptionTypeDescription
    contextobject | () => objectFacts the assistant may use to personalize answers, flattened into the prompt as key: value lines and available to tool templates as {{user.<key>}}. Pass a function to have it re-read on every request. The reserved key navigation feeds the navigation entity catalog instead of the prompt. See Context.
    contextDescriptionstringOne sentence describing the screen the visitor is currently on (e.g. "User is viewing the pricing page"). Shown to the model above the rest of the context, not flattened into it.
    localestringExplicit reply language ('tr' or 'en'). Also sets the widget’s UI-chrome language; omit to auto-detect the UI language from the browser (the reply language is only ever set when you pass this explicitly).

    Appearance

    OptionTypeDescription
    themePartial<WebThemeTokens>Overrides individual theme tokens on top of the project’s configured chat theme.
    assistantNamestringOverrides the assistant’s display name for this mount.
    logoUrlstringOverrides the assistant’s avatar/logo for this mount.
    greetingMessagestringOverrides the greeting message shown when the chat opens.
    placeholderstringOverrides the message composer’s placeholder text.

    All appearance options override the project’s dashboard-configured theme/branding for this mount only — they don’t change the project’s saved settings.

    Voice (advanced)

    OptionTypeDescription
    workletUrlstringOverrides where voice mode’s AudioWorklet asset is loaded from — only needed for unusual CSP or self-hosting setups.

    Agent cursor

    OptionTypeDescription
    agentCursorbooleanOpt-in, default false. See Web SDK Overview › Agent cursor.

    Callbacks

    CallbackFires when
    onReadyThe widget has finished mounting.
    onErrorA mount or theme-fetch failure occurs — and separately, for a message/stream failure, a tool error, or calling openVoice() when voice isn’t enabled for the project. Not called for the unavailable status (suspended project).
    onStatusChangeLifecycle status changes — see Status below. Fires when the initial config fetch settles (never with loading). Captured once, at mount — update() doesn’t replace it, and in the React wrapper a new function passed on a later render has no effect.
    onMessageSentThe visitor sends a message.
    onResponseReceivedA response arrives.
    onToolSuggestedThe assistant suggests one or more tools.
    onToolDataRequestedA tool needs host-supplied data to run; return it (sync or async) from this callback.
    onNavigationSuggestThe assistant suggests a navigation destination.
    onNavigationActionThe visitor acts on a navigation suggestion. Supplying this replaces the SDK’s own default web navigator entirely.
    onExternalSuggestionThe assistant suggests an external destination (WhatsApp, phone, a link, …). Not called for media cards (embed/document) — the widget draws those itself.
    onActionResultOne or more triggered actions finish, with their success/failure.
    onStepCompletedA multi-step tool completes a step.
    onCloseThe visitor closes the widget (floating mode only).

    Status

    getStatus() and onStatusChange report one of:

    StatusMeaning
    loadingInitial state, until the chat-theme fetch settles.
    readyFully mounted.
    unavailableThe project is suspended. This is an expected, neutral state — it does not also fire onError.
    errorA mount or theme-fetch failure. onError also fires here, but it fires for other things too — see the callback table above.

    See Errors for the general error-handling model.

    Last updated on October 1, 2026
    npm & ReactWordPress

    © 2026 Qafka Labs OÜ