Skip to content
SDKProductDomains and accessDomain

Domain methods: authenticate, benchmark, claim, connect

The Domain Verbs authenticate, benchmark, claim, connect as typed SDK methods, with inputs, result, refusals and an example.

Reference for Domain, one group of Domain methods.

Domain.authenticate

Authenticate writes a Domain’s SPF, DKIM and DMARC records and verifies them before its first send. Verb page.

TypeScript
interface DomainVerbs {
  authenticate(input: DomainAuthenticateInput, options?: SB.CallOptions): SB.Call<Domain>
}

Emits Domain.authenticated.

Inputs

InputTypeRequiredDescription
domainDomainrequiredThe sending Domain.
dmarcstringThe DMARC policy; it starts at none with reports and tightens to quarantine.

Returns

OutputTypeRequiredDescription
domainDomainrequiredThe Domain, authenticated.

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

TypeScript
import { $ } from 'startup-builder'

const domain = await $.Domain.authenticate({ domain: 'domain_VbYut4CTsH' })

Domain.benchmark

Benchmark measures a Domain’s estimated traffic, ranking Keywords, authority and referring domains beside the competitors named. Verb page.

TypeScript
interface DomainVerbs {
  benchmark(input: DomainBenchmarkInput, options?: SB.CallOptions): SB.Call<DomainBenchmarkOutput>
}

Emits Domain.benchmarked.

Inputs

InputTypeRequiredDescription
hostnamestringrequiredThe name to measure: the Startup’s own or a competitor’s.
competitorsstring[]Names to measure beside it.

Returns

OutputTypeRequiredDescription
readingsjsonrequiredOne measure per name, each with its method and observation time.
domainDomainrequiredThe Domain measured.

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

TypeScript
import { $ } from 'startup-builder'

const { readings, domain } = await $.Domain.benchmark({ hostname: 'taxcalc.tools' })

Domain.claim

Claim gives a Startup a one-label name under an issuing Domain, or assigns it a held Domain through an approved Change. Verb page.

TypeScript
interface DomainVerbs {
  claim(input: DomainClaimInput, options?: SB.CallOptions): SB.Call<Domain>
}

Emits Domain.claimed.

Inputs

InputTypeRequiredDescription
hostnamestringrequiredThe name to claim.
startupStartuprequiredThe Startup it serves.

Returns

OutputTypeRequiredDescription
domainDomainrequiredThe claimed 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.
A label under an issuing Domain whose publicSuffix is falserefusedClear what the check names, then call it again.None.
Reserved labels such as www, api, admin, mail, mcp, docs and sibling BrandsrefusedClear what the check names, then call it again.None.

Example

TypeScript
import { $ } from 'startup-builder'

const domain = await $.Domain.claim({ hostname: 'kilnbakery.headless.ly', startup: 'startup_ROlZw7tNIz' })

Domain.connect

Connect attaches a hostname a Startup already holds and verifies ownership through DNS. Verb page.

TypeScript
interface DomainVerbs {
  connect(input: DomainConnectInput, options?: SB.CallOptions): SB.Call<Domain>
}

Emits Domain.connected.

Inputs

InputTypeRequiredDescription
hostnamestringrequiredThe hostname to attach.
startupStartuprequiredThe Startup it serves.
tenantTenantThe Tenant it serves, when a Customer connects its own name.

Returns

OutputTypeRequiredDescription
domainDomainrequiredThe connected Domain.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
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.
The record changed since it was read, so the write would overwrite a newer version.conflictRead the record again, then retry the write against its current state.None.
A wildcard name for a Tenant, and past the Tenant’s name count follows its Entitlement’s atBoundrefusedClear what the check names, then call it again.None.

Example

TypeScript
import { $ } from 'startup-builder'

const domain = await $.Domain.connect({ hostname: 'kilnbakery.com', startup: 'startup_ROlZw7tNIz' })