pagehive

create_site_from_template

Copy a published site template into this account in one call.

TemplatesChanges dataAll plans

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

NameTypeAbout
slugrequiredstringThe template's slug, from list_templates.
versionintegerThe template version to copy. Leave it out for the latest approved one.
titlestringThe new site's title.
subdomainstringThe new site's address: <subdomain>.pagehive.space.
table_prefixstringOnly 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_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_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