> 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`). > - 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. - 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. - 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. - 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. - 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: ' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "siteTransfer": { "siteId": "00e5cf4a-fe94-40ee-9816-a02a446e8a78", "sourceAccountId": "3916bb98-2d25-4765-8ab2-d9483c66c2ce", "enableNotifications": false } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.b2BSiteManagement.B2bSiteTransferService.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. - 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. - 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 - 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. - 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. - 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-hosted) Self-hosted 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); }; ``` ---