> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/account-level/studio-workspace/template-v1/sample-flows.md

## Article Content:

# 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](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/template-v1/copy-site-as-template.md) with the ID of the site to base the template on. The original site is left unchanged, and the duplicated site becomes the template.
1. Call [Create Site From Template](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/template-v1/create-site-from-template.md) with the template's ID for each client site you want to create. Each call returns the ID of the new site.
1. Call [Query Templates](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/template-v1/query-templates.md) to retrieve the partner's templates, and [Get Template](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/template-v1/get-template.md) 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](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/template-v1/copy-site-as-template.md) with the ID of the site to base the template on, or use an existing template.
1. Call [Publish Template](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/template-v1/publish-template.md) with the template's ID. This creates a public snapshot of the template's site that other accounts can clone.
1. Call [Get Template](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/template-v1/get-template.md) to confirm the template's `templateType` is now `PUBLIC`.