> 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

# ListConnectedDomains

# Package: connectedDomains

# Namespace: ConnectedDomainService

# Method link: https://dev.wix.com/docs/api-reference/account-level/domains/connected-domains/connected-domain-v1/list-connected-domains.md

## Permission Scopes:
Manage Domains: SCOPE.ACC-DC-PREMIUM.MANAGE-DOMAINS

## Introduction

Retrieves a list of up to 100 connected domains.


You must pass the relevant Wix account ID in the header of the call.

The retrieved domains are sorted by `createdDate` in descending order.

> __Important:__ This call requires an account level API key and cannot be authenticated with the standard authorization header.

---

## REST API

### Schema

```
 Method: listConnectedDomains
 Description: Retrieves a list of up to 100 connected domains.   You must pass the relevant Wix account GUID in the header of the call.  The retrieved domains are sorted by `createdDate` in descending order.  > __Important:__ This call requires an account level API key and cannot be authenticated with the standard authorization header.
 URL: https://www.wixapis.com/domains/v1/connected-domains
 Method: GET
 Method parameters:
   param name: paging | type: CursorPaging    
        - name: limit | type: integer | description: Number of domains to load.  Min: `0` Max: `100`  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  
 Return type: ListConnectedDomainsResponse
  - name: pagingMetadata | type: CursorPagingMetadata | description: Metadata about the returned list of connected domains.  
     - name: count | type: integer | description: Number of domains returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  
  - name: connectedDomains | type: array<ConnectedDomain> | description: Retrieved connected domains.  
     - name: id | type: string | description: GUID of the connected domain. Identical to the domain name including TLD.  | read-only: true | validation: format HOSTNAME
     - name: domain | type: string | description: Domain name including TLD. Both root domains and subdomains are supported.  | validation: format HOSTNAME
     - name: connectionType | type: ConnectionType | description: How the domain is connected to the Wix site.  
         - enum:
         -     POINTING: The domain is connected by pointing. Wix doesn't manage DNS information.
         -     NAMESERVERS: The domain is connected by nameservers. Wix manages DNS information.
         -     HIDDEN: The domain isn't visible to site visitors.
     - name: siteInfo | type: SiteInfo | description: Information about the site to which the domain is assigned, and whether it's the primary domain or a redirect.  
        - ONE-OF: 
           - name: redirectInfo | type: RedirectAssignmentInfo | description: Redirect information, relevant when `assignmentType` = `REDIRECT`.  | read-only: true 
              - name: primaryDomain | type: string | description: Primary domain to which this domain will redirect.  | read-only: true | validation: format HOSTNAME
        - name: id | type: string | description: GUID of the site to which the domain is assigned.  | read-only: true | validation: format GUID
        - name: assignmentType | type: AssignmentType | description: The relationship assigned for this domain to the site.  Read more about [primary and redirected domains](https://support.wix.com/en/article/switching-your-primary-and-redirected-domains).  
             - enum:
             -     PRIMARY: The singular primary domain for a site. When this type is assigned, this domain will lead directly to the site.
             -     REDIRECT: A redirect domain for a site. Each site can have multiple redirect domains. When this type is assigned, this domain will redirect to the primary domain.
     - name: suppressNotifications | type: boolean | description: Whether the site owner receives standard email notifications from Wix about the connected domain.  Default: `false`  
     - name: dnsPropagationStatus | type: DnsPropagationStatus | description: DNS propagation status.  | read-only: true 
         - enum:
         -     COMPLETED: The domain's DNS propagation process has successfully finished.
         -     FAILED: The domain's DNS propagation process has failed.
         -     IN_PROGRESS: The domain's DNS propagation process has started but hasn't successfully completed yet.
     - name: createdDate | type: string | description: Date and time the `connectedDomain` object was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the `connectedDomain` object was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true | validation: format date-time


```

### Examples

