> 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`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ListDomainAssignments

# Package: domains

# Namespace: DomainAssignmentService

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

## Introduction

Retrieves a list of the domain assignments of the specified sites, given the provided paging.


Domain assignments are sorted by ID in ascending order.

If you don't specify any site IDs, the response contains no domain
assignments, even when you specify a paging cursor.

You must specify the Wix account ID in the `wix-account-id` header.

---

## REST API

### Schema

```
 Method: listDomainAssignments
 Description: Retrieves a list of the domain assignments of the specified sites, given the provided paging.   Domain assignments are sorted by GUID in ascending order.  If you don't specify any site GUIDs, the response contains no domain assignments, even when you specify a paging cursor.  You must specify the Wix account GUID in the `wix-account-id` header.
 URL: https://www.wixapis.com/domains/v1/domain-assignments
 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.  
   query param name: siteIds | type: array<siteIds> | description: IDs of the sites to retrieve domain assignments for.  If you don't specify any site GUIDs, no domain assignments are returned.  | validation: minItems 0, maxItems 100, format GUID
 Return type: ListDomainAssignmentsResponse
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - 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: domainAssignments | type: array<DomainAssignment> | description: Retrieved domain assignments.  
     - name: id | type: string | description: Domain assignment GUID. Identical to `domain`.  | read-only: true | validation: format HOSTNAME
     - name: domain | type: string | description: Domain name, including the top-level domain. For example, `mystunningsite.com`.  | validation: format HOSTNAME
     - name: siteInfo | type: SiteInfo | description: Site the domain is assigned to, and whether the domain is the site's primary domain or a redirect.  
        - ONE-OF: 
           - name: redirectInfo | type: RedirectAssignmentInfo | description: Redirect details.  Returned only when `assignmentType` is `REDIRECT`.  | read-only: true 
              - name: primaryDomain | type: string | description: Primary domain that this domain redirects to.  | read-only: true | validation: format HOSTNAME
        - name: id | type: string | description: GUID of the site the domain is assigned to.  Required unless the request header specifies the site GUID. If you specify the site GUID in both places, the GUIDs must be identical.  | validation: format GUID
        - name: assignmentType | type: AssignmentType | description: Whether the domain is the site's primary domain or a redirect to the site's primary domain.  
             - enum:
             -     PRIMARY: Site's primary domain. Visitors who enter this domain reach the site directly.
             -     REDIRECT: Domain that redirects visitors to the site's primary domain. A site can have up to 300 redirect domains.
     - name: createdDate | type: string | description: Date and time the domain assignment was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the domain assignment was last updated.  | read-only: true | validation: format date-time


```

### Examples

### List the domain assignments of a site
Retrieves the primary domain and redirect domains assigned to a site.

```curl
curl -X GET \
'https://www.wixapis.com/domains/v1/domain-assignments?siteIds=d7a341c4-196b-46e7-813c-2b0fc1847ec6' \
-H 'wix-account-id: <ACCOUNT_ID>' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.domains.domainAssignments.listDomainAssignments(options)
 Description: Retrieves a list of the domain assignments of the specified sites, given the provided paging.   Domain assignments are sorted by GUID in ascending order.  If you don't specify any site GUIDs, the response contains no domain assignments, even when you specify a paging cursor.  You must specify the Wix account GUID in the `wix-account-id` header.
 Method parameters:
   param name: options | type: ListDomainAssignmentsOptions  none  
        - name: siteIds | type: array<string> | description: IDs of the sites to retrieve domain assignments for.  If you don't specify any site GUIDs, no domain assignments are returned.  | validation: minItems 0, maxItems 100, format GUID
        - 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<ListDomainAssignmentsResponse>
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - 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: domainAssignments | type: array<DomainAssignment> | description: Retrieved domain assignments.  
     - name: _id | type: string | description: Domain assignment GUID. Identical to `domain`.  | read-only: true | validation: format HOSTNAME
     - name: domain | type: string | description: Domain name, including the top-level domain. For example, `mystunningsite.com`.  | validation: format HOSTNAME
     - name: siteInfo | type: SiteInfo | description: Site the domain is assigned to, and whether the domain is the site's primary domain or a redirect.  
        - ONE-OF: 
           - name: redirectInfo | type: RedirectAssignmentInfo | description: Redirect details.  Returned only when `assignmentType` is `REDIRECT`.  | read-only: true 
              - name: primaryDomain | type: string | description: Primary domain that this domain redirects to.  | read-only: true | validation: format HOSTNAME
        - name: _id | type: string | description: GUID of the site the domain is assigned to.  Required unless the request header specifies the site GUID. If you specify the site GUID in both places, the GUIDs must be identical.  | validation: format GUID
        - name: assignmentType | type: AssignmentType | description: Whether the domain is the site's primary domain or a redirect to the site's primary domain.  
             - enum:
             -     PRIMARY: Site's primary domain. Visitors who enter this domain reach the site directly.
             -     REDIRECT: Domain that redirects visitors to the site's primary domain. A site can have up to 300 redirect domains.
     - name: _createdDate | type: Date | description: Date and time the domain assignment was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the domain assignment was last updated.  | read-only: true 


```

### Examples

### List the domain assignments of a site
Retrieves the primary domain and redirect domains assigned to a site.

```javascript
import { domainAssignments } from "@wix/domains";

async function listDomainAssignments() {
  const response = await domainAssignments.listDomainAssignments({
    siteIds: ["d7a341c4-196b-46e7-813c-2b0fc1847ec6"],
  });
}

/* Promise resolves to:
 * {
 *   "pagingMetadata": {
 *     "count": 2,
 *     "hasNext": false
 *   },
 *   "domainAssignments": [
 *     {
 *       "_id": "mystunningsite.com",
 *       "domain": "mystunningsite.com",
 *       "siteInfo": {
 *         "id": "d7a341c4-196b-46e7-813c-2b0fc1847ec6",
 *         "assignmentType": "PRIMARY"
 *       },
 *       "_createdDate": "2026-10-12T08:15:42.000Z",
 *       "_updatedDate": "2026-10-12T08:15:42.000Z"
 *     },
 *     {
 *       "_id": "mystunningsite.net",
 *       "domain": "mystunningsite.net",
 *       "siteInfo": {
 *         "id": "d7a341c4-196b-46e7-813c-2b0fc1847ec6",
 *         "assignmentType": "REDIRECT",
 *         "redirectInfo": {
 *           "primaryDomain": "mystunningsite.com"
 *         }
 *       },
 *       "_createdDate": "2026-11-01T10:30:00.000Z",
 *       "_updatedDate": "2026-11-01T10:30:00.000Z"
 *     }
 *   ]
 * }
 */

```

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

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


async function listDomainAssignments(options) {
  const response = await myWixClient.domainAssignments.listDomainAssignments(options);
};
```

---