# DNS Record

URL: /business/nouns/dns-record · Id: `noun:dns-record`

> A DNS Record is one DNS answer of a Domain: its type, name and value, who owns it, and what the world last answered.

A DNS Record is one DNS answer of a [Domain](/business/nouns/domain): its type, name and value, who owns it, and what the world last answered.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `string` | Yes | The record type, written in lowercase. |
| `name` | `string` | Yes | The label under the Domain, such as `@`, `www` or `_dmarc`. |
| `value` | `string` | Yes | The declared answer. |
| `owner` | `string` | Yes | `platform` records serve the Site, authenticate mail and validate certificates, and refuse edits; `startup` records change freely. |
| `observed` | `string` | No | What public DNS answered at the last daily check. |
| `status` | `string` | No | `dangling` means the target no longer answers, the opening for a subdomain takeover; `removed` means it no longer answers at all. |

## Object
```json
{
  "$id": "https://api.sb/ledgerlark.com/dns-records/dns_record_1",
  "$type": "DNSRecord",
  "type": "a",
  "name": "_dmarc",
  "value": "192.0.2.10",
  "owner": "platform",
  "observed": "192.0.2.10",
  "status": "missing"
}
```

## Relationships
- <a id="rel-answers-for"></a>A DNS Record **answers for** one [Domain](/business/nouns/domain): a [Domain](/business/nouns/domain) answers DNS from its records; each record belongs to one Domain. `answersFor`, inverse [`records`](/business/nouns/domain#rel-records).

## Lifecycle

| State | Meaning | Moves to |
| --- | --- | --- |
| `missing` (first) | Declared, and public DNS does not answer it yet; a new record waits here while it propagates. | `ok` on [`DNSRecord.checked`](/business/nouns/dns-record#dnsrecordchecked) when public DNS answers the declared value; `dangling` on [`DNSRecord.checked`](/business/nouns/dns-record#dnsrecordchecked) when the record answers and its target does not; `removed` by [DNSRecord.remove](/business/nouns/dns-record/remove) |
| `ok` | Public DNS answers the declared value. | `missing` on [`DNSRecord.checked`](/business/nouns/dns-record#dnsrecordchecked) when public DNS gives no answer; `drifted` on [`DNSRecord.checked`](/business/nouns/dns-record#dnsrecordchecked) when public DNS answers another value; `dangling` on [`DNSRecord.checked`](/business/nouns/dns-record#dnsrecordchecked) when the record answers and its target does not; `removed` by [DNSRecord.remove](/business/nouns/dns-record/remove) |
| `drifted` | Public DNS answers a value other than the declared one, changed outside a Change. | `ok` on [`DNSRecord.checked`](/business/nouns/dns-record#dnsrecordchecked) when public DNS answers the declared value again; `missing` by [DNSRecord.set](/business/nouns/dns-record/set); `removed` by [DNSRecord.remove](/business/nouns/dns-record/remove) |
| `dangling` | It points at a target that no longer answers, which opens the name to takeover. | `ok` on [`DNSRecord.checked`](/business/nouns/dns-record#dnsrecordchecked) when its target answers again; `missing` by [DNSRecord.set](/business/nouns/dns-record/set); `removed` by [DNSRecord.remove](/business/nouns/dns-record/remove) |
| `removed` | It no longer answers; its history stays, and reverting its Change restores it. | None: it ends here. |

## Verbs
| Verb | Description | Subject | Event | Class |
| --- | --- | --- | --- | --- |
| [DNSRecord.remove](/business/nouns/dns-record/remove) | Remove stops a Startup-owned DNS Record from answering; its history stays and a revert restores it. | [Reliability Engineer](/agents/engineering/reliability-engineer) | [`DNSRecord.removed`](/business/events/DNSRecord.removed) | Two-way: `try`, `send`, `do` |
| [DNSRecord.set](/business/nouns/dns-record/set) | Set adds or changes a Startup-owned DNS Record through a Change, previewed against what the Domain answers today. | [Reliability Engineer](/agents/engineering/reliability-engineer) | [`DNSRecord.set`](/business/events/DNSRecord.set) | Two-way: `try`, `send`, `do` |
| <a id="get"></a>[DNSRecord.get](/business/nouns/dns-record/get) | Returns one DNS Record by id. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="list"></a>[DNSRecord.list](/business/nouns/dns-record/list) | Returns DNS Records, newest first, one page at a time. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |

A DNS Record is kept forever and never edited: it has no `update` or `delete`.

## Events
Events no Verb emits. Each Verb’s Event is in the Verbs table above; every Event is delivered in the same shape.

### DNSRecord.checked
The daily check read what public DNS answers for a DNS Record and compared it with the declared value. Raised by a clock.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | `DNSRecord.checked`. |
| `at` | `datetime` | Yes | When it happened. |
| `seq` | `integer` | No | Its position in the namespace, one more than the Event before; any seq is a cursor into the history. |
| `data` | `json` | Yes | The Thing as the Action left it. |
| `data.dnsRecord` | [DNS Record](/business/nouns/dns-record) | Yes | The DNS Record as the change left it. |
| `data.dnsRecord.type` | `string` | Yes | The record type, written in lowercase. |
| `data.dnsRecord.name` | `string` | Yes | The label under the Domain, such as `@`, `www` or `_dmarc`. |
| `data.dnsRecord.value` | `string` | Yes | The declared answer. |
| `data.dnsRecord.owner` | `string` | Yes | `platform` records serve the Site, authenticate mail and validate certificates, and refuse edits; `startup` records change freely. |
| `data.dnsRecord.observed` | `string` | No | What public DNS answered at the last daily check. |
| `data.dnsRecord.status` | `string` | No | `dangling` means the target no longer answers, the opening for a subdomain takeover; `removed` means it no longer answers at all. |

```json
{
  "$id": "https://api.sb/ledgerlark.com/events/event_1",
  "$type": "Event",
  "name": "DNSRecord.checked",
  "at": "2026-10-22T12:00:00Z",
  "data": {
    "dnsRecord": {
      "$id": "https://api.sb/ledgerlark.com/dns-records/dns_record_1",
      "$type": "DNSRecord",
      "type": "a",
      "name": "_dmarc",
      "value": "192.0.2.10",
      "owner": "platform",
      "observed": "192.0.2.10",
      "status": "missing"
    }
  },
  "seq": 1
}
```

## Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.

| Operation | `owner` | `admin` | `member` | `viewer` |
| --- | --- | --- | --- | --- |
| `DNSRecord.get` | Yes | Yes | Yes | Yes |
| `DNSRecord.list` | Yes | Yes | Yes | Yes |
| `DNSRecord.remove` | Yes | Yes | Yes | No |
| `DNSRecord.set` | Yes | Yes | Yes | No |

## Call it

**Ask**

```text
Set the latest DNS record with a domain.
```

**API**

```bash
curl -X POST https://api.sb/tutorloop.com/dns-records/set \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"domain_1","type":"a","name":"TutorLoop","value":"Example value"}'
```

```json
{
  "api": "https://api.sb/tutorloop.com",
  "record": {
    "$id": "https://api.sb/tutorloop.com/dns-records/dns_record_1",
    "$type": "DNSRecord",
    "type": "a",
    "name": "_dmarc",
    "value": "192.0.2.10",
    "owner": "platform"
  },
  "action": {
    "$id": "https://api.sb/tutorloop.com/actions/action_1",
    "operation": "DNSRecord.set",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/tutorloop.com/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const record = await $.DNSRecord.set({ domain: 'domain_1', type: 'a', name: 'TutorLoop', value: 'Example value' })
```

**CLI**

```bash
npx startup-builder do DNSRecord.set --json '{"domain":"domain_1","type":"a","name":"TutorLoop","value":"Example value"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.DNSRecord.set({ domain: 'domain_1', type: 'a', name: 'TutorLoop', value: 'Example value' })"
  }
}
```

## Example
```json
{
  "$type": "DNSRecord",
  "type": "cname",
  "name": "www",
  "value": "fieldnotes.helpdesk.example",
  "owner": "startup",
  "observed": "NXDOMAIN",
  "status": "dangling"
}
```