# Domains

URL: /products/site/domains · Id: `page:products/site/domains`

> A Domain is a name your Startup answers at: bought or connected, with DNS, a certificate and email set for you.

A [Domain](/business/nouns/domain) is a name your [Startup](/business/nouns/startup) answers at, for its [Site](/business/nouns/site), [App](/business/nouns/app), API and [Mailboxes](/business/nouns/mailbox). Every Startup answers at a claimed name from the moment it is created.

## What you get
- 1 claimed name the day the Startup is created (Domain)
- 1 DNS records, signed with DNSSEC (DNSRecord)
- 1 certificate, renewed before it expires (Domain)
- 1 email that cannot be spoofed: SPF, DKIM and DMARC (DNSRecord)
- 1 renewal 90 days ahead, so a name never lapses (Domain)
- 1 wallets at checkout on the domain (Stripe's Payment Method Domain)

## Your agent does
**For agents**

- Guide: `guide:connect-my-domain`, status `live`. Page: [/products/site/domains/connect-my-domain.md](/products/site/domains/connect-my-domain.md).
- Approval: ask the founder first. Show the run, then wait for their Approval; a refusal ends it.
- Leaves the chat: Once, at your domain registrar: to add the three DNS records your agent lists.
- Needs first: [Startup](/business/nouns/startup).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Domain.connect`](/business/nouns/domain/connect) (`verb:Domain.connect`) | `hostname` string, required: example `"leaseline.com"`; `startup` Startup (an id), required: the `$id` of the first Startup `Startup.list` returns | `domain` Domain |

Returns: the last call answers with `domain` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "domain": {
    "$id": "https://api.sb/leaseline.app/domains/domain_1",
    "$type": "Domain",
    "hostname": "leaseline.com"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Domain.connect",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer “Send leaseline.app to leaseline.com”, or “Give me hello@ and support@ at leaseline.com”.

Calls: `Domain.connect`

Ask:

```text
Connect leaseline.com. I bought it somewhere else.
Use the domain I already own for my site.
Point leaseline.com at the business.
```

API:

```bash
# Look up the Startup: Startup.list
STARTUP=$(curl "https://api.sb/leaseline.app/startups?limit=1" \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" | jq -r '.startups[0]["$id"] | split("/") | last')

# Domain.connect
curl -X POST https://api.sb/leaseline.app/domains/connect \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"leaseline.com","startup":"'"$STARTUP"'"}'
```

SDK:

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

const [startup] = await $.Startup.list({ limit: 1 })
await $.Domain.connect({ hostname: 'leaseline.com', startup: startup.$id })
```

CLI:

```bash
STARTUP=$(npx startup-builder do Startup.list --json '{"limit":1}' | jq -r '.startups[0]["$id"] | split("/") | last')
npx startup-builder do Domain.connect --json '{"hostname":"leaseline.com","startup":"'"$STARTUP"'"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "const [startup] = await $.Startup.list({ limit: 1 })\nreturn await $.Domain.connect({ hostname: 'leaseline.com', startup: startup.$id })"
  }
}
```

## Guides
- [Buy a domain](/products/site/domains/buy-a-domain)
- [Connect my domain](/products/site/domains/connect-my-domain)
- [Get email at my domain](/products/site/domains/get-email-at-my-domain)
- [Fix my domain](/products/site/domains/fix-my-domain)

## How it works
- [DNS records for your domain](/products/site/domains/dns-records): the three records to add, how long they take, and what to check when one fails.

- [Domains](/products/platform/domains): roles, states, records and certificates.
- [Domain registration](/products/platform/domain-registration): registrant, locks and renewals.
- [DNS](/products/platform/dns), [Certificates](/products/platform/certificates) and [Email routing](/products/platform/email-routing).