---
title: "Create a new project from a template"
method: POST
path: "/projects/from-template"
tags: ["Projects"]
---

# Create a new project from a template

`POST /projects/from-template`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/from-template`
- Auth: HTTP bearer

Image-backed service templates are created directly from their pinned image.
Source-backed starter templates can either use their public repository or
create a repository under the selected Git provider account.

## Request body

- CreateProjectFromTemplateRequest: Request to create a project from a template Supports three deploy modes: * **Native image service mode** — curated service templates deploy a digest-pinned container image and retain their template release identity, runtime configuration, and managed-service bindings. * **Fork mode** — when `git_provider_connection_id` is set, the template repo is cloned into a new repository under the user's Git account and the project tracks that fork (git-push deploys, automatic deploy on push). * **One-click public-repo mode** — when `git_provider_connection_id` is omitted, the project deploys directly from the template's public source repository (no fork, no Git account required). This is the activation path: a brand-new user with no Git provider connected can still deploy a demo in one click. `repository_name` / `repository_owner` are ignored in this mode, and automatic-deploy-on-push is unavailable (there is no fork to receive webhooks).
  - `automatic_deploy` boolean: Enable automatic deployment on push (defaults to true). Only honoured in fork mode; public-repo deploys cannot receive push webhooks.
  - `cloudflare_enabled` boolean, nullable: Override the Cloudflare default for this new project.
  - `command` string[], nullable: Optional image entrypoint arguments. An empty list explicitly uses the image's own default command instead of the template command.
  - `cpu_limit` integer, nullable: CPU limit override in microcores. Zero means uncapped.
  - `cpu_request` integer, nullable: CPU request override in microcores (1_000_000 = one CPU core).
  - `delivery_provider` string, nullable
  - `environment_variables` EnvVarInput[]: Environment variables to set (key-value pairs)
    - `is_secret` boolean: Mark the variable as a secret. Secret values are encrypted at rest, masked in list responses, and revealable only through an audited, permission-checked endpoint. Defaults to `false`.
    - `name` string, required: Variable name
    - `value` string, required: Variable value
  - `exposed_port` integer, nullable: Public container port override.
  - `git_provider_connection_id` integer, nullable: Git provider connection ID. When omitted, the project deploys directly from the template's public source repository instead of forking it.
  - `health_check_path` string, nullable: Relative HTTP health-check path override.
  - `image` string, nullable: Optional prebuilt-image override. Curated template values remain the default when this is omitted. Accepted only for image templates.
  - `memory_limit` integer, nullable: Memory limit override in MiB. Zero means uncapped.
  - `memory_request` integer, nullable: Memory request override in MiB.
  - `private` boolean: Whether to make the repository private (defaults to true)
  - `project_name` string, required: Name for the new project
  - `repository_name` string, nullable: Name for the new repository to create. Required in fork mode; ignored in one-click public-repo mode.
  - `repository_owner` string, nullable: Owner/organization for the new repository (defaults to authenticated user)
  - `storage_service_ids` integer[]: External storage service IDs to attach to the project
  - `template_slug` string, required: Template slug to use as the base

## Response `201`

Project created successfully

- CreateProjectFromTemplateResponse: Response after creating a project from template
  - `deployment_error` string, nullable: Actionable retry guidance when project creation succeeded but deployment dispatch did not. Internal queue errors are never exposed.
  - `deployment_queued` boolean, nullable: Whether the initial deployment was successfully queued. This is set for native image service templates; Git-backed modes use their pipeline flow.
  - `message` string, required: Message with additional info
  - `project_id` integer, required: ID of the created project
  - `project_name` string, required: Name of the created project
  - `project_slug` string, required: Slug of the created project
  - `repository_url` string, required: URL of the created repository
  - `template_slug` string, required: Template that was used

## Other responses

- `400`: Invalid input
- `401`: Unauthorized
- `403`: Insufficient permissions, or the slug is reserved for host Docker access and only an instance admin may claim it (ADR 045)
- `404`: Template not found
- `428`: The reserved slug requires a recently MFA-verified session; complete step-up verification and retry (ADR 045)
- `500`: Internal server error

## Changes

- **2026-10-05** `4b228ebed583`: 3 info
  - added the new optional request property `cloudflare_enabled`
  - added the new optional request property `delivery_provider`
  - added the non-success response with the status `428`
- **2026-10-05** `63a80791dc58`: 2 warning, 1 info
  - removed the request property `cloudflare_enabled`
  - removed the request property `delivery_provider`
  - removed the non-success response with the status `428`
- **2026-10-03** `de8387218c0b`: 2 info
  - added the new optional request property `cloudflare_enabled`
  - added the new optional request property `delivery_provider`
- **2026-09-22** `caf2f2ecd3e5`: 1 info
  - added the non-success response with the status `428`
- **2026-09-07** `c2a1f69745e7`: 10 info
  - added the new optional request property `command`
  - added the new optional request property `cpu_limit`
  - added the new optional request property `cpu_request`
  - added the new optional request property `exposed_port`
  - …6 more

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/from-template/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
