api.hosts

kinds()

api.hosts.kinds() → Promise<Kind[]>

Which kinds exist, which are available, and why the others are not. Read it instead of writing a list into a page.

freeavailability per kindsuffixes come from here
Using Python?

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

const kinds = await api.hosts.kinds();
// [{ kind: "site", hostSuffix: "…", deploy: "files", available: true, reason: null }, …]

const usable = kinds.filter((k) => k.available);
kinds = api.hosts.kinds()
# [{"kind": "site", "hostSuffix": "…", "deploy": "files", "available": True, "reason": None}, …]

usable = [k for k in kinds if k["available"]]
kindstring

The identifier to pass to create().

hostSuffixstring

The address level this kind is served on.

deploystring

What a deploy takes — files, or code.

availableboolean

Whether it can be created.

reasonstring|null

Why not, when it cannot.

Why availability is a field

A kind that cannot serve is refused at creation

Never created « for now »: an address that does not answer reads as an outage. This list is what lets an interface show only what works, and say why about the rest — without the day it changes requiring a page to change.

Do not hardcode the suffix

One level per kind is deliberate — it is what stops a customer ever taking a name the platform itself answers for. The suffixes are returned here precisely so no page repeats them.

Building a picker

for (const k of await api.hosts.kinds()) {
  render({ value: k.kind, label: k.kind, hint: k.hostSuffix, disabled: !k.available, why: k.reason });
}
for k in api.hosts.kinds():
    render(value=k["kind"], label=k["kind"], hint=k.get("hostSuffix"), disabled=not k["available"], why=k.get("reason"))