Documentation

Configuration

Every prop and config field the widget accepts.

The widget reads configuration from two places. Props are passed to the AppmintChat.init(config) call at mount time (whether you call it directly from a <script> tag or via a small React wrapper). Server config lives in AppEngine as a chat-config record and controls runtime behaviour the widget loads on boot — branding, AI assistants, availability windows, the welcome screen, and gating rules.

Mount-time props

These are the values you set in code. Required props are marked.

FieldTypeDescription
orgId*string

The AppMint tenant id. Same value as the orgid HTTP header used everywhere else in AppEngine. Sent on every chat config fetch and stored on the socket auth payload.

configId*string

The id of a chat-config record in your org. Decides the widget's branding, AI assistants, queue behaviour, and gate rules. Create one in the admin UI under Chat > Configs.

appId*string

A label for the surface the widget runs on (chat-client, storefront, support, marketing). Stamped onto every event and message so analytics can attribute traffic.

containerIdstring

The id of the DOM element to mount into. Required by every install path (the script-tag pattern, the React wrapper, and the Next.js wrapper all pass it through to init). Defaults to appmint-chat-client when omitted.

theme'light' | 'dark' | object

Either a string token (light / dark) or a custom theme object that overrides Tailwind tokens. See Theming for the supported keys.

languagestring

A locale code matching a folder in src/locales/ (en, de, …). Defaults to the browser language detected by i18next-browser-languagedetector. See i18n.

defaultPathstring

Forces the panel to land on a specific screen. Valid values: /, /register, /chat, /chat-ai, /chat-agent, /help, /setting. Defaults to /.

mode'chat' | 'qa'

chat mounts ChatApp (the standard floating-bubble experience). qa mounts ChatQAApp, the email-gated knowledge-base flavour. See Modes.

userobject

Pre-populates the visitor identity so the registration screen is skipped. Shape: { email, firstName, lastName, phone? }.

tokenstring

JWT issued by AppEngine for the visitor. When supplied alongside user, the widget restores the session immediately and opens the socket on first interaction.

appKeystring

Optional API key used by the script-tag bundle for the initial config fetch when the visitor isn't yet authenticated. Treat as public — it grants only chat-config read access.

classNamestring

Extra Tailwind/CSS classes merged onto the widget's outer container.

styleobject

Inline style overrides on the outer container.

The full prop list lives in src/chat-app.tsx. Per-message callbacks (onMessageSent, onMessageReceived) are not part of the init config today — to react to messages from your own code, subscribe to the chat store after the widget mounts (see Events and hooks).

Server-side chat config

The chat-config record is the runtime configuration the widget loads on boot. It's a regular AppEngine collection, so you read and write it via the standard data API:

curl https://appengine.appmint.io/repository/get/chat-config/<configId> \
  -H "orgid: <orgId>" \
  -H "Authorization: Bearer <jwt>"

The widget reads data.content (or data directly, depending on the org's schema migration). Common fields the chat code reacts to:

FieldTypeDescription
status'online' | 'offline'

Hard switch. When offline the widget shows the offline form (or hides chat entirely if offline.showForm is false).

availabilityobject

Office-hours config. Shape includes timezone, days (array of weekday objects with from/to HH:mm), and exception dates. The widget evaluates with isWithinOfficeHours(...) from src/utils/availability.ts and sets _outsideHours when closed.

offline.showFormboolean

When the chat is offline (or outside office hours), show the offline registration form instead of hiding the bubble.

chatBubblePosition'left' | 'right'

Anchors the floating bubble. Defaults to right.

logo.urlstring

Header logo URL. Rendered next to the title in the chat header.

headerContentstring | object

Custom markdown or rich content rendered above the messages.

welcomeobject

The welcome screen content (title, subtitle, CTAs).

aiobject

AI assistant config. Includes assistant ids, default assistant, system prompt overrides, and tool gating.

assistantobject

Singular AI assistant when only one is attached. Used when the config predates multi-assistant support.

queueobject

Routing rules — skill tags, priority weights, queue caps. Read by AppEngine, not the widget directly.

The widget logs the resolved config keys to the console as [ChatConfig] <configId> [...keys] on first load. Use that output to confirm the schema your record actually exposes.

Mount-time props win over server config when there's overlap. For example, theme: 'dark' from props overrides any theme the server config sets — useful when embedding inside an app that already has its own theme.

Theming object

If you pass theme as an object, the widget shallow-merges it onto the default token map. Supported keys live in src/styles/global.dev.css and tailwind.config.js. See Theming for the full list.

Multiple environments

For dev / staging / prod, store distinct configId values per environment and pick them at mount time. With the React wrapper described in the React installation page:

<AppmintChat
  orgId={process.env.NEXT_PUBLIC_APPMINT_ORG_ID!}
  configId={process.env.NEXT_PUBLIC_APPMINT_CHAT_CONFIG_ID!}
  appId="storefront"
/>

Don't try to mutate a single config record at runtime to swap behaviour — every visitor gets the live record, so partial edits show up immediately.