# register

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

> Register buys a hostname for a Startup and points it at the Startup’s address.

Register buys a hostname for a [Startup](/business/nouns/startup) and points it at the Startup’s address.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `hostname` | `string` | Yes | The hostname to buy. |
| `startup` | [Startup](/business/nouns/startup) | Yes | The Startup it serves. |

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

## Effects
- Emits [`Domain.registered`](/business/events/Domain.registered).
- Performed by the [Integration Engineer](/agents/engineering/integration-engineer).
- One-way (money): it waits out its delay window, and runs in the `send` and `do` modes.
- Renews the registration before it expires, as spend under the Startup’s Limits.
- Checks the spend Limit; above it, opens an Approval.
- Refuses on a provisional self-serve Startup; the name stays a candidate until `Startup.claim`.
- Registers the name to the owner of record, in the Startup’s own registrar account, with DNSSEC and a CAA record.
- Writes null SPF, DMARC reject and null MX records unless the Domain hosts a Mailbox.
- Registers the Domain with Stripe as a payment method domain on the Startup’s account.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The operation is part of an Offer the caller has not accepted or paid for. | [`payment-required`](/code/api/errors/payment-required) | Accept the Offer named in the response, then retry the call. | [Offer.accept](/business/nouns/offer/accept) |
| 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.register](/business/nouns/domain/register) |
| The record changed since it was read, so the write would overwrite a newer version. | [`conflict`](/code/api/errors/conflict) | Read the record again, then retry the write against its current state. | [Domain.register](/business/nouns/domain/register) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Medium: one-way, bounded (money) |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | 1 business hour, in which a watcher can pause, redirect or cancel it; then it runs. |
| Limit | The spend [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) or [Mandate](/business/nouns/mandate) 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
Register the domain “patentpad.com” with a startup.
```

**API**

```bash
curl -X POST https://api.sb/patentpad.com/domains/register \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"patentpad.com","startup":"startup_1"}'
```

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

**SDK**

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

const domain = await $.Domain.register({ hostname: 'patentpad.com', startup: 'startup_1' })
```

**CLI**

```bash
npx startup-builder do Domain.register --json '{"hostname":"patentpad.com","startup":"startup_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Domain.register({ hostname: 'patentpad.com', startup: 'startup_1' })"
  }
}
```

Next: [`Domain.connect`](/business/nouns/domain/connect) (in `guide:buy-a-domain`).

Guides that call it: [Buy a domain](/products/site/domains/buy-a-domain).