Templates API: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

Build client sites from a reusable template

A partner designs a single site, turns it into a template, and then spins up multiple client sites from that template. This lets the partner reuse one layout across many clients instead of rebuilding it each time.

To build client sites from a reusable template:

  1. Call Copy Site as Template with the ID of the site to base the template on. The original site is left unchanged, and the duplicated site becomes the template.
  2. Call Create Site From Template with the template's ID for each client site you want to create. Each call returns the ID of the new site.
  3. Call Query Templates to retrieve the partner's templates, and Get Template to view a template's sites list and see the sites created from it.

Publish a template for other accounts to use

A partner wants other Wix accounts to be able to clone one of their templates. Publishing the template turns it into a public template and is a prerequisite for listing it on the template marketplace.

To publish a template for other accounts to use:

  1. Call Copy Site as Template with the ID of the site to base the template on, or use an existing template.
  2. Call Publish Template with the template's ID. This creates a public snapshot of the template's site that other accounts can clone.
  3. Call Get Template to confirm the template's templateType is now PUBLIC.

Last updated: 6 July 2026

Did this help?