Skip to content
SDKProductDomains and access

DNS Record methods

Every DNS Record Verb as a typed SDK method, with its inputs, result, refusals and an example.

Reference for DNS Record.

DNSRecord.get

Returns one DNS Record by id. Verb page.

TypeScript
interface DNSRecordVerbs {
  get(input: DNSRecordGetInput, options?: SB.CallOptions): SB.Call<DNSRecord>
}

Reads only: it emits no Event.

Inputs

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

Returns

OutputTypeRequiredDescription
dnsRecordDNS RecordrequiredThe DNS Record.

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 dnsRecord = await $.DNSRecord.get({ id: 'dns_66ja94YImd' })

DNSRecord.list

Returns DNS Records, newest first, one page at a time. Verb page.

TypeScript
interface DNSRecordVerbs {
  list(input?: DNSRecordListInput, options?: SB.CallOptions): SB.ListCall<DNSRecord>
}

Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
limitintegerAt most this many records, up to 100. The default is 20.
afterstringThe cursor from the previous page.
wherestringA filter over the properties, such as paidAt = null and total.amount > 500.
sortstringProperties to sort by, comma-separated; a leading minus sorts descending.
totalbooleanTrue adds the match count as meta.total, exact up to 10,000 matches and estimated above.
facetsstringProperties to count by value, comma-separated, returned as meta.facets.
fieldsstringProperties to return on each record, comma-separated; $id and $type always return.
includestringRelated records to embed in place of their URLs, comma-separated.
depthintegerHow many levels of related records to embed. The default is 1.
qstringWords to match across the text properties, ranked by relevance.
matchstringRanks the search by words, or meaning; words is the default.

Returns

OutputTypeRequiredDescription
dnsRecordslist of DNS RecordrequiredOne page of DNS Records.

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 dnsRecords = await $.DNSRecord.list({ limit: 20 })

DNSRecord.remove

Remove stops a Startup-owned DNS Record from answering; its history stays and a revert restores it. Verb page.

TypeScript
interface DNSRecordVerbs {
  remove(input: DNSRecordRemoveInput, options?: SB.CallOptions): SB.Call<DNSRecord>
}

Emits DNSRecord.removed.

Inputs

InputTypeRequiredDescription
recordDNS RecordrequiredThe DNS Record to stop.

Returns

OutputTypeRequiredDescription
recordDNS RecordrequiredThe stopped DNS Record.

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 record the platform ownsrefusedClear what the check names, then call it again.None.

Example

TypeScript
import { $ } from 'startup-builder'

const record = await $.DNSRecord.remove({ record: 'dns_66ja94YImd' })

DNSRecord.set

Set adds or changes a Startup-owned DNS Record through a Change, previewed against what the Domain answers today. Verb page.

TypeScript
interface DNSRecordVerbs {
  set(input: DNSRecordSetInput, options?: SB.CallOptions): SB.Call<DNSRecord>
}

Emits DNSRecord.set.

Inputs

InputTypeRequiredDescription
domainDomainrequiredThe Domain the record answers for.
typestringrequiredThe record type.
namestringrequiredThe label, such as @ or _dmarc.
valuestringrequiredThe answer.

Returns

OutputTypeRequiredDescription
recordDNS RecordrequiredThe DNS Record, with its status.

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 record the platform ownsrefusedClear what the check names, then call it again.None.

Example

TypeScript
import { $ } from 'startup-builder'

const record = await $.DNSRecord.set({ domain: 'domain_JoDiG4ZmXb', type: 'a', name: 'Leaseline', value: 'Example value' })