---
title: "Save a project as a template"
method: POST
path: "/projects/{id}/template"
tags: ["Projects"]
---

# Save a project as a template

`POST /projects/{id}/template`

## Request

- Base URL: `https://api.rendley.com/v1`
- URL: `https://api.rendley.com/v1/projects/{id}/template`
- Auth: API key in header `Authorization`

Copy the project (document and files) into a user template of its workspace. Saving again from the same project overwrites that template and keeps its id; deleting the project does not affect it. Start it with POST /projects and template_id. `fields` replaces the project's template fields first, each named by its path: clips.<clip_id>.<property> (e.g. clips.<id>.text, clips.<id>.style.color), display.<property>, or media.<media_id>.url for the file behind a media. Omitted, the fields set in the editor are kept.

## Path parameters

- `id` string, required

## Request body

- TypesSaveTemplateInput
  - `fields` TypesTemplateFieldDefinition[]: Replaces the project's template fields before saving; omitted keeps the ones set in the editor.
    - `alias` string: Name the author gave the field in the editor.
    - `clip_id` string: Clip a media field was promoted from.
    - `group` string: The clip, media or canvas the field belongs to.
    - `key` string: Name in POST /projects `fields`; the path when unset.
    - `label` string
    - `path` string, required: Document path, e.g. clips.<id>.text or media.<id>.url.
    - `property_id` string: Editor panel field and right-sidebar step that render it.
    - `step` string
  - `name` string

## Response `200`

OK

- object
  - `data` object: Success data
    - `created_at` string
    - `created_by` string
    - `fields` TypesTemplateField[]
      - `group` string: The clip, or the canvas, the field belongs to.
      - `key` string: Name in POST /projects `fields`; the path when the author set no key.
      - `label` string
      - `length` integer: Item count of a list field; a value must have the same.
      - `linked` integer: How many more places the same value fills: fields sharing a key are linked.
      - `media_kind` 'image' | 'video' | 'gif' | 'audio'
      - `path` string
      - `type` 'text' | 'number' | 'color' | 'boolean' | 'list' | 'media'
      - `value` unknown
    - `fit_duration` number
    - `height` integer
    - `id` string
    - `is_premium` boolean
    - `name` string
    - `preview_video_url` string
    - `source_project_id` string: The project a user template was saved from, while that project exists.
    - `template_json` string
    - `thumbnail_url` string
    - `updated_at` string
    - `width` integer
    - `workspace_id` string
  - `error` HttpResponseAPIError
    - `code` string
    - `fields` HttpResponseFieldError[]
      - `field` string
      - `message` string
    - `message` string
  - `meta` unknown

## Other responses

- `400`: VALIDATION_ERROR (e.g. a field path the project can't fill), or ANIMATED_TEMPLATE_FIELDS when keyframes drive a field
- `401`: Unauthorized
- `403`: SUBSCRIPTION_REQUIRED on free plans, PLAN_LIMIT_REACHED when storage runs out
- `404`: TEMPLATE_NOT_FOUND when the template was deleted during the save
- `409`: TEMPLATE_SAVE_IN_PROGRESS

---

[API](https://skmtc.dev/rendley/apis/rendley-api.md) - [All operations](https://skmtc.dev/rendley/apis/rendley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rendley/apis/rendley-api/revisions/7eb8713bbf78?raw)
