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

# Node SDK — widget settings

> Node SDK reference for widget branding and per-agent widget policy.

`WidgetSettingsResource` is reachable on every Kataven Node client as `client.widgetSettings`. Each method maps to one HTTP endpoint on the [Hub API](/api-reference/introduction); links to the underlying spec entry are inline below.

Account-level widget branding (colors, logo, copy) and per-agent widget policy (auth requirements, custom intro copy).

## Methods at a glance

| Method        | HTTP                                             | Summary                              |
| ------------- | ------------------------------------------------ | ------------------------------------ |
| `get`         | `GET /api/v1/widget-settings`                    | Get account-level widget branding    |
| `update`      | `PATCH /api/v1/widget-settings`                  | Update account-level widget branding |
| `getAgent`    | `GET /api/v1/agents/{agentId}/widget-settings`   | Get per-agent widget policy          |
| `updateAgent` | `PATCH /api/v1/agents/{agentId}/widget-settings` | Update per-agent widget policy       |

## Reference

### `client.widgetSettings.get(...)`

Get account-level widget branding

**HTTP** — `GET /api/v1/widget-settings` · [API reference →](/api-reference/introduction#tag/Widget%20Admin/operation/getApiV1WidgetSettings)

```typescript theme={null}
get()
```

Returns the widget appearance config (colors, logo, copy) shared by every embedded widget in this account.

### `client.widgetSettings.update(...)`

Update account-level widget branding

**HTTP** — `PATCH /api/v1/widget-settings` · [API reference →](/api-reference/introduction#tag/Widget%20Admin/operation/patchApiV1WidgetSettings)

```typescript theme={null}
update(patch: {
  primary_color?: string;
  accent_color?: string;
  logo_url?: string;
  launcher_position?: "br" | "bl" | "tr" | "tl";
  launcher_label?: string;
  privacy_notice?: string;
})
```

### `client.widgetSettings.getAgent(...)`

Get per-agent widget policy

**HTTP** — `GET /api/v1/agents/{id}/widget-settings` · [API reference →](/api-reference/introduction#tag/Widget%20Admin/operation/getApiV1AgentsByIdWidgetSettings)

```typescript theme={null}
getAgent(agentId: string)
```

Returns the widget policy for one agent (auth requirements, custom intro copy, agent-specific overrides).

### `client.widgetSettings.updateAgent(...)`

Update per-agent widget policy

**HTTP** — `PATCH /api/v1/agents/{id}/widget-settings` · [API reference →](/api-reference/introduction#tag/Widget%20Admin/operation/patchApiV1AgentsByIdWidgetSettings)

```typescript theme={null}
updateAgent(agentId: string, patch: { widget_enabled?: boolean; auth_mode?: "guest" | "user" | "both" })
```
