---
title: "Duplicate Template"
method: POST
path: "/public/v1/templates/{id}/duplicate"
tags: ["Templates"]
---

# Duplicate Template

`POST /public/v1/templates/{id}/duplicate`

## Request

- Base URL: `https://api.pandadoc.com`
- URL: `https://api.pandadoc.com/public/v1/templates/{id}/duplicate`
- Auth: one of:
  - API key in header `Authorization`
  - OAuth 2
    - Authorization code: `https://app.pandadoc.com/oauth2/authorize`
    - Token URL: `https://api.pandadoc.com/oauth2/access_token`
- TypeScript: <https://skmtc.dev/pandadoc/apis/pandadoc-public-api/docs/public/v1/templates/:id/duplicate/post.ts> (a function with typed inputs; its response is checked against the schema)

## Duplicate Template

Creates a copy of a template within the same workspace.

> 📘 **Permissions**
>
> Requires `can_read_templates` and `can_duplicate_templates` permissions. Duplicating templates owned by other users additionally requires `can_duplicate_any_template`.

## Path parameters

- `id` string, required

## Request body

- TemplateDuplicateRequest: Request payload for duplicating a template within the same workspace.
  - `name` string: Custom name for the duplicated template. When omitted or empty, a name is auto-generated from the source template.

## Response `201`

Template duplicated successfully.

- TemplateDuplicateResponse: Duplicated template details.
  - `id` string: Unique identifier of the duplicated template.
  - `name` string: Name of the duplicated template.
  - `date_created` string, date-time: Date and time when the duplicated template was created.
  - `date_modified` string, date-time: Date and time when the duplicated template was last modified.
  - `meta` object: Metadata about the duplication operation.
    - `source_template_id` string: Unique identifier of the source template that was duplicated.

## Other responses

- `400`: Bad Request
- `401`: Authentication error
- `403`: Permission error
- `404`: Not found
- `429`: Too Many Requests

---

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