Skip to content
APIProductDomains and accessDomain

Domain routes: create, get

The Domain Verbs create, get as api.sb routes, with inputs, result, refusals and an example.

Reference for Domain, one group of Domain routes.

Domain.create

Creates a Domain. Verb page.

Text
POST /{namespace}/domains

Body, as JSON: the inputs. Emits Domain.created.

Inputs

InputTypeRequiredDescription
hostnamestringrequiredThe name, such as leaseline.app.
rolestringrequiredWhat the Domain does for the Thing it serves; a defensive name takes redirect.
acquiredstringOne of claimed, purchased, or connected.
registrantPartyThe owner of record: the holding Company while held, or the holder of a self-serve Startup’s Stripe account.
expiresAtdatetimeWhen the registration ends, as the registrar reports it; empty for a claimed Domain.
autoRenewbooleanTrue when renewal runs without a Decision; false sends the Domain through renewal review.
renewalPricemoneyWhat the next renewal costs, which for a premium name differs from the purchase price. Never randomized.
transferableAtdatetimeThe first moment the registrar allows a transfer out, after any registration, transfer or registrant lock.
namesstringHow its subdomains are given out: explicit records only, or one-label claims by other Startups.
publicSuffixbooleanTrue once the public suffix list browsers ship carries the Domain; an issuing Domain gives out no label before then.
registrarAccountstringThe registrar account that holds the Domain: one per Startup, never shared with a sibling.
registryLockbooleanTrue when the registry refuses transfer, update and delete until a verified out-of-band request lifts it.
certificatejsonCertificate state (pending, active, renewing or failed), its expiry, and the failing check with its fix.
validationstringdelegated proves control through a CNAME to the platform; serving is for an apex that cannot hold one.
walletsEnabledbooleanTrue once Stripe lists the Domain as a payment method domain on the Startup’s account.
carriedIdentitybooleanTrue once the Domain received mail, hosted a Mailbox or verified an outside account; it never resets.
toDomainFor a redirect: the canonical Domain it forwards to permanently, path and query kept.
siteSiteA Site answers on one or more Domains; each Domain serves one Site.
tenantTenantA Tenant proves control of its Customer’s email domain, so sign-ins on that domain follow the Tenant’s policy.

Returns

OutputTypeRequiredDescription
domainDomainrequiredThe Domain.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/kilnbakery.com/domains \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"kilnbakery.com","role":"canonical"}'
JSON
{
  "api": "https://api.sb/kilnbakery.com",
  "domain": {
    "$id": "https://api.sb/kilnbakery.com/domains/domain_VbYut4CTsH",
    "$type": "Domain",
    "hostname": "kilnbakery.com",
    "role": "canonical",
    "state": "verifying"
  },
  "action": {
    "$id": "https://api.sb/kilnbakery.com/actions/act_0y76a1jB6k",
    "operation": "Domain.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/kilnbakery.com/actions/act_0y76a1jB6k"
  }
}

Domain.get

Returns one Domain by id. Verb page.

Text
GET /{namespace}/domains/{id}

Path: id. Query: the other inputs. Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Domain.
atstringA time or Version name: the record as it stood then. Unset: as it stands now.

Returns

OutputTypeRequiredDescription
domainDomainrequiredThe Domain.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl https://api.sb/kilnbakery.com/domains/domain_VbYut4CTsH \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/kilnbakery.com",
  "$type": "Domain",
  "$id": "https://api.sb/kilnbakery.com/domains/domain_VbYut4CTsH",
  "domain": {
    "$id": "https://api.sb/kilnbakery.com/domains/domain_VbYut4CTsH",
    "$type": "Domain",
    "hostname": "kilnbakery.com",
    "role": "canonical",
    "state": "verifying"
  },
  "links": {
    "self": "https://api.sb/kilnbakery.com/domains/domain_VbYut4CTsH",
    "up": "https://api.sb/kilnbakery.com/domains"
  },
  "actions": {
    "authenticate": "https://api.sb/kilnbakery.com/domains/domain_VbYut4CTsH/authenticate",
    "release": "https://api.sb/kilnbakery.com/domains/domain_VbYut4CTsH/release",
    "renew": "https://api.sb/kilnbakery.com/domains/domain_VbYut4CTsH/renew"
  }
}