const servers = await api.domains.servers();
await domain.serve({ name: "docs", pages: servers[0].name });servers = api.domains.servers()
domain.serve(name="docs", pages=servers[0]["name"])Why this list exists
Pointing a name at a platform that has not been told about it gets you an edge refusing the connection — which reads as an outage, not as a misconfiguration. The platform must accept the name as well, and serve() does both halves together.
What an entry carries
Its name — which is what serve({ pages }) takes — and enough to show it in a picker. The list is the account's: another account's projects are not in it.
For something hosted here
A host created with api.hosts attaches a domain through host.domains.attach() instead. This is for serving a name from something else on the account.
An empty list
Nothing on the account can serve a hostname yet. Writing a record by hand would produce a name that resolves and refuses — which is worse than not writing it.