> 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: Add a Frontend to an Existing Wix Site

## Article: Start from an Existing Wix Site

## Article Link: https://dev.wix.com/docs/go-headless/self-managed-headless/get-started/add-a-frontend-to-an-existing-wix-site.md

## Article Content:

# Add a Frontend to an Existing Wix Site

If you already have a Wix site, you can use it as the backend for a custom frontend, with no new project required. Use this to add a frontend, such as a mobile app or an extra web frontend, that shares your site's business data and functionality while your existing editor-built site keeps serving your public website.

This is a [self-managed headless](https://dev.wix.com/docs/go-headless/self-managed-headless/about-self-managed-headless.md) flow: your existing site provides the business data and APIs, while you host your frontend and manage authentication yourself.

> **Note:** This article adds a frontend that runs alongside your editor-built site. To replace that site's frontend with a custom frontend that Wix hosts, see [Moving Your Site to a Custom Frontend](https://support.wix.com/en/article/wix-headless-moving-your-site-to-a-custom-frontend). To replace it with a frontend you host yourself, see [About Wix Site Migration to a Self-Managed Headless Project](https://dev.wix.com/docs/go-headless/self-managed-headless/get-started/migrate-from-an-existing-wix-site/about-wix-site-migration-to-a-headless-project.md) and [Migrate a Wix Site to a Self-Managed Headless Project](https://dev.wix.com/docs/go-headless/self-managed-headless/get-started/migrate-from-an-existing-wix-site/migrate-a-wix-site-to-a-headless-project.md).

<div style="text-align:center">
<iframe width="560" height="315" src="https://youtube.com/embed/Mk14A2G3I4Q" title="Extend your Business on any Frontend with Wix Headless" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>

## Step 1 | Choose an authorization strategy

Your frontend (a "client") must be authorized before it can call your site's Wix APIs. Decide which strategy fits first. It determines the kind of client you set up in the next step:

- [Visitors and Members (OAuth)](https://dev.wix.com/docs/go-headless/authentication/about-authentication.md): For a customer-facing site or app used by anonymous visitors and logged-in members. This is the most common choice.
- [Admin (API key)](https://dev.wix.com/docs/go-headless/authentication/admin/about-admin-operations.md): For administrative access to your account's sites and projects, typically from a trusted backend.

## Step 2 | Set up a headless client in your site's dashboard

This step is required. In your existing site's dashboard, under **Settings > Headless Settings**, set up a headless client for the strategy you chose. This gives you the credentials your frontend needs: a client ID for OAuth, or an API key for admin access.

- OAuth (visitors and members): [Set Up a Headless Client](https://dev.wix.com/docs/go-headless/authentication/setup/set-up-a-headless-client.md)
- Admin (API key): [Generate an API Key](https://dev.wix.com/docs/go-headless/authentication/admin/about-admin-operations.md)

> **Important:** If your frontend redirects visitors to Wix-hosted pages (for example, for login or checkout), you must also add your frontend's domain to the allowed redirect domains and authorization redirect URIs in **Headless Settings**, or those redirects are blocked. See [Set Up a Headless Client](https://dev.wix.com/docs/go-headless/authentication/setup/set-up-a-headless-client.md).

## Step 3 | Connect your frontend in your code

In your frontend code, create a Wix client using the credentials from Step 2, then call your site's APIs with either:

- **[JavaScript SDK](https://dev.wix.com/docs/sdk.md)**: If you're coding in JavaScript.
- **[REST API](https://dev.wix.com/docs/rest.md)**: If you're not coding in JavaScript.

Your frontend now reads and writes the same business data as your existing site.

## Step 4 (Optional) | Add more frontends

To connect additional frontends, create a separate headless client for each one. For example, one client for a website and another for a mobile app. Each client gets its own credentials.

## See also

- [Moving Your Site to a Custom Frontend](https://support.wix.com/en/article/wix-headless-moving-your-site-to-a-custom-frontend)
- [About Wix Site Migration to a Self-Managed Headless Project](https://dev.wix.com/docs/go-headless/self-managed-headless/get-started/migrate-from-an-existing-wix-site/about-wix-site-migration-to-a-headless-project.md)
- [Migrate a Wix Site to a Self-Managed Headless Project](https://dev.wix.com/docs/go-headless/self-managed-headless/get-started/migrate-from-an-existing-wix-site/migrate-a-wix-site-to-a-headless-project.md)
- [Set Up a Headless Client](https://dev.wix.com/docs/go-headless/authentication/setup/set-up-a-headless-client.md)
- [Create a Self-Managed Headless Project](https://dev.wix.com/docs/go-headless/self-managed-headless/get-started/create-a-self-managed-headless-project.md)
- [Authorization Strategies](https://dev.wix.com/docs/go-headless/authentication/about-authentication.md)