This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Duplicates a site with a new site name.
Note: When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included. The duplicated site won’t have a domain or any Premium capabilities.
Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and will appear unactivated. Once the site is upgraded, the app will be available for use.
Important: This call requires an account level API key and cannot be authenticated with the standard authorization header.
function duplicateSite(
sourceSiteId: string,
options: DuplicateSiteOptions,
): Promise<DuplicateSiteResponse>;
ID of the site to duplicated.
import { siteActions } from "@wix/site-actions";
async function duplicateSite(sourceSiteId, options) {
const response = await siteActions.duplicateSite(sourceSiteId, options);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.