### Retrieve a list of connected domains.
```curl
curl -X GET 'https://www.wixapis.com/domains/v1/connected-domains' \
-H 'wix-account-id: <ACCOUNT_ID>' \
-H 'Authorization: <AUTH>' \
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.domains.connectedDomains.listConnectedDomains(options)
 Description: Retrieves a list of up to 100 connected domains.   You must pass the relevant Wix account GUID in the header of the call.  The retrieved domains are sorted by `createdDate` in descending order.  > __Important:__ This call requires an account level API key and cannot be authenticated with the standard authorization header.
 Method parameters:
   param name: options | type: ListConnectedDomainsOptions  none  
        - name: paging | type: CursorPaging | description: Cursor paging options.  
           - name: limit | type: integer | description: Number of domains to load.  Min: `0` Max: `100`  | validation: minimum 0, maximum 100, format int32
           - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  
 Return type: PROMISE<ListConnectedDomainsResponse>
  - name: pagingMetadata | type: CursorPagingMetadata | description: Metadata about the returned list of connected domains.  
     - name: count | type: integer | description: Number of domains returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  
  - name: connectedDomains | type: array<ConnectedDomain> | description: Retrieved connected domains.  
     - name: _id | type: string | description: GUID of the connected domain. Identical to the domain name including TLD.  | read-only: true | validation: format HOSTNAME
     - name: domain | type: string | description: Domain name including TLD. Both root domains and subdomains are supported.  | validation: format HOSTNAME
     - name: connectionType | type: ConnectionType | description: How the domain is connected to the Wix site.  
         - enum:
         -     POINTING: The domain is connected by pointing. Wix doesn't manage DNS information.
         -     NAMESERVERS: The domain is connected by nameservers. Wix manages DNS information.
         -     HIDDEN: The domain isn't visible to site visitors.
     - name: siteInfo | type: SiteInfo | description: Information about the site to which the domain is assigned, and whether it's the primary domain or a redirect.  
        - ONE-OF: 
           - name: redirectInfo | type: RedirectAssignmentInfo | description: Redirect information, relevant when `assignmentType` = `REDIRECT`.  | read-only: true 
              - name: primaryDomain | type: string | description: Primary domain to which this domain will redirect.  | read-only: true | validation: format HOSTNAME
        - name: _id | type: string | description: GUID of the site to which the domain is assigned.  | read-only: true | validation: format GUID
        - name: assignmentType | type: AssignmentType | description: The relationship assigned for this domain to the site.  Read more about [primary and redirected domains](https://support.wix.com/en/article/switching-your-primary-and-redirected-domains).  
             - enum:
             -     PRIMARY: The singular primary domain for a site. When this type is assigned, this domain will lead directly to the site.
             -     REDIRECT: A redirect domain for a site. Each site can have multiple redirect domains. When this type is assigned, this domain will redirect to the primary domain.
     - name: suppressNotifications | type: boolean | description: Whether the site owner receives standard email notifications from Wix about the connected domain.  Default: `false`  
     - name: dnsPropagationStatus | type: DnsPropagationStatus | description: DNS propagation status.  | read-only: true 
         - enum:
         -     COMPLETED: The domain's DNS propagation process has successfully finished.
         -     FAILED: The domain's DNS propagation process has failed.
         -     IN_PROGRESS: The domain's DNS propagation process has started but hasn't successfully completed yet.
     - name: _createdDate | type: Date | description: Date and time the `connectedDomain` object was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the `connectedDomain` object was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.  | read-only: true 


```

### Examples

### List connected domains with an API key
```javascript
import { createClient, ApiKeyStrategy } from "@wix/sdk";
import { connectedDomains } from "@wix/domains";

const wixClient = createClient({
  modules: { connectedDomains },
  auth: ApiKeyStrategy({
    siteId: "MY-SITE-ID",
    apiKey: "MY-API-KEY",
  }),
});

async function listConnectedDomains(options) {
  const response =
    await wixClient.connectedDomains.listConnectedDomains(options);
}

```

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

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


async function listConnectedDomains(options) {
  const response = await myWixClient.connectedDomains.listConnectedDomains(options);
};
```

---