Hôte

update()

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

Renomme l'hôte. L'étiquette seulement — la limace est l'adresse, et elle ne change pas.

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)")

Pourquoi la limace est réparée

Changer ça briserait trois choses à la fois

Les liens sont déjà partagés, le domaine client y est attaché et le certificat délivré pour ce nom d'hôte. Aucun des trois échoue à haute voix — ils arrêtent de fonctionner.

Pour une autre adresse, un autre hôte

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.

À quoi sert l'étiquette?

Rien ne dépend de cette liste, donc changer est sûr — c'est exactement pourquoi c'est le seul champ qui peut changer.

Il met à jour l'objet

host.label est remplacé par ce qui est revenu.