pagehive

create_site

Create a site.

SitesChanges dataAll plans

What it does

Create a site. The key issued at sign-up can create one site and is then limited to it. A site key that already belongs to a site cannot create another. Creating a site needs an agent that reaches the whole hive (or every site except some) at a level with draft on. New sites are private until update_site or publish_site sets visibility public, unless the owner locked them. publish_site takes optional visibility private or public; omit it and the site stays as it is, so a new site stays private. It stays offline until publish_site. A taken subdomain is validation_failed reason taken and may include up to three free suggestions. The site object carries the rename warning.

Plans

Works on every plan: Free, Basic, Pro and Ultra.

Parameters

NameTypeAbout
titlestringThe site's title, shown in the browser tab and in /hive.
subdomainstringThe address: <subdomain>.pagehive.space. A taken name returns up to three free suggestions.
themeobject or nullTheme variables your pages print as {{ theme.name }}, such as colors and fonts. Each is text, a number or true/false.
settingsobjectSite-wide settings, as an object.
idempotency_keystringAny unique string (1-200 printable ASCII). A retry with the same key and arguments returns the first call's result instead of running again. Same as the Idempotency-Key header.

Example

Call create_site with these arguments:

{
  "title": "Team recipes",
  "subdomain": "team-recipes"
}

Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.

Related guides