---
title: "Save template version (Cloud-only)"
method: POST
path: "/v1/templates/{project_id}/{template_name}"
tags: ["templates"]
---

# Save template version (Cloud-only)

`POST /v1/templates/{project_id}/{template_name}`

Saves the current version of the template as a new version

## Path parameters

- `project_id` string, required
- `template_name` string, required

## Request body

- object
  - `preserve_environment_variables_on_migration` boolean — If true, the environment variables will be preserved in the template version when migrating agents
  - `preserve_core_memories_on_migration` boolean — If true, the core memories will be preserved in the template version when migrating agents
  - `migrate_agents` boolean — If true, existing agents attached to this template will be migrated to the new template version
  - `message` string — A message to describe the changes made in this template version

## Response `200`

200

- object
  - `name` string, required — The exact name of the template
  - `id` string, required
  - `project_id` string, required
  - `project_slug` string, required
  - `latest_version` string, required — The latest version of the template
  - `description` string
  - `template_deployment_slug` string, required — The full name of the template, including version and project slug
  - `updated_at` string, required — When the template was last updated

## Other responses

- `400` — 400

---

[API](https://skmtc.dev/yu-code666/apis/letta-api.md) · [All operations](https://skmtc.dev/yu-code666/apis/letta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/yu-code666/letta-api/revisions/6cec99480c13/schema)
