---
title: "Create a template"
method: POST
path: "/api/v2/templates"
tags: ["Templates"]
---

# Create a template

`POST /api/v2/templates`

Create a new template. The `attributes.target_type` field is a discriminator that selects one of four creation paths, each with its own required `model_attributes` shape and permission check.

| target_type | Creates | Required `model_attributes` keys | Permission |
|---|---|---|---|
| `project` | Empty workspace (no copy support — see `/projects/copy`) | `client_id`, `project_manager_id`, `project_type_id`, `workflow_id` | `projects.manage` (project manager) |
| `budget` | New quote (or copies one when `target_id` is set) | none required; optional `editor_config`, `tracking_type_id`, `color_id` | `can_manage_budgets?` |
| `deal` | New quote (or copies one when `target_id` is set) | none required; optional `editor_config`, `color_id`, `retainer_interval` / `retainer_interval_count` (retainer feature only) | `can_manage_deals?` |
| `page` | New page (or copies one when `target_id` is set); supports `copy_attributes.copy_memberships` and `copy_attributes.copy_subpages` | none | `can_manage_docs?` |

### Create a project template (fresh workspace)
```json
{
  "data": {
    "type": "templates",
    "attributes": {
      "name": "Onboarding playbook",
      "description": "Standard intake project for new clients.",
      "target_type": "project",
      "model_attributes": {
        "client_id": 412,
        "project_manager_id": 13,
        "project_type_id": 2,
        "workflow_id": 1,
        "project_color_id": 5
      }
    }
  }
}
```

### Create a budget template (fresh quote)
```json
{
  "data": {
    "type": "templates",
    "attributes": {
      "name": "Standard retainer scaffold",
      "target_type": "budget",
      "model_attributes": {
        "tracking_type_id": 1,
        "color_id": 5
      }
    }
  }
}
```

### Create a budget template by copying an existing budget
```json
{
  "data": {
    "type": "templates",
    "attributes": {
      "name": "Q3 enterprise migration template",
      "target_type": "budget",
      "target_id": "98231",
      "model_attributes": { "color_id": 5 }
    }
  }
}
```

### Create a deal template
```json
{
  "data": {
    "type": "templates",
    "attributes": {
      "name": "Standard outbound deal",
      "target_type": "deal",
      "model_attributes": {
        "color_id": 5,
        "retainer_interval": "month",
        "retainer_interval_count": 12
      }
    }
  }
}
```

### Create a page template by copying an existing page
```json
{
  "data": {
    "type": "templates",
    "attributes": {
      "name": "Engineering RFC template",
      "target_type": "page",
      "target_id": "55421",
      "copy_attributes": { "copy_memberships": false, "copy_subpages": true }
    }
  }
}
```

**Save as Template** — to create a project template from an **existing** project (boards, tasks, settings copied), use [`POST /projects/copy`](#tag/Projects/operation/projects-copy) with `attributes.copy_as_template: true`. The `target_type=project` path on this endpoint only creates a **fresh, empty** template.

## Headers

- `X-Organization-Id` string, required

## Response `201`

Successful response containing the requested template.

## Other responses

- `422` — Validation error — for example, missing or invalid `target_type`, or a per-target permission failure.

---

[API](https://skmtc.net/productive/apis/api-documentation.md) · [All operations](https://skmtc.net/productive/apis/api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/productive/api-documentation/versions/6bb0150a5c5f/schema)
