> 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

# GetSendingDomain

# Package: emails

# Namespace: SendingDomainService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/emails/sending-domains/get-sending-domain.md

## Permission Scopes:
Read Sending Domains: SCOPE.SENDING-DOMAINS.READ

## Introduction

Retrieves a sending domain by ID.

---

## REST API

### Schema

```
 Method: getSendingDomain
 Description: Retrieves a sending domain by GUID.
 URL: https://www.wixapis.com/sending-domains/v1/sending-domains/{sendingDomainId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  sendingDomainId
 Method parameters: 
   param name: sendingDomainId | type:   none | required: true 
 Return type: GetSendingDomainResponse
  - name: sendingDomain | type: SendingDomain | description: Retrieved sending domain.  
     - name: id | type: string | description: Sending domain GUID.  | read-only: true | validation: format GUID
     - name: createdDate | type: string | description: Date and time the sending domain was created.  | read-only: true | validation: format date-time
     - name: domain | type: string | description: Domain name to authenticate for sending emails. For example, `example.com`.  | validation: minLength 4, maxLength 64, format HOSTNAME, immutable
     - name: status | type: Status | description: Authentication status. Indicates whether the domain is ready for sending emails.  | read-only: true 
         - enum:
         -     INITIALIZING: Domain is being set up. DNS records are being generated. Wait for this to change to NOT_AUTHENTICATED before proceeding.
         -     NOT_AUTHENTICATED: Domain is ready to be authenticated. DNS records are available in dnsRecords. Add these records at the DNS provider, then call [Authenticate Sending Domain](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/sending-domains/authenticate-sending-domain.md) to verify them.
         -     AUTHENTICATED: Domain is authenticated and ready for sending emails. This domain can now be used in the **From** field for email campaigns and transactional emails.
     - name: dnsRecords | type: array<DnsRecord> | description: DNS records required to authenticate the domain. These records must be added to the domain's DNS configuration at the DNS provider (such as GoDaddy, Cloudflare, or Namecheap) to verify domain ownership and enable email sending.  To authenticate the domain, add these records at the DNS provider and use DNS lookup tools (such as `dig` or online DNS checkers) to verify the records are visible globally. Then call [Authenticate Sending Domain](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/sending-domains/authenticate-sending-domain.md).  | read-only: true | validation: maxItems 5
        - name: hostName | type: string | description: Hostname for the DNS record. Add this as the subdomain or record name at the DNS provider.  | validation: format HOSTNAME
        - name: value | type: string | description: Value for the DNS record. Add this as the target value at the DNS provider.  | validation: format HOSTNAME
        - name: type | type: Type | description: DNS record type.  
             - enum:
             -     CNAME: CNAME record for domain authentication.

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SENDER_DETAILS_DO_NOT_EXIST | Description: Sender details must be configured before using the Sending Domains API. See the [Sender Details API](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/sender-details/introduction.md).


```

### Examples

### Get a sending domain
Retrieves a sending domain by ID to check status and DNS records

```curl
curl -X GET \
'https://www.wixapis.com/sending-domains/v1/sending-domains/12345678-1234-1234-1234-123456789012' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.sendingDomains.sendingDomains.getSendingDomain(sendingDomainId)
 Description: Retrieves a sending domain by GUID.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  sendingDomainId
 Method parameters: 
   param name: sendingDomainId | type: string | description: Sending domain GUID. | required: true | validation: format GUID
 Return type: PROMISE<SendingDomain>
  - name: _id | type: string | description: Sending domain GUID.  | read-only: true | validation: format GUID
  - name: _createdDate | type: Date | description: Date and time the sending domain was created.  | read-only: true 
  - name: domain | type: string | description: Domain name to authenticate for sending emails. For example, `example.com`.  | validation: minLength 4, maxLength 64, format HOSTNAME, immutable
  - name: status | type: Status | description: Authentication status. Indicates whether the domain is ready for sending emails.  | read-only: true 
     - enum:
     -     INITIALIZING: Domain is being set up. DNS records are being generated. Wait for this to change to NOT_AUTHENTICATED before proceeding.
     -     NOT_AUTHENTICATED: Domain is ready to be authenticated. DNS records are available in dnsRecords. Add these records at the DNS provider, then call [Authenticate Sending Domain](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/sending-domains/authenticate-sending-domain.md) to verify them.
     -     AUTHENTICATED: Domain is authenticated and ready for sending emails. This domain can now be used in the **From** field for email campaigns and transactional emails.
  - name: dnsRecords | type: array<DnsRecord> | description: DNS records required to authenticate the domain. These records must be added to the domain's DNS configuration at the DNS provider (such as GoDaddy, Cloudflare, or Namecheap) to verify domain ownership and enable email sending.  To authenticate the domain, add these records at the DNS provider and use DNS lookup tools (such as `dig` or online DNS checkers) to verify the records are visible globally. Then call [Authenticate Sending Domain](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/sending-domains/authenticate-sending-domain.md).  | read-only: true | validation: maxItems 5
     - name: hostName | type: string | description: Hostname for the DNS record. Add this as the subdomain or record name at the DNS provider.  | validation: format HOSTNAME
     - name: value | type: string | description: Value for the DNS record. Add this as the target value at the DNS provider.  | validation: format HOSTNAME
     - name: type | type: Type | description: DNS record type.  
         - enum:
         -     CNAME: CNAME record for domain authentication.

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: SENDER_DETAILS_DO_NOT_EXIST | Description: Sender details must be configured before using the Sending Domains API. See the [Sender Details API](https://dev.wix.com/docs/api-reference/business-management/marketing/emails/sender-details/introduction.md).


```

### Examples

### getSendingDomain
```javascript
import { sendingDomains } from '@wix/sending-domains';

async function getSendingDomain(sendingDomainId) {
  const response = await sendingDomains.getSendingDomain(sendingDomainId);
};
```

### getSendingDomain (with elevated permissions)
```javascript
import { sendingDomains } from '@wix/sending-domains';
import { auth } from '@wix/essentials';

async function myGetSendingDomainMethod(sendingDomainId) {
  const elevatedGetSendingDomain = auth.elevate(sendingDomains.getSendingDomain);
  const response = await elevatedGetSendingDomain(sendingDomainId);
}
```

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

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


async function getSendingDomain(sendingDomainId) {
  const response = await myWixClient.sendingDomains.getSendingDomain(sendingDomainId);
};
```

---