> 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

> **Deprecated.** This method is deprecated. Replacement: https://dev.wix.com/docs/api-reference/crm/loyalty-program/accounts/accounts/query-loyalty-accounts.md Planned removal date: 2025-06-30.

# ListAccounts

# Package: accounts

# Namespace: LoyaltyAccounts

# Method link: https://dev.wix.com/docs/api-reference/crm/loyalty-program/accounts/accounts/list-accounts.md

## Permission Scopes:
Read Loyalty: SCOPE.DC-LOYALTY.READ-LOYALTY

## Introduction

Retrieves a list of accounts, given the provided filters.

You can retrieve selected loyalty accounts with an array of `contactIds` or retrieve a list of all of a site's loyalty accounts
with an empty request parameter. Use the `cursorPaging` parameters to limit how many items load at a time.

Deprecated method, please use Query Loyalty Accounts or Search Accounts instead.

---

## REST API

### Schema

```
 Method: listAccounts
 Description: Retrieves a list of accounts, given the provided filters.  You can retrieve selected loyalty accounts with an array of `contactIds` or retrieve a list of all of a site's loyalty accounts with an empty request parameter. Use the `cursorPaging` parameters to limit how many items load at a time.  Deprecated method, please use Query Loyalty Accounts or Search Accounts instead.
 URL: https://www.wixapis.com/loyalty-accounts/v1/accounts
 Method: GET
 Method parameters:
   query param name: contactIds | type: array<contactIds> | description: List of contact GUIDs.  | validation: maxItems 50, format GUID
   param name: cursorPaging | type: CursorPaging    
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
 Return type: ListAccountsResponse
  - name: accounts | type: array<LoyaltyAccount> | description: Retrieved loyalty accounts.  
     - name: id | type: string | description: Account GUID.  | read-only: true | validation: format GUID
     - name: contactId | type: string | description: Account owner's contact GUID. See the Contacts API to learn more about a site's contacts.  | read-only: true | validation: format GUID
     - name: memberId | type: string | description: Member GUID of the account owner. See the Members API to learn more about a site's members.  | read-only: true | validation: format GUID
     - name: points | type: Points | description: Details of the account's point totals.  | read-only: true 
        - name: balance | type: integer | description: Current points balance.  Equal to the sum of `earned` and `adjusted` points, minus `redeemed` points.  | read-only: true | validation: minimum 0
        - name: earned | type: integer | description: Total earned points.  | read-only: true | validation: minimum 0
        - name: adjusted | type: integer | description: Total adjusted points.  | read-only: true | validation: minimum 0
        - name: redeemed | type: integer | description: Total redeemed points.  | read-only: true | validation: minimum 0
        - name: expired | type: integer | description: Total expired points.  | read-only: true | validation: minimum 0
     - name: rewardAvailable | type: boolean | description: Whether the account has enough points in `points.balance` to redeem for a reward.  | read-only: true 
     - name: createdDate | type: string | description: Date and time the account was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the account was last updated.  | read-only: true | validation: format date-time
     - name: lastActivityDate | type: string | description: Date and time of the account's last activity.  | read-only: true | validation: format date-time
     - name: revision | type: number | description: Revision number, which increments by 1 each time the loyalty account is updated.  To prevent conflicting changes, the current `revision` must be passed when updating the loyalty account.  Ignored when creating an account.  
     - name: tier | type: Tier | description: Tier information.  See the Tiers API for more information.  | read-only: true 
        - name: id | type: string | description: Tier GUID.  This field will not be returned if the account belongs to the base tier.  | read-only: true | validation: format GUID
        - name: updatedDate | type: string | description: Date and time the tier information was last recalculated.  | read-only: true | validation: format date-time
        - name: points | type: integer | description: Points earned and adjusted over the tier's current rolling window.  | read-only: true | validation: minimum 0
     - name: contact | type: Contact | description: Contact information.  | read-only: true 
        - name: id | type: string | description: Contact GUID.  | read-only: true | validation: format GUID
        - name: name | type: string | description: Contact's first and last name.  | read-only: true 
        - name: picture | type: Image | description: Contact's profile picture.  | read-only: true 
           - name: id | type: string | description: WixMedia image GUID.  
           - name: url | type: string | description: Image URL.  
           - name: height | type: integer | description: Original image height.  | read-only: true 
           - name: width | type: integer | description: Original image width.  | read-only: true 
        - name: email | type: string | description: Contact's email address.  | read-only: true | validation: format EMAIL
        - name: displayName | type: string | description: Contact's first and last name. If no name is provided, uses contact's email.  | read-only: true 
     - name: pointsExpiration | type: PointsExpiration | description: Points expiration information.  | read-only: true 
        - name: expirationDate | type: string | description: Date and time at which points are expiring.  | read-only: true | validation: format date-time
        - name: expiringPointsAmount | type: integer | description: Amount of points that are going to expire at that date.  | read-only: true 
  - name: pagingMetadata | type: PagingMetadataV2 | description: Details on the paged set of results returned.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  
     - 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 string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000


```

