api.domains

get()

api.domains.get(id) → Promise<Domain>

One domain, by its identifier or by its name — get("example.com") works.

id or namefree404 if not attached
Using Python?

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

const domain = await api.domains.get("example.com");
const same   = await api.domains.get(domain.id);
domain = api.domains.get("example.com")
same = api.domains.get(domain.id)
Taking the name is the useful part

A domain is identified by its name everywhere else — in a customer's message, in a support ticket, in a configuration file. Having to look up an identifier first would be a step for nothing.

It is a read, not a check

status and dns are what was last recorded. To re-read the zone and have status move, call check().

records and mail come with it

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

await domain.records.list();
await domain.mail.status();
domain = api.domains.get("example.com")

domain.records.list()
domain.mail.status()

Errors

A name that is not attached to this account answers 404 — including one attached to someone else's, which is the same answer on purpose.