> 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

# ValidateDomainTransferability

# Package: domains

# Namespace: DomainTransferInValidationsService

# Method link: https://dev.wix.com/docs/api-reference/account-level/domains/domain-transfer-in/validate-domain-transferability.md

## Introduction

Validates whether a domain can be transferred to Wix.

Checks the domain against every transfer requirement in a single call: TLD support, premium status, whether the domain is already registered with Wix, and whether a transfer is already in progress. Call this method before starting a transfer to confirm eligibility.

Validation problems are returned in `validationResult.violations`, not as errors. A domain can fail several checks at once, so the list can contain more than one violation. An empty list means the domain can be transferred.

To validate the authorization code for the transfer, call [Validate Authorization Code](https://dev.wix.com/docs/api-reference/account-level/domains/domain-transfer-in/validate-authorization-code.md).

---

## REST API

### Schema

```
 Method: validateDomainTransferability
 Description: Validates whether a domain can be transferred to Wix.  Checks the domain against every transfer requirement in a single call: TLD support, premium status, whether the domain is already registered with Wix, and whether a transfer is already in progress. Call this method before starting a transfer to confirm eligibility.  Validation problems are returned in `validationResult.violations`, not as errors. A domain can fail several checks at once, so the list can contain more than one violation. An empty list means the domain can be transferred.  To validate the authorization code for the transfer, call [Validate Authorization Code](https://dev.wix.com/docs/api-reference/account-level/domains/domain-transfer-in/validate-authorization-code.md).
 URL: https://www.wixapis.com/premium/domains/v1/transfer-in-domains/{domain}/validate-transferability
 Method: POST
 Return type: ValidateDomainTransferabilityResponse
  - name: validationResult | type: DomainTransferInValidationResult | description: Validation result, including any violations found.  
     - name: id | type: string | description: Validated domain name, including the TLD. For example, `example.com`.  | read-only: true | validation: format HOSTNAME
     - name: violations | type: array<Violation> | description: Issues that prevent the transfer. Empty if the domain passed every check.  | validation: maxItems 100
         - enum:
         -     UNKNOWN_VIOLATION: Unknown violation.
         -     DOMAIN_NOT_FOUND: Domain isn't registered, or the current registrar can't confirm that it can be transferred.
         -     DOMAIN_TRANSFER_IN_AUTHORIZATION_CODE_NOT_VALID: Authorization code isn't valid for this domain. The Wix user must request a new code from the current registrar.
         -     DOMAIN_TRANSFER_IN_TLD_NOT_SUPPORTED: Domain's TLD doesn't support transfers to Wix.
         -     DOMAIN_TRANSFER_IN_REQUEST_ALREADY_EXIST: A transfer to Wix is already in progress for this domain.
         -     DOMAIN_ALREADY_TAKEN: Domain is already registered with Wix.
         -     TRANSFER_IN_PREMIUM_DOMAIN_NOT_SUPPORTED: Domain is a premium domain. Premium domains can't be transferred to Wix.
         -     DOMAIN_TRANSFER_IN_CLIENT_TRANSFER_PROHIBITED: Domain is locked with a `clientTransferProhibited` status. The Wix user must unlock it at the current registrar.
         -     DOMAIN_TRANSFER_IN_CREATION_DATE_LESS_THAN_60_DAYS: Domain was registered or last transferred less than 60 days ago.


```

### Examples

### Validate a transferable domain
Validates a domain that meets every requirement for transferring to Wix.

```curl
curl -X POST \
'https://www.wixapis.com/premium/domains/v1/transfer-in-domains/example.com/validate-transferability' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{}'
```

### Validate a domain with violations
Validates a premium domain, which can't be transferred to Wix.

```curl
curl -X POST \
'https://www.wixapis.com/premium/domains/v1/transfer-in-domains/luxury.com/validate-transferability' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.domains.transferInValidations.validateDomainTransferability(domain)
 Description: Validates whether a domain can be transferred to Wix.  Checks the domain against every transfer requirement in a single call: TLD support, premium status, whether the domain is already registered with Wix, and whether a transfer is already in progress. Call this method before starting a transfer to confirm eligibility.  Validation problems are returned in `validationResult.violations`, not as errors. A domain can fail several checks at once, so the list can contain more than one violation. An empty list means the domain can be transferred.  To validate the authorization code for the transfer, call [Validate Authorization Code](https://dev.wix.com/docs/api-reference/account-level/domains/domain-transfer-in/validate-authorization-code.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  domain
 Method parameters: 
   param name: domain | type: string | description: Domain name to validate, including the TLD. For example, `example.com`.  A leading `www.` is removed and the name is converted to lowercase before validation. Subdomains aren't supported. | required: true | validation: format HOSTNAME, immutable
 Return type: PROMISE<ValidateDomainTransferabilityResponse>
  - name: validationResult | type: DomainTransferInValidationResult | description: Validation result, including any violations found.  
     - name: _id | type: string | description: Validated domain name, including the TLD. For example, `example.com`.  | read-only: true | validation: format HOSTNAME
     - name: violations | type: array<Violation> | description: Issues that prevent the transfer. Empty if the domain passed every check.  | validation: maxItems 100
         - enum:
         -     UNKNOWN_VIOLATION: Unknown violation.
         -     DOMAIN_NOT_FOUND: Domain isn't registered, or the current registrar can't confirm that it can be transferred.
         -     DOMAIN_TRANSFER_IN_AUTHORIZATION_CODE_NOT_VALID: Authorization code isn't valid for this domain. The Wix user must request a new code from the current registrar.
         -     DOMAIN_TRANSFER_IN_TLD_NOT_SUPPORTED: Domain's TLD doesn't support transfers to Wix.
         -     DOMAIN_TRANSFER_IN_REQUEST_ALREADY_EXIST: A transfer to Wix is already in progress for this domain.
         -     DOMAIN_ALREADY_TAKEN: Domain is already registered with Wix.
         -     TRANSFER_IN_PREMIUM_DOMAIN_NOT_SUPPORTED: Domain is a premium domain. Premium domains can't be transferred to Wix.
         -     DOMAIN_TRANSFER_IN_CLIENT_TRANSFER_PROHIBITED: Domain is locked with a `clientTransferProhibited` status. The Wix user must unlock it at the current registrar.
         -     DOMAIN_TRANSFER_IN_CREATION_DATE_LESS_THAN_60_DAYS: Domain was registered or last transferred less than 60 days ago.


```

### Examples

### Validate a transferable domain
Validates a domain that meets every requirement for transferring to Wix.

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

async function validateDomainTransferability() {
  const response =
    await transferInValidations.validateDomainTransferability("example.com");
}

/* Promise resolves to:
 * {
 *   "validationResult": {
 *     "_id": "example.com",
 *     "violations": []
 *   }
 * }
 */

```

### validateDomainTransferability (self-hosted)
Self-hosted 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 { transferInValidations } from '@wix/domains';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function validateDomainTransferability(domain) {
  const response = await myWixClient.transferInValidations.validateDomainTransferability(domain);
};
```

---