### Examples

### Get a list of accounts, filtered by contact ids
```curl
curl -X GET \
  'https://www.wixapis.com/loyalty-accounts/v1/accounts?contactIds[]=88615e02-3e8a-4297-8939-5d0a432b322a&contactIds[]=fb8f125e-bfc3-4d9a-80c2-215494f24731' \
  -H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.loyalty.accounts.listAccounts(options)
 Description: Retrieves a list of accounts, given the provided filters.  You can retrieve selected loyalty accounts with an array of `contactIds` or retrieve a list of all of a site's loyalty accounts with an empty request parameter. Use the `cursorPaging` parameters to limit how many items load at a time.  Deprecated method, please use Query Loyalty Accounts or Search Accounts instead.
 Method parameters:
   param name: options | type: ListAccountsOptions  none  
        - name: contactIds | type: array<string> | description: List of contact GUIDs.  | validation: maxItems 50, format GUID
        - name: cursorPaging | type: CursorPaging | description: Pagination options.  
           - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
           - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
 Return type: PROMISE<ListAccountsResponse>
  - name: accounts | type: array<LoyaltyAccount> | description: Retrieved loyalty accounts.  
     - name: _id | type: string | description: Account GUID.  | read-only: true | validation: format GUID
     - name: contactId | type: string | description: Account owner's contact GUID. See the Contacts API to learn more about a site's contacts.  | read-only: true | validation: format GUID
     - name: memberId | type: string | description: Member GUID of the account owner. See the Members API to learn more about a site's members.  | read-only: true | validation: format GUID
     - name: points | type: Points | description: Details of the account's point totals.  | read-only: true 
        - name: balance | type: integer | description: Current points balance.  Equal to the sum of `earned` and `adjusted` points, minus `redeemed` points.  | read-only: true | validation: minimum 0
        - name: earned | type: integer | description: Total earned points.  | read-only: true | validation: minimum 0
        - name: adjusted | type: integer | description: Total adjusted points.  | read-only: true | validation: minimum 0
        - name: redeemed | type: integer | description: Total redeemed points.  | read-only: true | validation: minimum 0
        - name: expired | type: integer | description: Total expired points.  | read-only: true | validation: minimum 0
     - name: rewardAvailable | type: boolean | description: Whether the account has enough points in `points.balance` to redeem for a reward.  | read-only: true 
     - name: _createdDate | type: Date | description: Date and time the account was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the account was last updated.  | read-only: true 
     - name: lastActivityDate | type: Date | description: Date and time of the account's last activity.  | read-only: true 
     - name: revision | type: number | description: Revision number, which increments by 1 each time the loyalty account is updated.  To prevent conflicting changes, the current `revision` must be passed when updating the loyalty account.  Ignored when creating an account.  
     - name: tier | type: Tier | description: Tier information.  See the Tiers API for more information.  | read-only: true 
        - name: _id | type: string | description: Tier GUID.  This field will not be returned if the account belongs to the base tier.  | read-only: true | validation: format GUID
        - name: _updatedDate | type: Date | description: Date and time the tier information was last recalculated.  | read-only: true 
        - name: points | type: integer | description: Points earned and adjusted over the tier's current rolling window.  | read-only: true | validation: minimum 0
     - name: contact | type: Contact | description: Contact information.  | read-only: true 
        - name: _id | type: string | description: Contact GUID.  | read-only: true | validation: format GUID
        - name: name | type: string | description: Contact's first and last name.  | read-only: true 
        - name: picture | type: Image | description: Contact's profile picture.  | read-only: true 
           - name: _id | type: string | description: WixMedia image GUID.  
           - name: url | type: string | description: Image URL.  
           - name: height | type: integer | description: Original image height.  | read-only: true 
           - name: width | type: integer | description: Original image width.  | read-only: true 
        - name: email | type: string | description: Contact's email address.  | read-only: true | validation: format EMAIL
        - name: displayName | type: string | description: Contact's first and last name. If no name is provided, uses contact's email.  | read-only: true 
     - name: pointsExpiration | type: PointsExpiration | description: Points expiration information.  | read-only: true 
        - name: expirationDate | type: Date | description: Date and time at which points are expiring.  | read-only: true 
        - name: expiringPointsAmount | type: integer | description: Amount of points that are going to expire at that date.  | read-only: true 
  - name: pagingMetadata | type: PagingMetadataV2 | description: Details on the paged set of results returned.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  
     - 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 string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000


```

