bulkDeleteSite( )


Developer Preview

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.

Method Declaration
Copy
Method Parameters
idsArray<string>Required

Site IDs.

Min: 1 site ID
Max: 20 site IDs

Returns
Return Type:Promise<BulkDeleteSiteResponse>
JavaScript
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

duplicateSite( )


Developer Preview

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.

Method Declaration
Copy
Method Parameters
sourceSiteIdstringRequired

ID of the site to duplicated.


optionsDuplicateSiteOptionsRequired
Returns
Return Type:Promise<DuplicateSiteResponse>
JavaScript
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?

publishSite( )


Developer Preview

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.

Method Declaration
Copy
function publishSite(): Promise<void>;
Request
This method does not take any parameters
Publish a site with an API Key
JavaScript
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(); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?