> 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

# ListPublishedSiteUrls

# Package: siteUrls

# Namespace: UrlsApi

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

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

## Introduction

Retrieves a list of a site's published URLs.
If a site hasn't been published, the call returns an empty array.

---

## REST API

### Schema

```
 Method: listPublishedSiteUrls
 Description: Retrieves a list of a site's published URLs. If a site hasn't been published, the call returns an empty array.
 URL: https://www.wixapis.com/urls-server/v2/published-site-urls
 Method: GET
 Method parameters:
   param name: filters | type: Filters    
        - name: urlType | type: UrlTypeFilter | description: URL type filter. Default: `ALL`  
             - enum:
             -     ALL: All URLs.
             -     PREMIUM: Only URLs directing to the Premium version of the site.
             -     FREE: Only URLs provided by Wix for free. These URLs include `wixsite.com`.
        - name: primary | type: boolean | description: Whether to return only the site's primary URL.  
        - name: multilingual | type: boolean | description: Whether to return language subdomains hosted by [Wix Multilingual](https://support.wix.com/article/wix-multilingual-adding-and-setting-up-wix-multilingual).  
 Return type: ListPublishedSiteUrlsResponse
  - name: urls | type: array<Url> | description: List of published site URLs. This array will be empty if the site isn't published.  | validation: maxItems 1000
     - name: urlType | type: UrlType | description: URL type.  
         - enum:
         -     UNKNOWN: Unknown URL type.
         -     PREMIUM: Only URLs directing to the Premium version of the site.
         -     FREE: Only URLs provided by Wix for free. These URLs include `wixsite.com`.
     - name: primary | type: boolean | description: Whether this is the site's primary URL.  
     - name: url | type: string | description: Published site URL.  | validation: maxLength 3000
     - name: multilingualInfo | type: MultilingualInfo | description: Language subdomain info hosted by [Wix multilingual](https://support.wix.com/article/wix-multilingual-adding-and-setting-up-wix-multilingual).  
        - name: languageCode | type: string | description: Language tag in [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format. For example, `en-US`.  | validation: format LANGUAGE_TAG
        - name: defaultLanguage | type: boolean | description: Whether this is the site's default language.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_PRIMARY_URL | Description: No primary URL exists for this site.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MISSING_IDENTITY | Description: Can't extract identity from request.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNABLE_TO_EXTRACT_MS_ID | Description: Can't extract site GUID from request.


```

### Examples

### List Published Site URLs
```curl
curl -X GET \
  'https://www.wixapis.com/urls-server/v2/published-site-urls' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.urls.site.listPublishedSiteUrls(options)
 Description: Retrieves a list of a site's published URLs. If a site hasn't been published, the call returns an empty array.
 Method parameters:
   param name: options | type: ListPublishedSiteUrlsOptions  none  
        - name: filters | type: Filters | description: Optional filters for the list. If this field is omitted, defaults to primary URLs of all URL types.  
           - name: urlType | type: UrlTypeFilter | description: URL type filter. Default: `ALL`  
                 - enum:
                 -     ALL: All URLs.
                 -     PREMIUM: Only URLs directing to the Premium version of the site.
                 -     FREE: Only URLs provided by Wix for free. These URLs include `wixsite.com`.
           - name: primary | type: boolean | description: Whether to return only the site's primary URL.  
           - name: multilingual | type: boolean | description: Whether to return language subdomains hosted by [Wix Multilingual](https://support.wix.com/article/wix-multilingual-adding-and-setting-up-wix-multilingual).  
 Return type: PROMISE<ListPublishedSiteUrlsResponse>
  - name: urls | type: array<Url> | description: List of published site URLs. This array will be empty if the site isn't published.  | validation: maxItems 1000
     - name: urlType | type: UrlType | description: URL type.  
         - enum:
         -     UNKNOWN: Unknown URL type.
         -     PREMIUM: Only URLs directing to the Premium version of the site.
         -     FREE: Only URLs provided by Wix for free. These URLs include `wixsite.com`.
     - name: primary | type: boolean | description: Whether this is the site's primary URL.  
     - name: url | type: string | description: Published site URL.  | validation: maxLength 3000
     - name: multilingualInfo | type: MultilingualInfo | description: Language subdomain info hosted by [Wix multilingual](https://support.wix.com/article/wix-multilingual-adding-and-setting-up-wix-multilingual).  
        - name: languageCode | type: string | description: Language tag in [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format. For example, `en-US`.  | validation: format LANGUAGE_TAG
        - name: defaultLanguage | type: boolean | description: Whether this is the site's default language.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_PRIMARY_URL | Description: No primary URL exists for this site.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MISSING_IDENTITY | Description: Can't extract identity from request.
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNABLE_TO_EXTRACT_MS_ID | Description: Can't extract site GUID from request.


```

### Examples

### listPublishedSiteUrls
```javascript
import { site } from '@wix/urls';

async function listPublishedSiteUrls(options) {
  const response = await site.listPublishedSiteUrls(options);
};
```

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

async function myListPublishedSiteUrlsMethod(options) {
  const elevatedListPublishedSiteUrls = auth.elevate(site.listPublishedSiteUrls);
  const response = await elevatedListPublishedSiteUrls(options);
}
```

### listPublishedSiteUrls (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 { site } from '@wix/urls';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function listPublishedSiteUrls(options) {
  const response = await myWixClient.site.listPublishedSiteUrls(options);
};
```

---