> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sidenet.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Config Updates

> Update SDK behaviour and styled config at runtime.

| Function                                 | Description                                  |
| ---------------------------------------- | -------------------------------------------- |
| `updateSidenetConfig(options)`           | Update SDK behaviour / layout / identity     |
| `updateSidenetStyledConfig(styleConfig)` | Update greeting / suggestions / theme tokens |
| `refreshSidenetConfig()`                 | Re-fetch config from backend (async)         |
| `refreshSidenetStyles()`                 | Re-apply container styles                    |
| `getRuntimeConfig()`                     | Get current merged config                    |

Two update functions, separated by what they change:

* **`updateSidenetConfig(options)`** — SDK behaviour and chrome. Accepts every init option **except** `orgId`, the callbacks (`onOpen` / `onClose` / `onResize` / `onReady`), the one-shot init-only fields (`context`, `customCSS`, `customStyles`, `sdkUi`, `defaultOpen`), and the read-once auth fields (`userId`, `copilotId`, `apiKey` — listed in the type but normally set at init). Concretely: `width`, `height`, `position`, `layout`, `offset`, `zIndex`, `theme` (`'light' | 'dark'`), `agentVersionId`, `showAgentDropdown`, `keyboardShortcut`, `threadId`, `read_only`, `use_routing`, `runtimeAuth`, `groupName`, `firstMessage`, `lastThread`, `debug`, `showClose`, `closeOnOutsideClick`. Two `null` sentinels: `keyboardShortcut: null` disables the shortcut, `threadId: null` clears the pinned thread.
* **`updateSidenetStyledConfig(styleConfig)`** — visual content. Accepts `Partial<SidebarSDKConfig>` — the same shape the backend returns as `sdk_ui`. Use it to override `text` (greeting / placeholder / suggestions) and `theme` design tokens. Partial calls merge into the current config, so passing only `text.suggestions` keeps `text.greeting` and the loaded `theme` intact.
* **`getRuntimeConfig()`** — synchronous read of the current merged `{ text, theme }`. Useful for snapshotting the resolved config (defaults + backend `sdk_ui` + your overrides) without subscribing via `useSidebarConfig`.

<Tip>
  Rule of thumb: "where the sidebar is and how it behaves" → `updateSidenetConfig`. "what the sidebar looks like and what copy it shows" → `updateSidenetStyledConfig`.
</Tip>
