> 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

# GetDnsPropagation

# Package: domains

# Namespace: DnsPropagationService

# Method link: https://dev.wix.com/docs/api-reference/account-level/domains/dns-propagation/get-dns-propagation.md

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

## Introduction

Retrieves DNS propagation status for a domain.

Use this method to check if DNS records are properly configured and propagated after connecting a custom domain,
during domain setup to see required DNS records, or to monitor ongoing propagation status after making DNS changes.

---

## REST API

### Schema

```
 Method: getDnsPropagation
 Description: Retrieves DNS propagation status for a domain.  Use this method to check if DNS records are properly configured and propagated after connecting a custom domain, during domain setup to see required DNS records, or to monitor ongoing propagation status after making DNS changes.
 URL: https://www.wixapis.com/premium/domains/v1/dns-propagations/{dnsPropagationId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  dnsPropagationId
 Method parameters: 
   param name: dnsPropagationId | type:   none | required: true 
 Return type: GetDnsPropagationResponse
  - name: dnsPropagation | type: DnsPropagation | description: Retrieved DNS propagation.  
     - ONE-OF: 
        - name: failureInfo | type: FailedStatusInfo | description: Details about DNS propagation failure, including which record types failed. Only present when `status` is `FAILED`.  | read-only: true 
           - name: invalidRecords | type: array<InvalidRecord> | description: The DNS record types that failed propagation.  Max: 3 invalid records  | read-only: true 
                 - enum:
                 -     INVALID_A_RECORD: The propagation of the A record has failed.
                 -     INVALID_NS_RECORD: The propagation of the NS record has failed.
                 -     INVALID_CNAME_RECORD: The propagation of at least one CNAME record has failed.
           - name: invalidARecordInfo | type: InvalidRecordInfo | description: Details about the A record for which the DNS propagation has failed. Includes all expected and current values of the A record.  | read-only: true 
              - name: expectedDnsRecords | type: array<DnsRecord> | description: The DNS records that should be configured in the external database. Note that there can only be a single A and NS record.  Max: 10 DNS records  | read-only: true | validation: maxItems 10
                 - name: hostName | type: string | description: Hostname for the DNS record. For example, `domain.com` or `mail.domain.com`. Supports both root domains and subdomains.  | read-only: true | validation: format HOSTNAME
                 - name: values | type: array<string> | description: Values associated with the DNS record. For example, IP addresses for A records or server names for NS records.  Min: 1 value Max: 10 values  | read-only: true | validation: minItems 1, maxItems 10
              - name: actualDnsRecords | type: array<DnsRecord> | description: DNS records currently configured in the external database. Note that there can only be a single A and NS record.  | read-only: true | validation: maxItems 10
           - name: invalidNsRecordInfo | type: InvalidRecordInfo | description: Details about the NS (nameserver) record for which the DNS propagation has failed. Includes all expected and current values of the NS record.  | read-only: true 
           - name: invalidCnameRecordInfo | type: InvalidRecordInfo | description: Details about the CNAME record for which the DNS propagation has failed. Includes all expected and current values of the CNAME records.  | read-only: true 
     - name: id | type: string | description: GUID of the DNS propagation. Identical to the domain name, including the [TLD](https://dev.wix.com/docs/api-reference/account-level/domains/dns-propagation/introduction.md#terminology) (top-level domain).  | read-only: true | validation: format HOSTNAME
     - name: domain | type: string | description: Domain name, including the [TLD](https://dev.wix.com/docs/api-reference/account-level/domains/dns-propagation/introduction.md#terminology). Both root domains and subdomains are supported.  | validation: format HOSTNAME
     - name: revision | type: string | description: Revision number, which increments by 1 each time the DNS propagation is updated. Ignored when creating a DNS propagation.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the DNS propagation was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the DNS propagation was updated.  | read-only: true | validation: format date-time
     - name: status | type: Status | description: Current status of the DNS propagation. Can take up to 3 days to complete.  | read-only: true 
         - enum:
         -     SUCCEEDED: DNS propagation completed successfully. All required DNS records are properly configured and propagated.
         -     FAILED: DNS propagation failed. One or more DNS records are incorrectly configured or haven't propagated.
         -     IN_PROGRESS: DNS propagation is in progress. Check again later for updated status.
     - name: dnsResolverIncludesWixNs | type: boolean | description: Whether Wix name servers were detected among the domain's name servers. For subdomains, this value matches the root domain's setting.  | read-only: true 
     - name: hasMailbox | type: boolean | description: Whether MX records were found for the root domain. Not set for subdomains, or when MX records were never checked.  | read-only: true 


```

