What it does
Copy a published site template into this account in one call. Uses the snapshot, never the live source. Requires an account-wide full key, the same as create_site. A site key is refused. The response includes agent_guide, which also stays on the new site, and the copied actions with name, table, kind, and access. Copied actions start off. update_action turns them on. The copy may reach only the template's outside_hosts (returned in the response) until the owner lifts that limit on /hive. Omit version to copy the latest approved version; a version that isn't approved is refused unless you published the template.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
slugrequired | string | The template's slug, from list_templates. |
version | integer | The template version to copy. Leave it out for the latest approved one. |
title | string | The new site's title. |
subdomain | string | The new site's address: <subdomain>.pagehive.space. |
table_prefix | string | Only when this account already has a copy: the prefix for the copy's tables and values, e.g. devboard2_. Left out, a copy whose names are taken gets the first free one, and the response lists what was renamed. |
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_from_template with these arguments:
{
"slug": "dev-board",
"title": "Our board",
"subdomain": "our-board"
}
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.