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

# updateOptions - Upates the initial options

### `updateOptions` : OverhypedAI("updateOptions", config)

* This method allows you to programmatically update the initial options provided in `initUser` or `connect`(If `autoConnect: false` is provided in `initOrg`).
* Invoke this method after using the `initOrg`, `initUser` and `connect`(If `autoConnect: false` is provided in `initOrg`) commands.

```typescript theme={"system"}
const widgetOptions = {
  show?: boolean
  positionOffset?: {
      x?: number | string
      y?: number | string
  }
}
// NOTE: This is a MANDATORY parameter.
const config = {
  /**
   * The target to update the options for.
   * Currently only 'widget' is supported.
   */
  target: "widget",
  /**
   * The options to update.
   */
  options: widgetOptions
}
```

```typescript {3} theme={"system"}
import OverhypedAI from '@overhyped-ai/connect/OverhypedAI'

OverhypedAI('updateOptions', config)
```

Updates the initial options. Params:

<Tip>Tag (Optional) is added for non-mandatory fields</Tip>

* `config: object`: Target and options to update.
  * `target: "widget"`: The target to update the options for. Currently only 'widget' is supported.
  * `options: Partial<OverhypedAIWidgetOptions>`: The options to update.
    * `show: boolean` (Optional): Show/Hide the widget. This has no effect on the modal.
    * `positionOffset: object` (Optional): Adjust the position of the widget relative to it's initial position.
      * `x: number | string` (Optional): X-axis offset.
      * `y: number | string` (Optional): Y-axis offset.
