> 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: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/account-level/domains/domain-search/sample-flows.md

## Article Content:

# Sample Use Cases & Flows: Domain Search

This article shares possible use cases your implementation could support, as well as example flows.
You're certainly not limited to these use cases, but they can be a helpful jumping off point
as you plan your app's implementation.

## Discover a domain

You could help site owners identify an available, spot-on domain.
Then, you or the site owner can purchase the domain and assign it to their Wix site.

To discover a domain:

1. Call [Suggest Domains](https://dev.wix.com/docs/api-reference/account-level/domains/domain-search/suggestion-v2/suggestion-object.md)
    to retrieve a list of relevant available domains.
1. Display the suggestions to the site owners and let them select their preferred choice.
1. If the relevant site is a free Wix site, call 
   [Resellers  Create Package v2](https://dev.wix.com/docs/rest/account-level/resellers/packages-and-product-instances/create-package-v2.md)
   to assign a Premium plan to it. Make sure to save the `productInstanceId`.
1. Call [Resellers  Create Package v2](https://dev.wix.com/docs/rest/account-level/resellers/packages-and-product-instances/create-package-v2.md)
   to create a product instance for the relevant domain TLD and privacy.
1. Prompt the site owner to register the domain through Wix at https://manage.wix.com/account/domains, or register the domain on your own.
1. If you register the domain on your own, connect the domain by following one of the use cases described in [Connected Domains](https://dev.wix.com/docs/rest/account-level/domains/connected-domains/sample-flows.md).

## Check a domain's availability 

You could help the site owner check the availability of their favorite
domain. Then, the site owner can purchase the domain and assign it to their
site.

To check a domain's availability and register it:

1. Ask the site owners what their favorite domain is.
1. Call [Check Domain Availability](https://dev.wix.com/docs/api-reference/account-level/domains/domain-search/availability-v2/check-domain-availability.md)
    to verify that the domain is still available. If its isn't available, start
    over or follow the
    [flow above](https://dev.wix.com/docs/api-reference/account-level/domains/domain-search/sample-flows.md).
1. If the relevant site is a free Wix site, call
   [Resellers  Create Package v2](https://dev.wix.com/docs/rest/account-level/resellers/packages-and-product-instances/create-package-v2.md)
   to assign a Premium plan to it. Make sure to save the `productInstanceId`.
1. Call [Resellers Create Package v2](https://dev.wix.com/docs/rest/account-level/resellers/packages-and-product-instances/create-package-v2.md)
   to create a product instance for the relevant domain TLD and privacy.
1. Prompt the site owner to register the domain through Wix at https://manage.wix.com/account/domains, or register the domain on your own.
1. If you register the domain on your own, connect the domain by following one of the use cases described in [Connected Domains](https://dev.wix.com/docs/rest/account-level/domains/connected-domains/sample-flows.md).