Change a site's settings
update_siteChanges one or more settings of an existing site; anything left out stays as it is. Takes effect on every edge within about a minute, without publishing again. Settings the plan does not include are refused with the reason.
Instructions
Changes one or more settings of an existing site; anything left out stays as it is. Takes effect on every edge within about a minute, without publishing again. Settings the plan does not include are refused with the reason. Only change what the person asked for — never invent a password or a date.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | How the site serves: `static` answers 404 for a missing path, `spa` falls back to index.html for a client-side router, `docs` reads documents through the viewer. Setting it stops the mode being detected on each publish. | |
| name | No | What to call the site in the dashboard. An empty string clears it. | |
| site | Yes | Subdomain or site id, from list_sites. | |
| forms | No | Whether the site's forms (marked data-drop2run) accept submissions. | |
| folder | No | Folder to move the site to — a path such as Clients/Acme or an id from list_folders — or `root` for the top level. Never creates a folder. | |
| confirm | No | Required only with `expiryAction: delete`: the site's subdomain, repeated exactly as the person said it. Ask for it rather than filling it in. | |
| comments | No | Who may comment on the site's pages: `off`; `invited` — the people invited with the comment role, on an invite-only site; or `anyone` signed in. Only on plans that include comments. | |
| password | No | A password visitors must type before seeing the site, as the person gave it. An empty string removes the password. On an invite-only site a password replaces invite-only and shuts out everyone on its list, so check get_site's `invitedOnly` and ask first. | |
| expiresAt | No | When the site should come down, as an ISO 8601 instant in the future such as 2026-12-01T09:00:00Z. An empty string cancels a scheduled takedown. | |
| invitedOnly | No | True: only the people on the site's list (invite_people) can open it, each signed in. It replaces a password. False: anybody with the link can open it again. Change it only when the person asked who should see the site. | |
| expiryAction | No | What the takedown does, read only with `expiresAt`: `pause` (the default) keeps the files and can be resumed; `delete` removes the site and frees its subdomain, and needs `confirm`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | How it serves its files. | |
| name | Yes | What it is called, or null. | |
| siteId | Yes | Identifier of the site. | |
| comments | Yes | Who may comment on its pages: nobody, the people invited to comment (only while it is invite-only), or anybody signed in. Null when that could not be read. | |
| folderId | Yes | The folder it is filed in, or null at the top level. | |
| expiresAt | Yes | When it is scheduled to come down, or null. | |
| invitedOnly | Yes | Whether only invited people can open it, or null when that could not be read. Null does not mean public. | |
| expiryAction | Yes | What the takedown does: `pause` or `delete`, or null when none is scheduled. | |
| formsEnabled | Yes | Whether it accepts form submissions. | |
| passwordProtected | Yes | Whether visitors must type a password. |