### Examples

### Get a list of loyalty accounts, limited to 3 accounts
```javascript
import { accounts } from '@wix/loyalty';  

/* Sample options value: 
 *   {
 *   'cursorPaging': {
 *     'limit': 3
 *     }
 *   }
 */

const options = {
  cursorPaging: {
    limit: 3
  }
};

export async function myListLoyaltyAccountsFunction() {
  try {
    const accountsList = await accounts.listAccounts(options);

    const firstAccountId = accountsList.accounts[0]._id;
    const firstAccountBalance = accountsList.accounts[0].points.balance;

    console.log('Success! The ID and point balance for the first account in your list is: ', firstAccountId, ' and ', firstAccountBalance);  

    return accountsList;
  } catch (error) {
    console.error(error);
  }
}

/* Promise resolves to:
 * {
 *   "accounts": [
 *     {
 *       "_id": "dd0020ca-eef0-4ff1-a615-63ecdcdfcd28",
 *       "contactId": "8a71f711-f77b-43fe-9e3d-5c243f94b2bc",
 *       "points": {
 *         "balance": 700,
 *         "earned": 135,
 *         "adjusted": 565,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": true,
 *       "_createdDate": "2022-11-08T22:52:44.758Z",
 *       "_updatedDate": "2022-11-09T11:18:45.037Z",
 *       "revision": "6",
 *       "tier": {
 *         "_updatedDate": "2022-11-09T11:18:45.037Z",
 *         "points": 700
 *       }
 *     },
 *     {
 *       "_id": "7b801cdf-e74c-42b7-ba57-a068a78ea6b5",
 *       "contactId": "6f158e70-26f6-4fce-80a8-1d57e6791c34",
 *       "points": {
 *         "balance": 125,
 *         "earned": 125,
 *         "adjusted": 0,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": true,
 *       "_createdDate": "2022-11-07T15:49:11.763Z",
 *       "_updatedDate": "2022-11-09T06:41:48.879Z",
 *       "revision": "3",
 *       "tier": {
 *         "_updatedDate": "2022-11-09T06:41:48.616Z",
 *         "points": 125
 *       }
 *     },
 *     {
 *       "_id": "f0411f1a-ad5a-4b80-94c2-34350cbf1af7",
 *       "contactId": "8a71f711-f77b-43fe-9e3d-5c243f94b2cd",
 *       "points": {
 *         "balance": 0,
 *         "earned": 0,
 *         "adjusted": 0,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": false,
 *       "_createdDate": "2022-11-09T06:44:48.159Z",
 *       "_updatedDate": "2022-11-09T06:44:48.159Z",
 *       "revision": "1"
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 3,
 *     "total": 4,
 *     "cursors": {
 *       "next": "4cdca1370d1419d1874c0eb639ef64804fa6d5de.Gh0KDnBvaW50cy5iYWxhbmNlEAEaCREAAAAAAAAAABorCgxfdXBkYXRlZERhdGUaGyoZChcKCiR0aW1lc3RhbXASCREA8HklskV4QiIkZjA0MTFmMWEtYWQ1YS00YjgwLTk0YzItMzQzNTBjYmYxYWY3"
 *     }
 *   }
 * }
 */
```

