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
| Name | Type | About |
|---|---|---|
title | string | The site's title, shown in the browser tab and in /hive. |
subdomain | string | The address: <subdomain>.pagehive.space. A taken name returns up to three free suggestions. |
theme | object or null | Theme variables your pages print as {{ theme.name }}, such as colors and fonts. Each is text, a number or true/false. |
settings | object | Site-wide settings, as an object. |
idempotency_key | string | Any 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
- Your first siteFrom an empty Hive to a live page in four steps.
- Make a site private or publicWho can open your site, and how to change it.