What it does
Update a site's title, theme, settings, visibility (private or public), status (live or offline), subdomain, agent_guide, time_zone or page_access. This does not create a version. time_zone is an IANA name used for $today in visitor actions (default UTC). agent_guide is markdown stored on the site and snapshotted when the site is published as a site template; agent_guide_edits changes part of it (send one of the two). A bot or site key cannot make a site public when the owner locked it private, or set the lock; a site key updates only its own site. An agent working as itself needs level Full and changes only title, theme, settings, time_zone and agent_guide (other fields: owner_only). Offline hides pages, /data and share links; the site still counts toward the limits, and a new site cannot go live before its first publish. A subdomain rename is limited to 3 per site lifetime, site keys included; the old address redirects for 30 days and then stops, and the site object carries this warning. A taken name returns suggestions. page_access sets path rules that keep some pages to view links, members, editors or the owner.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
site_idrequired | string | The id of the site. list_sites gives the ids of your sites. |
title | string | A new title for the site. |
theme | object or null | Theme variables your pages print as {{ theme.name }}. null clears them. |
settings | object | Site-wide settings, as an object. |
status | one of: live, offline | live serves the site; offline hides its pages, data and view links. A new site can't be set live before its first publish. |
offline_reason | string or null | A note on why the site is offline, shown to visitors. null clears it. |
subdomain | string | A new address. Renames are limited and the old address only redirects for 30 days, so ask the owner first. |
visibility | one of: private, public | private keeps the site to the owner, members and view links; public opens it to everyone. Ask the owner before making a site public. |
agent_guide | string or null | Markdown instructions for agents, stored on the site and copied with it when it becomes a site template. null clears it. |
agent_guide_edits | array of objects | Find-and-replace edits on the stored agent_guide, with the same rules as patch_page edits; a failed edit changes nothing. The response then leaves the guide text out (agent_guide_chars gives its length) and reports each edit with snippets. Not with agent_guide. |
time_zone | string | An IANA time zone, such as Europe/Zurich. Visitor actions use it for $today. Default UTC. |
page_access | array of objects | page_access: path rules that make pages, scripts (/scripts/<name>) and uploaded files (/files/<name>) stricter than the site, never more open. Each rule is { path, access }. path is exact ("/notes", "/scripts/admin.js") or ends in one * that matches anything after it ("/admin/*" also covers /admin; "/scripts/admin-*"; "/*" covers everything). access: site (follows the site), link (a view or review link, a member or the owner), members (any member or the owner), editors (members with role edit or higher, or the owner), owner (the owner only). The most specific rule wins: exact beats a * rule, a longer prefix beats a shorter one. A visitor who is not allowed gets the sign-in page on link, members and editors pages, and a 404 on owner pages and on every script and file. Templates can test a link with {% if "/club" | can_open %}. Rules apply at once, without publish_site. Send the whole list each time; [] removes every rule. |
login_path | string or null | A page of the site, such as /login, that visitors without access to this private site are sent to instead of the standard private-site page. Its forms post to /_pagehive/sign-in, /_pagehive/sign-in/code and /_pagehive/pin; see the guide topic login-page. null: the standard pages. Needs can_custom_login_page. |
outside_hosts | null | Only null: lifts the host limit a site copied from a site template starts with, so its pages may load from and send to any host. |
Example
Call update_site with these arguments:
{
"site_id": "01a1…",
"title": "Team recipes",
"time_zone": "Europe/Zurich"
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Make a site private or publicWho can open your site, and how to change it.
- Take a site offlineHide a site without deleting it.
- Page accessKeep some pages to members, editors or only you.