---
title: "Duplicate template"
method: POST
path: "/v4/templates/{templateId}/duplicate"
tags: ["Templates"]
---

# Duplicate template

`POST /v4/templates/{templateId}/duplicate`

## Request

- Base URL: `https://api.kadoa.com`
- URL: `https://api.kadoa.com/v4/templates/{templateId}/duplicate`
- Auth: API key in header `x-api-key`

Create an independent copy of a template from its latest published version as a single new version 1, including prompt, schema, validation rules, notifications, and frequency. The copy has no linked workflows. Defaults the name to the source name plus a collision-safe "(Copy)" suffix.

## Path parameters

- `templateId` string, uuid, required

## Request body

- DuplicateTemplateBody: Request body for duplicating a template (all versions and configs, no linked workflows)
  - `name` string: Name for the duplicate. Defaults to the source name with a collision-safe "(Copy)" suffix.

## Response `201`

201

- TemplateCreatedResponse: Response for template creation
  - `error` false, required: Error flag (always false on success)
  - `success` true, required: Success flag
  - `data` object, required: Created template
    - `id` string, uuid, required: Template ID
    - `name` string, required: Template name
    - `description` string, nullable, required: Template description
    - `teamId` string, uuid, required: Owning team ID
    - `latestVersion` number, nullable, required: Latest published version number
    - `workflowCount` number: Number of workflows linked to this template
    - `latestVersionSummary` LatestVersionSummary: Content preview of the latest version for list rendering. null when the template has no published versions; omitted by create/update/duplicate responses.
      - `promptPreview` string, nullable, required: Truncated prompt prefix (capped at ~280 chars with ellipsis) for list display. null when the latest version has no prompt.
      - `schemaFieldNames` string[], required: Field names of the latest version's schema, in declared order. Empty when the version has no schema.
      - `dqRuleCount` integer, required: Count of data-quality rule fields on the latest version (top-level keys of schemaValidationRules, which are field names).
      - `notificationChannelCount` integer, required: Count of distinct notification channels across all events on the latest version.
      - `frequencyInterval` 'ONLY_ONCE' | 'EVERY_10_MINUTES' | 'EVERY_20_MINUTES' | 'HALF_HOURLY' | 'HOURLY' | 'TWO_HOURLY' | 'THREE_HOURLY' | 'FOUR_HOURLY' | 'SIX_HOURLY' | 'TWELVE_HOURLY' | 'EIGHTEEN_HOURLY' | 'DAILY' | 'TWO_DAY' | 'THREE_DAY' | 'WEEKLY' | 'BIWEEKLY' | 'TRIWEEKLY' | 'FOUR_WEEKS' | 'MONTHLY' | 'CUSTOM', nullable, required: Frequency interval enum of the latest version. null when the version does not control frequency.
      - `frequencyWeekdaysOnly` boolean, required: Whether the latest version skips Saturday and Sunday runs.
    - `archivedAt` string, nullable, required: Archive timestamp (null if active)
    - `createdAt` string, required: Creation timestamp
    - `updatedAt` string, required: Last update timestamp

## Other responses

- `400`: 400
- `401`: 401
- `404`: 404
- `409`: 409
- `500`: 500

---

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