Options
Every configuration option of the chatbot widget, with types and defaults.
Connecting to the API
The widget talks to two Verbatim API domains: Thread (/v1/thread/*) to open a conversation, and Post
(/v1/post/*) to load history, send messages, and fetch source attachments. Every request carries your
X-Access-Token.
ChatbotWidget.mountChatbotWidget("#verbatim-chatbot", {
accessToken: "YOUR_ACCESS_TOKEN",
apiBaseUrl: "https://api.verbatim-ai.com", // optional; this is the default
corpusIds: ["YOUR_CORPUS_ID"], // the documents to answer from
agentId: "YOUR_AGENT_ID", // optional; omit for the default agent
lang: "en" // optional
});accessToken— required. Without a valid token the API returns401and the widget cannot load history or send
messages.corpusIds— required (at least one). The assistant answers from these corpora. Provide the IDs configured in
your Verbatim account. An empty array is rejected at mount time.agentId— optional. Sends every question to a specific agent. See Choosing an agent.lang— hints the answer language for each message.
modelis deprecated and ignored. A conversation no longer carries a model: how a question is answered is
decided per question by an agent. UseagentIdinstead. The option is still accepted so existing snippets keep
working, it simply has no effect.
Choosing an agent
An agent is the configuration on the Verbatim side that decides how a question gets answered — which model,
which prompt, which retrieval settings. Your organization has a default one, and can have several.
agentId points a widget at one of them:
ChatbotWidget.mountChatbotWidget("#verbatim-chatbot", {
accessToken: "YOUR_ACCESS_TOKEN",
corpusIds: ["YOUR_CORPUS_ID"],
agentId: "11111111-2222-3333-4444-555555555555"
});It is entirely optional. Leave it out and the widget behaves exactly as it always has: the question is sent
without an agent and the platform answers with your organization's default agent. Existing embed snippets need no
change.
Two things are worth knowing before you set it:
- Changing the agent starts a fresh conversation. A visitor's conversation is tied to the agent that answered
it, so pointing the widget at a different agent gives them a clean one instead of a history written by someone
else. Widgets withoutagentIdkeep the conversation they already had. - If the id is not one of your agents, questions fail. The visitor sees the widget's error bubble. Check the id
againstGET /v1/agent/, or remove the option to fall back to the default agent.
To offer a choice of agents on one page, mount a widget per agent, each on its own container — they keep separate
conversations.
Where to get your Agent ID?
By API
Use GET /v1/agent/ to list the agents available to your organization:
curl -X 'GET' \
'https://api.verbatim-ai.com/v1/agent/?pageSize=25&pageIndex=0' \
-H 'accept: application/json' \
-H 'Authorization: Bearer MY_JWT_TOKEN'The id of each item is what you pass as agentId.
Using your back office
Open your Agents page and select your agent — the id is on the chip under its title, same as for a corpus.
The mount function
ChatbotWidget.mountChatbotWidget(target, options, mountOptions ?)| Argument | Type | Description |
|---|---|---|
target | string | HTMLElement | A CSS selector (e.g. "#verbatim-chatbot") or a DOM element to mount into. |
options | object | The widget configuration — see Options. |
mountOptions | object (optional) | Mount-level settings. Currently: { isolateStyles?: boolean } (default true). See Style isolation. |
Calling mountChatbotWidget again on the same target updates the widget in place with the new options (it does not
create a second instance).
All options live in the second argument to mountChatbotWidget.
Connection
| Option | Type | Default | Purpose |
|---|---|---|---|
accessToken | string | — (required) | Access token sent as the X-Access-Token header on every request. |
corpusIds | string[] | — (required) | The corpora (document collections) the assistant may answer from. Must contain at least one corpus id. |
apiBaseUrl | string | https://api.verbatim-ai.com | Base URL of the Verbatim API. Override only for a staging or self-hosted deployment. |
agentId | string | — | Agent that answers this widget's questions. Omit for your organization's default agent. See Choosing an agent. |
model | string | — | Deprecated and ignored. Replaced by agentId; still accepted so existing snippets keep working. |
lang | string | en | ISO-639 language code sent with each message. |
Content & branding
| Option | Type | Default | Purpose |
|---|---|---|---|
title | string | AI Assistant | Title shown in the widget header. |
imageUrl | string | — | Logo image URL for the header. Falls back to a default bot icon if omitted. |
imageWidth | string | — | CSS width for the logo image (e.g. "120px"). |
greeting | string | — | A welcome message shown as the first bot bubble. |
greetingOutside | boolean | false | Show the greeting as a floating bubble next to the launcher before the widget is opened. |
Appearance
| Option | Type | Default | Purpose |
|---|---|---|---|
theme | string | object | 'boring' | A theme preset, or a { preset, tokens } object. See Branding. |
themeTokens | object | — | Fine-grained color/style overrides applied on top of theme. |
Behavior & layout
| Option | Type | Default | Purpose |
|---|---|---|---|
notificationBadge | boolean | true | Show a small badge on the launcher to draw attention until the widget is opened. |
position | object | { mode: 'preset', preset: 'bottom-right' } | Where the launcher and window appear. See Branding. |
messageInputPosition | 'bottom' | 'top' | 'bottom' | Whether the input sits at the bottom or the top of the window. See Branding. |
openTriggerId | string | — | The id of your own element that should open the widget. See Branding. |
chatPrompts | string[] | [] | Suggested quick-reply prompts shown before the first message. |
pageContext | object | — | Run custom logic based on the visitor's URL. See Branding. |
Updated about 1 hour ago