> 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

# TransferSite

# Package: b2bSiteManagement

# Namespace: B2bSiteTransferService

# Method link: https://dev.wix.com/docs/api-reference/account-level/b2b-site-management/business-site-transfer-v1/transfer-site.md

## Introduction

Transfers a Wix site from the source account to the target account.


> **Note:** You must pass the ID of the target account in the header of the call.

Only strategic partners of Wix services can transfer sites. Contact the
[Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a
strategic partner.

Not all Wix accounts are supported as source accounts and you can transfer
a site only to your main account or one of its sub-accounts.
It isn’t possible to transfer a site to an unrelated account.
Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.

Only sites that don’t include paid Wix services can be transferred.
After transferring the site, you can use the
[Resellers API](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction)
to offer paid Wix services to your customers.

> **Important:** This call requires an account level API key and cannot be
> authenticated with the standard authorization header.

---

## REST API

### Schema

```
 Method: transferSite
 Description: Transfers a Wix site from the source account to the target account.   > **Note:** You must pass the GUID of the target account in the header of the call.  Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.  Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.  Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction) to offer paid Wix services to your customers.  > **Important:** This call requires an account level API key and cannot be > authenticated with the standard authorization header.
 URL: https://www.wixapis.com/b2b-site-management/v1/transfer-site
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  siteTransfer
 Method parameters: 
   param name: siteTransfer | type: SiteTransfer | description: The B2B Site Transfer object contains information about a site transfer. | required: true 
        - name: siteId | type: string | description: GUID of the site. See the [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites) for more details.  | validation: format GUID
        - name: sourceAccountId | type: string | description: GUID of the source account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information about supported source accounts.  | validation: format GUID
        - name: enableNotifications | type: boolean | description: Whether the site owner receives an email notification from Wix about the successful site transfer. Site owners don't receive email notifications about failed transfers. Default: `false`.  
 Return type: TransferSiteResponse
  - name: siteTransfer | type: SiteTransfer | description: Information about the site transfer.  
     - name: siteId | type: string | description: GUID of the site. See the [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites) for more details.  | validation: format GUID
     - name: sourceAccountId | type: string | description: GUID of the source account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information about supported source accounts.  | validation: format GUID
     - name: enableNotifications | type: boolean | description: Whether the site owner receives an email notification from Wix about the successful site transfer. Site owners don't receive email notifications about failed transfers. Default: `false`.  


```

### Examples

### Transfer a site
```curl
curl -X POST 'https://www.wixapis.com/b2b-site-management/v1/transfer-site' \
-H 'wix-account-id: <ACCOUNT_ID>' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
    "siteTransfer": {
        "siteId": "00e5cf4a-fe94-40ee-9816-a02a446e8a78",
        "sourceAccountId": "3916bb98-2d25-4765-8ab2-d9483c66c2ce",
        "enableNotifications": false
    }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.b2Btransfer.b2BTransfer.transferSite(siteTransfer)
 Description: Transfers a Wix site from the source account to the target account.   > **Note:** You must pass the GUID of the target account in the header of the call.  Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.  Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.  Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction) to offer paid Wix services to your customers.  > **Important:** This call requires an account level API key and cannot be > authenticated with the standard authorization header.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  siteTransfer
 Method parameters: 
   param name: siteTransfer | type: SiteTransfer | description: The B2B Site Transfer object contains information about a site transfer. | required: true 
        - name: siteId | type: string | description: GUID of the site. See the [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites) for more details.  | validation: format GUID
        - name: sourceAccountId | type: string | description: GUID of the source account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information about supported source accounts.  | validation: format GUID
        - name: enableNotifications | type: boolean | description: Whether the site owner receives an email notification from Wix about the successful site transfer. Site owners don't receive email notifications about failed transfers. Default: `false`.  
 Return type: PROMISE<TransferSiteResponse>
  - name: siteTransfer | type: SiteTransfer | description: Information about the site transfer.  
     - name: siteId | type: string | description: GUID of the site. See the [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites) for more details.  | validation: format GUID
     - name: sourceAccountId | type: string | description: GUID of the source account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information about supported source accounts.  | validation: format GUID
     - name: enableNotifications | type: boolean | description: Whether the site owner receives an email notification from Wix about the successful site transfer. Site owners don't receive email notifications about failed transfers. Default: `false`.  


```

### Examples

### Transfer a site with an API key
```javascript
import { createClient, ApiKeyStrategy } from "@wix/sdk";
import { b2BTransfer } from "@wix/b2btransfer";

const wixClient = createClient({
 modules: { b2BTransfer },
 auth: ApiKeyStrategy({
    siteId: "MY-SITE-ID",
    apiKey: "MY-API-KEY",
  }),
});

async function transferSite(siteTransfer) {
  const response = await b2BTransfer.transferSite(siteTransfer);
}

```

### transferSite (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { b2BTransfer } from '@wix/b2btransfer';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { b2BTransfer },
  // Include the auth strategy and host as relevant
});


async function transferSite(siteTransfer) {
  const response = await myWixClient.b2BTransfer.transferSite(siteTransfer);
};
```

---