### Get a list of specific loyalty accounts using their account IDs (with elevated permissions)
```javascript
import { accounts } from '@wix/loyalty';
import { auth } from '@wix/essentials';

/* Sample options value: 
* {
*   contactIds: [
*     '8a71f711-f77b-43fe-9e3d-5c243f94b2bc',
*     '6f158e70-26f6-4fce-80a8-1d57e6791c34'
*   ]
* }
*/  

const elevatedListAccounts = auth.elevate(accounts.listAccounts);

export async function myListLoyaltyAccountsFunction() {
  try {
    const accountsList = await elevatedListAccounts(contactIds);

    const firstAccountId = accountsList.accounts[0]._id;
    const firstAccountBalance = accountsList.accounts[0].points.balance;

    console.log('Success! The ID and point balance for the first account in your list is: ', firstAccountId, 'and ', firstAccountBalance);

    return accountsList;
  } catch (error) {
    console.error(error);
  }
}

/* Promise resolves to:
 * {
 *   "accounts": [
 *     {
 *       "_id": "dd0020ca-eef0-4ff1-a615-63ecdcdfcd28",
 *       "contactId": "8a71f711-f77b-43fe-9e3d-5c243f94b2bc",
 *       "points": {
 *         "balance": 700,
 *         "earned": 135,
 *         "adjusted": 565,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": true,
 *       "_createdDate": "2022-11-08T22:52:44.758Z",
 *       "_updatedDate": "2022-11-09T11:18:45.037Z",
 *       "revision": "6",
 *       "tier": {
 *         "_updatedDate": "2022-11-09T11:18:45.037Z",
 *         "points": 700
 *       }
 *     },
 *     {
 *       "_id": "7b801cdf-e74c-42b7-ba57-a068a78ea6b5",
 *       "contactId": "6f158e70-26f6-4fce-80a8-1d57e6791c34",
 *       "points": {
 *         "balance": 125,
 *         "earned": 125,
 *         "adjusted": 0,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": true,
 *       "_createdDate": "2022-11-07T15:49:11.763Z",
 *       "_updatedDate": "2022-11-09T06:41:48.879Z",
 *       "revision": "3",
 *       "tier": {
 *         "_updatedDate": "2022-11-09T06:41:48.616Z",
 *         "points": 125
 *       }
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 2,
 *     "total": 2,
 *     "cursors": {}
 *   }
 * }
 */
```

### Get a list of specific loyalty accounts using their account IDs
```javascript
import { accounts } from '@wix/loyalty';

/* Sample options value: 
 * {
 *   contactIds: [
 *     '8a71f711-f77b-43fe-9e3d-5c243f94b2bc',
 *     '6f158e70-26f6-4fce-80a8-1d57e6791c34'
 *   ]
 * }
 */  

export async function myListLoyaltyAccountsFunction() {
  try {
    const accountsList = await accounts.listAccounts(contactIds);

    const firstAccountId = accountsList.accounts[0]._id;
    const firstAccountBalance = accountsList.accounts[0].points.balance;

    console.log('Success! The ID and point balance for the first account in your list is: ', firstAccountId, 'and ', firstAccountBalance);

    return accountsList;
  } catch (error) {
    console.error(error);
  }
}

/* Promise resolves to:
 * {
 *   "accounts": [
 *     {
 *       "_id": "dd0020ca-eef0-4ff1-a615-63ecdcdfcd28",
 *       "contactId": "8a71f711-f77b-43fe-9e3d-5c243f94b2bc",
 *       "points": {
 *         "balance": 700,
 *         "earned": 135,
 *         "adjusted": 565,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": true,
 *       "_createdDate": "2022-11-08T22:52:44.758Z",
 *       "_updatedDate": "2022-11-09T11:18:45.037Z",
 *       "revision": "6",
 *       "tier": {
 *         "_updatedDate": "2022-11-09T11:18:45.037Z",
 *         "points": 700
 *       }
 *     },
 *     {
 *       "_id": "7b801cdf-e74c-42b7-ba57-a068a78ea6b5",
 *       "contactId": "6f158e70-26f6-4fce-80a8-1d57e6791c34",
 *       "points": {
 *         "balance": 125,
 *         "earned": 125,
 *         "adjusted": 0,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": true,
 *       "_createdDate": "2022-11-07T15:49:11.763Z",
 *       "_updatedDate": "2022-11-09T06:41:48.879Z",
 *       "revision": "3",
 *       "tier": {
 *         "_updatedDate": "2022-11-09T06:41:48.616Z",
 *         "points": 125
 *       }
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 2,
 *     "total": 2,
 *     "cursors": {}
 *   }
 * }
 */
```

