About Editor URLs

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.

Before you begin

It’s important to note the following points before starting to code:

  • Embedded script extensions won't be displayed in the preview.

Use cases

Terminology

  • Editor: The platform Wix users use to build and edit their sites. Wix offers several editors for site building:
  • Preview: A feature that enables Wix users to see what changes made on a site (in the editor, or in an app) will look like to visitors, without publishing the site. Wix recommends that Wix users preview their sites to test how new changes and updates look before publishing them.
Did this help?

Sample flows

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.

Direct Wix users to their site editor

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.

  1. Include a call to action that redirects to the editor - for example, a button.
  2. Whenever the Wix user clicks the button, call Get Editor URLs.
  3. Redirect the Wix user to the URL specified in the editorUrl parameter.

Direct Wix users to preview the latest changes

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.

  1. Include a call to action that redirects to preview the site - for example, a button.
  2. Whenever the site builder clicks the button, call Get Editor URLs.
  3. Redirect the site builder to the URL specified in the previewUrl parameter.

Note: The site preview feature will not be able to display any embedded script extensions.

Did this help?

Editor Urls Object


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.

Properties
editorTypestringRead-only

Editor type.


editorUrlstringRead-onlymaxLength 2048format WEB_URL

Editor URL.


previewUrlstringRead-onlymaxLength 2048format WEB_URL

Preview URL.

Did this help?

GET

Get Editor Urls


Developer Preview

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.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings Services and Settings
Manage Portfolio
Manage Restaurants - all permissions
Read Site URLs
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/editor-urls

Request
This endpoint does not take any parameters.
Response Object
urlsUrls

Editor URL.

Get Site Editor URLs

Retrieves Site Editor URLs

Request
cURL
curl -X GET \ 'https://www.wixapis.com/editor-urls/v2/editor-urls' \ -H 'Authorization: <AUTH>' \ -H 'Content-Type: application/json' \
Response
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" } }
Errors
400Invalid Argument

There is 1 error with this status code:

404Not Found

There is 1 error with this status code:

428Failed Precondition

There is 1 error with this status code:

See the entire list and learn more about Wix errors.

Did this help?