> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> 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

# ListBusinessEmailEligibleDomains

# Package: businessEmail

# Namespace: GoogleProductEligibility

# Method link: https://dev.wix.com/docs/api-reference/account-level/premium/business-email/google-subscription-v1/list-business-email-eligible-domains.md

## Permission Scopes:
Read Business Email: SCOPE.ACC-DC-PREMIUM.READ-MAILBOXES

## Introduction

Retrieves the domains owned by the caller's account on which a Business Email can be purchased.

Domains that have a Google subscription in any status, including expired or transferred out, aren't returned, unless the subscription's purchase was never delivered. To find out what the customer can do with one of those domains, call [Resolve Business Email Action](https://dev.wix.com/docs/api-reference/account-level/premium/business-email/google-subscription-v1/resolve-business-email-action.md). Restricted domains are returned with the restriction, so the customer can see why they can't be used.

Specify `siteId` to return only the domains connected to that site.

The method doesn't change any data, and doesn't check whether Google can provide Business Email for each domain. Call [Is Eligible](https://dev.wix.com/docs/api-reference/account-level/premium/business-email/google-subscription-v1/is-eligible.md) before a purchase.

---

## REST API

### Schema

```
 Method: listBusinessEmailEligibleDomains
 Description: Retrieves the domains owned by the caller's account on which a Business Email can be purchased.  Domains that have a Google subscription in any status, including expired or transferred out, aren't returned, unless the subscription's purchase was never delivered. To find out what the customer can do with one of those domains, call [Resolve Business Email Action](https://dev.wix.com/docs/api-reference/account-level/premium/business-email/google-subscription-v1/resolve-business-email-action.md). Restricted domains are returned with the restriction, so the customer can see why they can't be used.  Specify `siteId` to return only the domains connected to that site.  The method doesn't change any data, and doesn't check whether Google can provide Business Email for each domain. Call [Is Eligible](https://dev.wix.com/docs/api-reference/account-level/premium/business-email/google-subscription-v1/is-eligible.md) before a purchase.
 URL: https://www.wixapis.com/google-subscriptions/v1/google-subscriptions/business-email-eligible-domains
 Method: GET
 Method parameters:
   query param name: siteId | type: siteId | description: GUID of a site. When specified, only domains connected to this site are returned.  | validation: format GUID
 Return type: ListBusinessEmailEligibleDomainsResponse
  - name: domains | type: array<BusinessEmailEligibleDomain> | description: Domains a Business Email can be purchased on.  | validation: maxItems 10000
     - name: domainName | type: string | description: Domain name. For example, `my-domain.com`.  | validation: format HOSTNAME
     - name: restriction | type: RestrictedDomainReason | description: Reason the domain is restricted. `RESTRICTED_DOMAIN_REASON_UNSPECIFIED` when the domain isn't restricted.  
         - enum:
         -     RESTRICTED_DOMAIN_REASON_UNSPECIFIED: The domain isn't restricted.
         -     SUBDOMAIN: The domain is a subdomain rather than a registrable domain.
         -     BRAND: The domain contains a Google trademark.
         -     TLD: Google doesn't support the domain's top-level domain.
     - name: dnsPropagated | type: boolean | description: Whether the domain's DNS propagation to Wix completed. Always `true` for a domain registered with Wix. Until it completes, automatic domain verification with Google may not succeed.  
     - name: siteId | type: string | description: GUID of the site the domain is connected to. For a redirect domain, the site of the domain it redirects to. Not returned when the domain isn't connected to a site.  | validation: format GUID

 Possible Errors:
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: GOOGLE_SUBSCRIPTIONS_UNAVAILABLE | Description: The caller's Google subscriptions couldn't be read. Try again later. Also returned when the account has more than 10,000 Google subscription records.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: DOMAINS_UNAVAILABLE | Description: The caller's domains couldn't be read. Try again later.


```

### Examples

### List the domains a site's Business Email can be purchased on
Retrieves the domains owned by the caller's account and connected to the specified site, on which Business Email can be purchased.

```curl
curl -X GET \
'https://www.wixapis.com/google-subscriptions/v1/google-subscriptions/business-email-eligible-domains?siteId=3f9a6c2e-8b41-4d7a-9e15-c2d8a7b06f43' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.premium.googleSubscriptions.listBusinessEmailEligibleDomains(options)
 Description: Retrieves the domains owned by the caller's account on which a Business Email can be purchased.  Domains that have a Google subscription in any status, including expired or transferred out, aren't returned, unless the subscription's purchase was never delivered. To find out what the customer can do with one of those domains, call [Resolve Business Email Action](https://dev.wix.com/docs/api-reference/account-level/premium/business-email/google-subscription-v1/resolve-business-email-action.md). Restricted domains are returned with the restriction, so the customer can see why they can't be used.  Specify `siteId` to return only the domains connected to that site.  The method doesn't change any data, and doesn't check whether Google can provide Business Email for each domain. Call [Is Eligible](https://dev.wix.com/docs/api-reference/account-level/premium/business-email/google-subscription-v1/is-eligible.md) before a purchase.
 Method parameters:
   param name: options | type: ListBusinessEmailEligibleDomainsOptions  none  
        - name: siteId | type: string | description: GUID of a site. When specified, only domains connected to this site are returned.  | validation: format GUID
 Return type: PROMISE<ListBusinessEmailEligibleDomainsResponse>
  - name: domains | type: array<BusinessEmailEligibleDomain> | description: Domains a Business Email can be purchased on.  | validation: maxItems 10000
     - name: domainName | type: string | description: Domain name. For example, `my-domain.com`.  | validation: format HOSTNAME
     - name: restriction | type: RestrictedDomainReason | description: Reason the domain is restricted. `RESTRICTED_DOMAIN_REASON_UNSPECIFIED` when the domain isn't restricted.  
         - enum:
         -     RESTRICTED_DOMAIN_REASON_UNSPECIFIED: The domain isn't restricted.
         -     SUBDOMAIN: The domain is a subdomain rather than a registrable domain.
         -     BRAND: The domain contains a Google trademark.
         -     TLD: Google doesn't support the domain's top-level domain.
     - name: dnsPropagated | type: boolean | description: Whether the domain's DNS propagation to Wix completed. Always `true` for a domain registered with Wix. Until it completes, automatic domain verification with Google may not succeed.  
     - name: siteId | type: string | description: GUID of the site the domain is connected to. For a redirect domain, the site of the domain it redirects to. Not returned when the domain isn't connected to a site.  | validation: format GUID

 Possible Errors:
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: GOOGLE_SUBSCRIPTIONS_UNAVAILABLE | Description: The caller's Google subscriptions couldn't be read. Try again later. Also returned when the account has more than 10,000 Google subscription records.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: DOMAINS_UNAVAILABLE | Description: The caller's domains couldn't be read. Try again later.


```

### Examples

### List the domains a site's Business Email can be purchased on
Retrieves the domains owned by the caller's account and connected to the specified site, on which Business Email can be purchased.

```javascript
import { googleSubscriptions } from "@wix/premium";

async function listBusinessEmailEligibleDomains() {
  const response = await googleSubscriptions.listBusinessEmailEligibleDomains({
    siteId: "3f9a6c2e-8b41-4d7a-9e15-c2d8a7b06f43",
  });
}

/* Promise resolves to:
 * {
 *   "domains": [
 *     {
 *       "domainName": "my-domain.com",
 *       "restriction": "RESTRICTED_DOMAIN_REASON_UNSPECIFIED",
 *       "dnsPropagated": true,
 *       "siteId": "3f9a6c2e-8b41-4d7a-9e15-c2d8a7b06f43"
 *     },
 *     {
 *       "domainName": "shop.my-domain.com",
 *       "restriction": "SUBDOMAIN",
 *       "dnsPropagated": false,
 *       "siteId": "3f9a6c2e-8b41-4d7a-9e15-c2d8a7b06f43"
 *     }
 *   ]
 * }
 */

```

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

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


async function listBusinessEmailEligibleDomains(options) {
  const response = await myWixClient.googleSubscriptions.listBusinessEmailEligibleDomains(options);
};
```

---