### Get a list of loyalty accounts, limited to 3 accounts (with elevated permissions)
```javascript
import { accounts } from '@wix/loyalty';
import { auth } from '@wix/essentials';

/* Sample options value: 
 *   {
 *   'cursorPaging': {
 *     'limit': 3
 *     }
 *   }
 */

const elevatedListAccounts = auth.elevate(accounts.listAccounts);

const options = {
  cursorPaging: {
    limit: 3
  }
};

export async function myListLoyaltyAccountsFunction() {
  try {
    const accountsList = await elevatedListAccounts(options);

    const firstAccountId = accountsList.accounts[0]._id;
    const firstAccountBalance = accountsList.accounts[0].points.balance;

    console.log('Success! The ID and point balance for the first account in your list is: ', firstAccountId, ' and ', firstAccountBalance);  

    return accountsList;
  } catch (error) {
    console.error(error);
  }
}

/* Promise resolves to:
 * {
 *   "accounts": [
 *     {
 *       "_id": "dd0020ca-eef0-4ff1-a615-63ecdcdfcd28",
 *       "contactId": "8a71f711-f77b-43fe-9e3d-5c243f94b2bc",
 *       "points": {
 *         "balance": 700,
 *         "earned": 135,
 *         "adjusted": 565,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": true,
 *       "_createdDate": "2022-11-08T22:52:44.758Z",
 *       "_updatedDate": "2022-11-09T11:18:45.037Z",
 *       "revision": "6",
 *       "tier": {
 *         "_updatedDate": "2022-11-09T11:18:45.037Z",
 *         "points": 700
 *       }
 *     },
 *     {
 *       "_id": "7b801cdf-e74c-42b7-ba57-a068a78ea6b5",
 *       "contactId": "6f158e70-26f6-4fce-80a8-1d57e6791c34",
 *       "points": {
 *         "balance": 125,
 *         "earned": 125,
 *         "adjusted": 0,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": true,
 *       "_createdDate": "2022-11-07T15:49:11.763Z",
 *       "_updatedDate": "2022-11-09T06:41:48.879Z",
 *       "revision": "3",
 *       "tier": {
 *         "_updatedDate": "2022-11-09T06:41:48.616Z",
 *         "points": 125
 *       }
 *     },
 *     {
 *       "_id": "f0411f1a-ad5a-4b80-94c2-34350cbf1af7",
 *       "contactId": "8a71f711-f77b-43fe-9e3d-5c243f94b2cd",
 *       "points": {
 *         "balance": 0,
 *         "earned": 0,
 *         "adjusted": 0,
 *         "redeemed": 0
 *       },
 *       "rewardAvailable": false,
 *       "_createdDate": "2022-11-09T06:44:48.159Z",
 *       "_updatedDate": "2022-11-09T06:44:48.159Z",
 *       "revision": "1"
 *     }
 *   ],
 *   "pagingMetadata": {
 *     "count": 3,
 *     "total": 4,
 *     "cursors": {
 *       "next": "4cdca1370d1419d1874c0eb639ef64804fa6d5de.Gh0KDnBvaW50cy5iYWxhbmNlEAEaCREAAAAAAAAAABorCgxfdXBkYXRlZERhdGUaGyoZChcKCiR0aW1lc3RhbXASCREA8HklskV4QiIkZjA0MTFmMWEtYWQ1YS00YjgwLTk0YzItMzQzNTBjYmYxYWY3"
 *     }
 *   }
 * }
 */
```

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

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


async function listAccounts(options) {
  const response = await myWixClient.accounts.listAccounts(options);
};
```

---