# Get an email domain

> Fetch a domain with its DNS records and current status.

`GET https://api.zavu.dev/v1/email-domains/{domainId}`

Fetch a domain with its DNS records and current status.

## Parameters

- `domainId` (path, string, required)

## Responses

### 200

Domain details.

- `domain` (object, required)
  - `id` (string, required)
  - `domain` (string, required)
  - `status` (string, required): Overall verification status.
  - `dkimStatus` (string, required)
  - `dnsRecords` (object[]): DNS records to publish. Present when fetching a single domain or after adding one.
    - `type` (string, required): DNS record type.
    - `name` (string, required): Record host/name to create.
    - `value` (string, required): Record value.
    - `priority` (integer): Priority (MX records only).
    - `purpose` (string, required): What the record is for. `ownership` is a TXT at `_zavu-verification.<domain>`, returned only when another Zavu account also added this domain and neither has verified it: DKIM records are the same for everyone, so the domain verifies only once this account's own token is published. One of: `dkim`, `spf`, `dmarc`, `mail_from`, `ownership`.
    - `required` (boolean, required): Whether the record is required to verify + send (DKIM) or recommended for deliverability.

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Domain not found.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X GET "https://api.zavu.dev/v1/email-domains/domain_abc123" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.emailDomains.retrieve("domain_abc123");

console.log(result);
```
