# create

URL: /business/nouns/domain/create · Id: `verb:Domain.create` · Call: `await $.Domain.create({ … })` (SDK) or the `do` tool at `https://api.sb/mcp`. Inputs says what to pass, Outputs what returns, When it waits who approves.

> Creates a Domain.

Create makes a new [Domain](/business/nouns/domain) from the inputs below. It is inherited: every [Noun](/business/nouns/noun) has `get`, `list`, `create`, `update` and `delete`.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `hostname` | `string` | Yes | The name, such as `example.com`. |
| `role` | `string` | Yes | What the Domain does for the Thing it serves; a defensive name takes `redirect`. |
| `acquired` | `string` | No | One of `claimed`, `purchased`, or `connected`. |
| `registrant` | [Party](/business/nouns/party) | No | The owner of record: the holding Company while held, or the holder of a self-serve Startup’s Stripe account. |
| `expiresAt` | `datetime` | No | When the registration ends, as the registrar reports it; empty for a claimed Domain. |
| `autoRenew` | `boolean` | No | True when renewal runs without a Decision; false sends the Domain through renewal review. |
| `renewalPrice` | `money` | No | What the next renewal costs, which for a premium name differs from the purchase price. Never randomized. |
| `transferableAt` | `datetime` | No | The first moment the registrar allows a transfer out, after any registration, transfer or registrant lock. |
| `names` | `string` | No | How its subdomains are given out: explicit records only, or one-label claims by other Startups. |
| `publicSuffix` | `boolean` | No | True once the public suffix list browsers ship carries the Domain; an issuing Domain gives out no label before then. |
| `registrarAccount` | `string` | No | The registrar account that holds the Domain: one per Startup, never shared with a sibling. |
| `registryLock` | `boolean` | No | True when the registry refuses transfer, update and delete until a verified out-of-band request lifts it. |
| `certificate` | `json` | No | Certificate state (`pending`, `active`, `renewing` or `failed`), its expiry, and the failing check with its fix. |
| `validation` | `string` | No | `delegated` proves control through a CNAME to the platform; `serving` is for an apex that cannot hold one. |
| `walletsEnabled` | `boolean` | No | True once Stripe lists the Domain as a payment method domain on the Startup’s account. |
| `carriedIdentity` | `boolean` | No | True once the Domain received mail, hosted a Mailbox or verified an outside account; it never resets. |
| `to` | [Domain](/business/nouns/domain) | No | For a redirect: the canonical Domain it forwards to permanently, path and query kept. |
| `site` | [Site](/business/nouns/site) | No | A Site answers on one or more Domains; each Domain serves one Site. |
| `tenant` | [Tenant](/business/nouns/tenant) | No | A Tenant proves control of its Customer’s email domain, so sign-ins on that domain follow the Tenant’s policy. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | [Domain](/business/nouns/domain) | Yes | The Domain. |

## Effects
- Emits `Domain.created`.
- Two-way: `try`, `send`, `do`.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | [Domain.create](/business/nouns/domain/create) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Low: two-way, nothing at stake |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | None: it runs once review passes. |
| Limit | The call [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) it runs under. |
| Over the Limit | It waits `pending` for an [Approval](/business/nouns/approval) from the [Founder](/agents/founding/founder). Approved, it runs; refused, it ends `refused` with [`limit-exceeded`](/code/api/errors/limit-exceeded); unanswered by its deadline, it ends `canceled`. |

## Example

**Ask**

```text
Add a domain to PetPantry.
```

**API**

```bash
curl -X POST https://api.sb/petpantry.shop/domains \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"petpantry.shop","role":"canonical"}'
```

```json
{
  "api": "https://api.sb/petpantry.shop",
  "domain": {
    "$id": "https://api.sb/petpantry.shop/domains/domain_1",
    "$type": "Domain",
    "hostname": "petpantry.shop",
    "role": "canonical",
    "state": "verifying"
  },
  "action": {
    "$id": "https://api.sb/petpantry.shop/actions/action_1",
    "operation": "Domain.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/petpantry.shop/actions/action_1"
  }
}
```

**SDK**

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

const domain = await $.Domain.create({ hostname: 'petpantry.shop', role: 'canonical' })
```

**CLI**

```bash
npx startup-builder do Domain.create --json '{"hostname":"petpantry.shop","role":"canonical"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Domain.create({ hostname: 'petpantry.shop', role: 'canonical' })"
  }
}
```