> ## 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.

# Python SDK — widget settings

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

`WidgetSettingsClient` is reachable on every Kataven client as `client.widget_settings`. 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 |
| `get_agent`    | `GET /api/v1/agents/{agent_id}/widget-settings`   | Get per-agent widget policy          |
| `update_agent` | `PATCH /api/v1/agents/{agent_id}/widget-settings` | Update per-agent widget policy       |

## Reference

### `client.widget_settings.get(...)`

Get account-level widget branding

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

```python theme={null}
    def get(self) -> Dict[str, Any]:
```

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

### `client.widget_settings.update(...)`

Update account-level widget branding

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

```python theme={null}
    def update(
        self,
        primary_color: Optional[str] = None,
        accent_color: Optional[str] = None,
        logo_url: Optional[str] = None,
        launcher_position: Optional[str] = None,
        launcher_label: Optional[str] = None,
        privacy_notice: Optional[str] = None,
    ) -> None:
```

### `client.widget_settings.get_agent(...)`

Get per-agent widget policy

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

```python theme={null}
    def get_agent(self, agent_id: str) -> Dict[str, Any]:
```

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

### `client.widget_settings.update_agent(...)`

Update per-agent widget policy

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

```python theme={null}
    def update_agent(
        self,
        agent_id: str,
        widget_enabled: Optional[bool] = None,
        auth_mode: Optional[str] = None,
    ) -> Dict[str, Any]:
```
