Domain

unserve()

domain.unserve({ name, pages }) → Promise<Result>

Removes both halves: the registration with the platform, and the DNS record.

both halvestells you whichno undo
Using Python?

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

const result = await domain.unserve({ name: "docs", pages: "…" });
// { hostname, unbound: true, recordRemoved: true }
result = domain.unserve(name="docs", pages="…")
# {"hostname", "unbound": True, "recordRemoved": True}

Two flags, because there are two halves

FieldSays
unboundThe platform no longer accepts the name.
recordRemovedThe DNS record is gone.
One of them false is worth noticing

A record removed but the name still registered leaves a dangling registration; a name unbound but the record still there leaves an address that resolves and refuses. The flags say which happened rather than reporting a single success.

The order it does them in

The registration, then the record. A name that stops resolving while still registered is invisible; one that resolves while refusing looks broken.

It takes effect as DNS allows

Resolvers hold a record for its lifetime. The address can keep answering briefly after this returns — which is DNS, not a failure of the call.