### Examples

### Get DNS Propagation Status - In Progress
Example of retrieving DNS propagation status when DNS records are still being checked and propagated.

```curl
curl -X GET \
'https://www.wixapis.com/v1/dns-propagations/newdomain.com' \
-H 'Authorization: <AUTH>' \
-H 'wix-site-id: <SITE_ID>'
```

### Get DNS Propagation Status - Success Case
Example of retrieving DNS propagation status when all DNS records are properly configured and propagated.

```curl
curl -X GET \
'https://www.wixapis.com/v1/dns-propagations/mystore.com' \
-H 'Authorization: <AUTH>' \
-H 'wix-site-id: <SITE_ID>'
```

### Get DNS Propagation Status
Retrieves the DNS propagation status for a domain to check if DNS records are properly configured and propagated.

```curl
curl -X GET \
'https://www.wixapis.com/v1/dns-propagations/example.com' \
-H 'Authorization: <AUTH>' \
-H 'wix-site-id: <SITE_ID>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.domains.dnsPropagation.getDnsPropagation(dnsPropagationId)
 Description: Retrieves DNS propagation status for a domain.  Use this method to check if DNS records are properly configured and propagated after connecting a custom domain, during domain setup to see required DNS records, or to monitor ongoing propagation status after making DNS changes.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  dnsPropagationId
 Method parameters: 
   param name: dnsPropagationId | type: string | description: GUID of the DNS propagation to retrieve. Identical to the domain name, including [TLD](https://dev.wix.com/docs/api-reference/account-level/domains/dns-propagation/introduction.md#terminology). | required: true | validation: format HOSTNAME
 Return type: PROMISE<DnsPropagation>
  - ONE-OF: 
     - name: failureInfo | type: FailedStatusInfo | description: Details about DNS propagation failure, including which record types failed. Only present when `status` is `FAILED`.  | read-only: true 
        - name: invalidRecords | type: array<InvalidRecord> | description: The DNS record types that failed propagation.  Max: 3 invalid records  | read-only: true 
             - enum:
             -     INVALID_A_RECORD: The propagation of the A record has failed.
             -     INVALID_NS_RECORD: The propagation of the NS record has failed.
             -     INVALID_CNAME_RECORD: The propagation of at least one CNAME record has failed.
        - name: invalidARecordInfo | type: InvalidRecordInfo | description: Details about the A record for which the DNS propagation has failed. Includes all expected and current values of the A record.  | read-only: true 
           - name: expectedDnsRecords | type: array<DnsRecord> | description: The DNS records that should be configured in the external database. Note that there can only be a single A and NS record.  Max: 10 DNS records  | read-only: true | validation: maxItems 10
              - name: hostName | type: string | description: Hostname for the DNS record. For example, `domain.com` or `mail.domain.com`. Supports both root domains and subdomains.  | read-only: true | validation: format HOSTNAME
              - name: values | type: array<string> | description: Values associated with the DNS record. For example, IP addresses for A records or server names for NS records.  Min: 1 value Max: 10 values  | read-only: true | validation: minItems 1, maxItems 10
           - name: actualDnsRecords | type: array<DnsRecord> | description: DNS records currently configured in the external database. Note that there can only be a single A and NS record.  | read-only: true | validation: maxItems 10
        - name: invalidNsRecordInfo | type: InvalidRecordInfo | description: Details about the NS (nameserver) record for which the DNS propagation has failed. Includes all expected and current values of the NS record.  | read-only: true 
        - name: invalidCnameRecordInfo | type: InvalidRecordInfo | description: Details about the CNAME record for which the DNS propagation has failed. Includes all expected and current values of the CNAME records.  | read-only: true 
  - name: _id | type: string | description: GUID of the DNS propagation. Identical to the domain name, including the [TLD](https://dev.wix.com/docs/api-reference/account-level/domains/dns-propagation/introduction.md#terminology) (top-level domain).  | read-only: true | validation: format HOSTNAME
  - name: domain | type: string | description: Domain name, including the [TLD](https://dev.wix.com/docs/api-reference/account-level/domains/dns-propagation/introduction.md#terminology). Both root domains and subdomains are supported.  | validation: format HOSTNAME
  - name: revision | type: string | description: Revision number, which increments by 1 each time the DNS propagation is updated. Ignored when creating a DNS propagation.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the DNS propagation was created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the DNS propagation was updated.  | read-only: true 
  - name: status | type: Status | description: Current status of the DNS propagation. Can take up to 3 days to complete.  | read-only: true 
     - enum:
     -     SUCCEEDED: DNS propagation completed successfully. All required DNS records are properly configured and propagated.
     -     FAILED: DNS propagation failed. One or more DNS records are incorrectly configured or haven't propagated.
     -     IN_PROGRESS: DNS propagation is in progress. Check again later for updated status.
  - name: dnsResolverIncludesWixNs | type: boolean | description: Whether Wix name servers were detected among the domain's name servers. For subdomains, this value matches the root domain's setting.  | read-only: true 
  - name: hasMailbox | type: boolean | description: Whether MX records were found for the root domain. Not set for subdomains, or when MX records were never checked.  | read-only: true 


```

