Domain

Overview

An attached domain: its state, its records, its mail, and whether switching to us is safe yet.

records, hosting and mailstatus is proof
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

MemberDoes
check()Re-reads the zone. This is what moves status.
migration()Would switching now break anything?
serve() · unserve()Make a hostname actually serve.
remove()Detach it.
recordslist · set · remove · import.
mailenable · status · hosts · dmarc · bimi · disable.
attach() · attachments()Put a host of the account behind the name.
redirectsSend www — or the root — somewhere else.
owner() · tls()The registry's view, and the certificates.
dnssec · verify()Sign the zone; prove the domain to a service.

What it carries

namestring

The domain.

statusstring

pending_nameservers until the registrar points here; active after.

nameserversstring[]

What to set at the registrar. Read them; never hardcode a pair.

dnsobject

{ mxOk, spfOk, dkimOk, dmarcOk, checkedAt } — the mail witnesses.

importedobject

{ found, added, at } — what the takeover found and copied.

mailHostsarray

Hosts where mail is enabled, each with its selector and its witnesses.

registrarstring

Who registered it.

A host, not just a domain

The apex and a subdomain are separate for mail

Each has its own records, its own key and its own policy — an apex record does not cover a subdomain. mailHosts is a list for that reason, and every mail call takes a subdomain.

The usual sequence

const domain = await api.domains.get("example.com");

await domain.migration();          // safe to switch?
await domain.records.import();     // if not
await domain.check();              // until status is "active"
await domain.mail.enable();        // then mail
domain = api.domains.get("example.com")

domain.migration()            # safe to switch?
domain.records.import_zone()  # if not
domain.check()                # until status is "active"
domain.mail.enable()          # then mail