# DnsRecord

The DnsRecord type of the TypeScript SDK, part of DnsRecordCheck.

```ts
type DnsRecord = {
  accept?: string[]
  kind: ('ownership' | 'mx' | 'spf' | 'dkim' | 'dmarc' | 'jmap' | 'dav')
  name: string
  port?: number
  priority?: number
  purpose: string
  required: boolean
  type: ('MX' | 'TXT' | 'CNAME' | 'SRV')
  value: string
  weight?: number
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `accept` | `string[]` | Optional. Alternative accepted DNS record values |
| `kind` | `('ownership' \| 'mx' \| 'spf' \| 'dkim' \| 'dmarc' \| 'jmap' \| 'dav')` | Record category |
| `name` | `string` | Fully-qualified DNS record host to create |
| `port` | `number` | Optional. SRV record target port (RFC 2782) |
| `priority` | `number` | Optional. MX preference or SRV priority |
| `purpose` | `string` | Human-readable explanation of why this DNS record is required |
| `required` | `boolean` | True if this record is required for normal mail delivery |
| `type` | `('MX' \| 'TXT' \| 'CNAME' \| 'SRV')` | DNS record type |
| `value` | `string` | Expected DNS record target value |
| `weight` | `number` | Optional. SRV record weight (RFC 2782) |

## Used in

[`DnsRecordCheck`](/docs/sdks/typescript/types/dns-record-check).
