This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
This endpoint enables you to delete multiple sites.
This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.
Learn more about deleting multiple sites.
Important: This call requires an account level API key and cannot be authenticated with the standard authorization header.
Site IDs.
Min: 1 site ID
Max: 20 site IDs
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
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.
ID of the site to duplicated.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Publishes a site.
Publishing a site makes any changes previously saved on the site available on the internet. After publishing, changes to your site appear in the site's history.
When you call this API, you must pass a header called wix-site-id
whose value is the ID of the site you want to publish. Learn more about
working with API keys and site IDs.
Important: This call requires an account level API key and cannot be authenticated with the standard authorization header.
function publishSite(): Promise<void>;
import { createClient, ApiKeyStrategy } from "@wix/sdk";
import { siteActions } from "@wix/site-actions";
const wixClient = createClient({
modules: { siteActions },
auth: ApiKeyStrategy({
siteId: "MY-SITE-ID",
apiKey: "MY-API-KEY",
}),
});
async function publishSite() {
const response = await wixClient.siteActions.publishSite();
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.