> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetEditorUrls

# Package: siteUrls

# Namespace: EditorUrlsApi

# Method link: https://dev.wix.com/docs/api-reference/business-management/site-urls/editor-urls/get-editor-urls.md

## Permission Scopes:
Read Site URLs: SCOPE.DC-SITES.READ-URLS

## Introduction

Retrieves a site's Editor URLs.

---

## REST API

### Schema

```
 Method: getEditorUrls
 Description: Retrieves a site's Editor URLs.
 URL: https://www.wixapis.com/editor-urls
 Method: GET
 Method parameters:
   query param name: branchId | type: branchId | description: Optional branch GUID to include in generated URLs  | validation: format GUID
 Return type: GetEditorUrlsResponse
  - name: urls | type: EditorUrls | description: Editor URL.  
     - name: editorType | type: EditorType | description: Editor type.  | read-only: true 
         - enum:
         -     UNKNOWN: Unknown editor type.
         -     WIX_EDITOR: The classic Wix Editor.
         -     WIX_STUDIO: Wix's editor built for agencies and enterprises.
         -     ODEDITOR: Wix Harmony editor.
         -     WIXEL: Wixel.
         -     EDITORLESS: Headless site with no editor.
     - name: editorUrl | type: string | description: Editor URL.  | read-only: true | validation: maxLength 2048, format WEB_URL
     - name: previewUrl | type: string | description: Preview URL.  | read-only: true | validation: maxLength 2048, format WEB_URL

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNABLE_TO_EXTRACT_MS_ID | Description: Can't extract the site GUID from the request.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: SITE_NOT_FOUND | Description: Couldn't find the site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: EDITOR_NOT_FOUND | Description: Can't retrieve editor URLs. The site doesn't have an editor app.


```

### Examples

### Get Site Editor URLs
Retrieves Site Editor URLs

```curl
curl -X GET \
  'https://www.wixapis.com/editor-urls' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.urls.editor.getEditorUrls(options)
 Description: Retrieves a site's Editor URLs.
 Method parameters:
   param name: options | type: GetEditorUrlsOptions  none  
        - name: branchId | type: string | description: Optional branch GUID to include in generated URLs  | validation: format GUID
 Return type: PROMISE<GetEditorUrlsResponse>
  - name: urls | type: EditorUrls | description: Editor URL.  
     - name: editorType | type: EditorType | description: Editor type.  | read-only: true 
         - enum:
         -     UNKNOWN: Unknown editor type.
         -     WIX_EDITOR: The classic Wix Editor.
         -     WIX_STUDIO: Wix's editor built for agencies and enterprises.
         -     ODEDITOR: Wix Harmony editor.
         -     WIXEL: Wixel.
         -     EDITORLESS: Headless site with no editor.
     - name: editorUrl | type: string | description: Editor URL.  | read-only: true | validation: maxLength 2048, format WEB_URL
     - name: previewUrl | type: string | description: Preview URL.  | read-only: true | validation: maxLength 2048, format WEB_URL

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNABLE_TO_EXTRACT_MS_ID | Description: Can't extract the site GUID from the request.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: SITE_NOT_FOUND | Description: Couldn't find the site.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: EDITOR_NOT_FOUND | Description: Can't retrieve editor URLs. The site doesn't have an editor app.


```

### Examples

### getEditorUrls
```javascript
import { editor } from '@wix/urls';

async function getEditorUrls(options) {
  const response = await editor.getEditorUrls(options);
};
```

### getEditorUrls (with elevated permissions)
```javascript
import { editor } from '@wix/urls';
import { auth } from '@wix/essentials';

async function myGetEditorUrlsMethod(options) {
  const elevatedGetEditorUrls = auth.elevate(editor.getEditorUrls);
  const response = await elevatedGetEditorUrls(options);
}
```

### getEditorUrls (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { editor } from '@wix/urls';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { editor },
  // Include the auth strategy and host as relevant
});


async function getEditorUrls(options) {
  const response = await myWixClient.editor.getEditorUrls(options);
};
```

---