On occasion, you might want to redirect a Wix user to a site's editor or to preview a site with any unpublished changes - for example, to lead them to make changes in an app's settings panel in the editor, or to review changes to an app or the site.
It’s important to note the following points before starting to code:
This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.
You might choose to direct a Wix user with collaborator permissions to the site editor to place an app's visual extension in the site.
editorUrl
parameter.If a Wix user makes changes in the site editor, or to an app's behavior or UI, you might choose to direct them to preview those changes using Wix's site preview feature.
previewUrl
parameter.Note: The site preview feature will not be able to display any embedded script extensions.
The Editor URLs object provides a list of editor-related URLs, including a link to the site's editor interface (one of Wix Studio, Wix Editor, or Editor X), and a link to preview the site with the latest changes made in the editor.
Editor type.
Editor URL.
Preview URL.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a site's Editor URLs.
You can only call this method when authenticated as a Wix app or Wix user identity.
Editor URL.
Retrieves Site Editor URLs
curl -X GET \
'https://www.wixapis.com/editor-urls/v2/editor-urls' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
{
"urls": {
"type": "WIX_STUDIO",
"editor_url": "https://editor.wix.com/studio/00000000-0000-0000-0000-000000000001?metaSiteId=00000000-0000-0000-0000-000000000002",
"preview_url": "https://editor.wix.com/html/editor/web/renderer/external_preview/document/00000000-0000-0000-0000-000000000001?metaSiteId=00000000-0000-0000-0000-000000000002"
}
}
There is 1 error with this status code:
There is 1 error with this status code:
There is 1 error with this status code:
See the entire list and learn more about Wix errors.