### Examples

### Get DNS Propagation Status - In Progress
Example of retrieving DNS propagation status when DNS records are still being checked and propagated.

```javascript
import { dnsPropagation } from "@wix/dns-propagation";

async function getDnsPropagationInProgress() {
  const response = await dnsPropagation.getDnsPropagation("newdomain.com");
  
  return response;
}

/* Promise resolves to:
 * {
 *   "_id": "newdomain.com",
 *   "domain": "newdomain.com",
 *   "revision": "1",
 *   "_createdDate": "2024-01-15T16:00:00.000Z",
 *   "_updatedDate": "2024-01-15T16:00:00.000Z",
 *   "status": "IN_PROGRESS",
 *   "dnsResolverIncludesWixNs": false
 * }
 */

```

### Get DNS Propagation Status - Success Case
Example of retrieving DNS propagation status when all DNS records are properly configured and propagated.

```javascript
import { dnsPropagation } from "@wix/dns-propagation";

async function getDnsPropagationSuccess() {
  const response = await dnsPropagation.getDnsPropagation("mystore.com");
  
  return response;
}

/* Promise resolves to:
 * {
 *   "_id": "mystore.com",
 *   "domain": "mystore.com",
 *   "revision": "3",
 *   "_createdDate": "2024-01-10T08:00:00.000Z",
 *   "_updatedDate": "2024-01-12T14:30:00.000Z",
 *   "status": "SUCCEEDED",
 *   "dnsResolverIncludesWixNs": true
 * }
 */

```

### Get DNS Propagation Status
Retrieves the DNS propagation status for a domain to check if DNS records are properly configured and propagated.

```javascript
import { dnsPropagation } from "@wix/dns-propagation";

async function getDnsPropagation() {
  const response = await dnsPropagation.getDnsPropagation("example.com");
  
  return response;
}

/* Promise resolves to:
 * {
 *   "_id": "example.com",
 *   "domain": "example.com",
 *   "revision": "1",
 *   "_createdDate": "2024-01-15T10:30:00.000Z",
 *   "_updatedDate": "2024-01-15T12:45:00.000Z",
 *   "status": "FAILED",
 *   "failureInfo": {
 *     "invalidRecords": ["INVALID_A_RECORD", "INVALID_CNAME_RECORD"],
 *     "invalidARecordInfo": {
 *       "expectedDnsRecords": [
 *         {
 *           "hostName": "example.com",
 *           "values": ["185.230.63.107", "185.230.63.108"]
 *         }
 *       ],
 *       "actualDnsRecords": [
 *         {
 *           "hostName": "example.com",
 *           "values": ["192.168.1.1"]
 *         }
 *       ]
 *     },
 *     "invalidCnameRecordInfo": {
 *       "expectedDnsRecords": [
 *         {
 *           "hostName": "www.example.com",
 *           "values": ["example.com.wixdns.net"]
 *         }
 *       ],
 *       "actualDnsRecords": [
 *         {
 *           "hostName": "www.example.com",
 *           "values": ["old-server.example.com"]
 *         }
 *       ]
 *     }
 *   },
 *   "dnsResolverIncludesWixNs": true
 * }
 */

```

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

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


async function getDnsPropagation(dnsPropagationId) {
  const response = await myWixClient.dnsPropagation.getDnsPropagation(dnsPropagationId);
};
```

---