> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: startInstallFlow()

## Article: startInstallFlow()

## Article Link: https://dev.wix.com/docs/sdk/host-modules/workspace/apps/start-install-flow.md

## Article Content:

# startInstallFlow()

Opens the one-step installation modal for a [Wix app](https://www.wix.com/app-market/).

![The app installation modal](https://wixmp-833713b177cebf373f611808.wixmp.com/images/fb678378d72b6879a8838e0b4abc3f8c.png)

<blockquote class="important">

__Important:__ This method is only available in the editor.

</blockquote>

## Method declaration

```ts
(args: InstallFlowRequest) => Promise<InstallFlowResponse>
```

## Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| `args` | [InstallFlowRequest](#installFlowrequest) | Configuration options for installing the app. |

### InstallFlowRequest

| Name | Type | Description |
| ---- | ---- | ----------- |
| `appId` | string | **Required.** The ID of the app to install. |
| `enablePostInstallNavigation` | boolean | Whether to redirect after installation for [additional app setup](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard-setup/app-settings.md). Default is `true`. If you call the method in the editor, the method ignores this field and doesn't redirect. |

## Returns

```ts
Promise<InstallFlowResponse>
```

A promise that resolves to an `InstallFlowResponse` indicating the result of the installation attempt.

### InstallFlowResponse

| Name | Type | Description |
| ---- | ---- | ----------- |
| `status` | string | Status indicating that the installation completed or explaining why it didn't. Possible values: <ul> <li>`SUCCESS`: Installation completed successfully.</li> <li>`CANCELED`: The Wix user canceled the installation process.</li> </ul> |
| `installedApps` | [InstalledApp[]](#installedApp) | Array of installed apps. Includes the target app and any apps that were also installed because they're dependencies for it. The response includes this field only if `status` is `SUCCESS`.|

#### InstalledApp

| Name | Type | Description |
| ---- | ---- | ----------- |
| `appId` | string | The ID of the installed app. |
| `version` | string | The version of the installed app. |

## Examples

### Install an app

```js
import { apps } from "@wix/workspace";

const myFunc = async () => {
	...
	const appId = <YOUR_APP_ID>;
	const result = await apps.startInstallFlow({ appId,  postInstallRedirectEnabled: false });
	...
};
```

## Errors

This method may return the following [error codes](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-errors.md):

- `ALREADY_INSTALLED`: The app is already installed on the site.
- `UPGRADE_TO_PREMIUM`: The installation requires upgrading the site to a premium plan.
- `CONNECT_DOMAIN`: The installation requires connecting a domain to the site.