> For the complete documentation index, see [llms.txt](https://docs.blockbrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockbrain.ai/de/for-admins/web-components/webcomponent-api.md).

# Webkomponenten-API

### Authentifizierung (erforderlich) <a href="#authentication-required" id="authentication-required"></a>

| Name         | Typ    | Erforderlich? | Modus  | Beispiel                   | Beschreibung                              |
| ------------ | ------ | ------------- | ------ | -------------------------- | ----------------------------------------- |
| `orgId`      | string | Ja            | Alle   | `"org_123"`                | Ihre Blockbrain-Organisations-ID.         |
| `uid`        | string | Ja            | Alle   | `"bot_abc"`                | Eindeutige Bot-/App-Instanz-ID            |
| `Aussteller` | string | Ja            | Privat | `"https://…blockbrain.ai"` | OAuth-Aussteller-URL für Ihren Mandanten. |

### Benutzeridentifizierung <a href="#user-identification" id="user-identification"></a>

| Name      | Typ    | Erforderlich? | Standard                                   | Beschreibung                                                                                                     |
| --------- | ------ | ------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| `userUid` | string | Nein          | Bei jedem Besuch eine neue anonyme Sitzung | Stabile Benutzer-ID (E-Mail, Benutzername, Telefonnummer usw.), die verwendet wird, um den Verlauf zu speichern. |

### Darstellung & Layout <a href="#appearance-and-layout" id="appearance-and-layout"></a>

| Name         | Typ                                | Erforderlich? | Standard   | Beschreibung                                                                                                                   |
| ------------ | ---------------------------------- | ------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `Layout`     | `"compact" \| "minimal" \| "full"` | Nein          | `"full"`   | Legt fest, wie viel UI der Chat nutzt (siehe Hinweise unten).                                                                  |
| `Breite`     | Zeichenkette (CSS)                 | Nein          | `"100%"`   | Komponentenbreite. Legen Sie einen expliziten Wert fest (z. B. `"420px"`) um zu verhindern, dass sie sich horizontal ausdehnt. |
| `Höhe`       | Zeichenkette (CSS)                 | Nein          | `"100dvh"` | Komponentenhöhe. Verwenden Sie einen festen Wert (z. B. `"600px"`) damit der Chat in einem festen Container scrollbar bleibt.  |
| `themeColor` | Zeichenkette (CSS-Farbe)           | Nein          | —          | Primäre Theme-Farbe für Schaltflächen und Akzente.                                                                             |

#### Die Wahl von `Layout` <a href="#choosing-a-layout" id="choosing-a-layout"></a>

* `full` – Am besten für Chat-Erlebnisse auf der ganzen Seite oder wenn der Chat im Mittelpunkt steht. Es dehnt sich aus, um den verfügbaren Platz zu füllen, und zeigt alle Steuerelemente.
* `minimal` – Adaptives, leichteres UI. Gut für die Einbettung in Dashboards, Seitenleisten oder Bereiche, in denen der Chat wichtig, aber nicht dominant ist.
* `compact` – Ultrakompaktes Layout im Mobile-Stil. Ideal für kleine Widgets, Popovers oder beengte UI-Bereiche.

> **Tipp:** Für präzise Kontrolle koppeln Sie Ihr gewähltes `Layout` mit expliziten `Breite` und `Höhe`. Lassen Sie das Layout die UI bestimmen; lassen Sie CSS-Größen den Platzbedarf definieren. Wenn Sie Größen weglassen, `full` wird es gern alles einnehmen, was es kann.

### Symbole & Avatare <a href="#icons-and-avatars" id="icons-and-avatars"></a>

| Name         | Typ    | Erforderlich? | Standard | Beschreibung                           |
| ------------ | ------ | ------------- | -------- | -------------------------------------- |
| `iconUrl`    | string | Nein          | —        | Fallback-Symbol für Nachrichten.       |
| `iconSize`   | string | Nein          | —        | Fallback-Symbolgröße (z. B. `"50px"`). |
| `userAvatar` | string | Nein          | —        | URL des Benutzer-Avatars.              |
| `botAvatar`  | string | Nein          | —        | URL des Bot-Avatars.                   |

`introImageUrl` — URL des Startlogos, das vor der ersten Chatnachricht angezeigt wird

### Nachrichten-Überschreibungen <a href="#message-overrides" id="message-overrides"></a>

| Name       | Typ                 | Erforderlich? | Beschreibung                                                                                  |
| ---------- | ------------------- | ------------- | --------------------------------------------------------------------------------------------- |
| `messages` | Zeichenkette (JSON) | Nein          | Anpassen `Titel`, `Beschreibung`, `iconUrl`, `iconSize` pro Status (`laden`, `Fehler`, usw.). |

**Beispiel**

`{ "messages": { "loading": { "title": "Einen Moment…", "description": "Antworten werden abgerufen", "iconUrl": "/spinner.svg", "iconSize": "32px" } } }`

### Funktionsumschalter <a href="#feature-toggles" id="feature-toggles"></a>

| Name                      | Typ                                 | Erforderlich? | Standard | Beschreibung                                                                                                                                                                                                                                                |
| ------------------------- | ----------------------------------- | ------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `defaultWebSearchEnabled` | boolesch oder `"true"/"false"`      | Nein          | `true`   | Websuche standardmäßig aktivieren.                                                                                                                                                                                                                          |
| `hideReference`           | boolesch oder `"true"/"false"`      | Nein          | `false`  | Referenzlinks ausblenden.                                                                                                                                                                                                                                   |
| `openDocumentMode`        | `"auto" \| "same_tab" \| "new_tab"` | Nein          | `"auto"` | Wie Dokumente geöffnet werden.                                                                                                                                                                                                                              |
| `disableRecording`        | boolesch                            | Nein          | `false`  | Audioaufnahme deaktivieren.                                                                                                                                                                                                                                 |
| `hideTopbar`              | boolesch                            | Nein          | `false`  | Die obere Leiste der Chat-Oberfläche ausblenden.                                                                                                                                                                                                            |
| `defaultSidebarOpen`      | boolesch oder `"true"/"false"`      | Nein          | `false`  | Standardmäßig das Ein-/Ausblenden der Seitenleiste steuern                                                                                                                                                                                                  |
| `enableDocumentUpload`    | boolesch oder `"true"/"false"`      | Nein          | `false`  | Steuert das Ein-/Ausblenden der Datei-Upload-Funktion                                                                                                                                                                                                       |
| `autoNewConversation`     | string `"true"` / `"false"`         | Nein          | `false`  | Startet bei jedem Öffnen des Chats automatisch eine neue Unterhaltung, anstatt die vorherige des Nutzers fortzusetzen. Nur der exakte String `"true"` aktiviert dies; jeder andere Wert (oder das Weglassen) behält das Standardverhalten bei.              |
| `botUidSelectionOption`   | string `"true"` / `"false"`         | Nein          | `false`  | Zeigt die Bot-Auswahloption im Dialog zum Bot-Wechsel an und ermöglicht es Nutzern, zwischen verfügbaren Bots zu wechseln. Wenn deaktiviert (Standard), verwendet das Widget immer den Bot, der durch `uid`. Nur der exakte String `"true"` aktiviert dies. |

### Proxy / Erweitert <a href="#proxy-advanced" id="proxy-advanced"></a>

| Name               | Typ           | Erforderlich? | Beschreibung                                             |
| ------------------ | ------------- | ------------- | -------------------------------------------------------- |
| `proxyUrl`         | string        | Nein          | Basis-Proxy-URL für API-Anfragen.                        |
| `customHeaders`    | Objekt (JSON) | Nein          | Statische Header, die mit jeder Anfrage gesendet werden. |
| `getCustomHeaders` | Funktion      | Nein          | Callback zum Setzen von Headern pro Sitzung/Anfrage.     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.blockbrain.ai/de/for-admins/web-components/webcomponent-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
