Host

update()

host.update({ label }) → Promise<Host>

Renames the host. The label only — the slug is the address, and it does not change.

PATCHlabel onlythe slug is the URL
Using Python?

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

await site.update({ label: "Portfolio (2026)" });
site.update(label="Portfolio (2026)")

Why the slug is fixed

Changing it would break three things at once

Links already shared, the customer domain attached to it, and the certificate issued for that hostname. None of the three fails loudly — they just stop working.

For another address, another host

const next = await api.hosts.create({ kind: "site", slug: "portfolio-2026", label: "Portfolio" });
await next.deploy({ files: "./out" });
// Then move the domain, and remove the old host when nothing points at it.
nxt = api.hosts.create(runtime="static", slug="portfolio-2026", label="Portfolio")
nxt.deploy(files="./out")
# Then move the domain, and remove the old host when nothing points at it.

What the label is for

Showing in a list. Nothing depends on it, so changing it is safe — which is exactly why it is the one field that can change.

It updates the object

host.label is replaced with what came back.