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

# Duplicate a template

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

## Request

- Base URL: `https://smtpfa.st/api`
- URL: `https://smtpfa.st/api/v1/templates/{id}/duplicate`
- Auth: HTTP bearer

Copy a template's draft into a new draft template named with "(copy)" appended. The alias is not copied and nothing is published. Requires the email:send scope.

## Path parameters

- `id` string, required

## Response `201`

The new template

- TemplateRef: Resend's { id, object }. Create, update and publish also return the fields below (not in Resend): updated_at is the revision that write set, to pass as expected_updated_at next time.
  - `id` string
  - `object` string
  - `updated_at` string, date-time: Not in Resend. The revision this write created.
  - `status` 'draft' | 'published': Not in Resend.
  - `published_at` string, date-time, nullable: Not in Resend.
  - `has_unpublished_versions` boolean: Not in Resend.

## Other responses

- `401`: Invalid or missing API key
- `403`: Forbidden - domain not verified or insufficient permissions
- `404`: Resource not found
- `422`: The request is well formed but cannot be carried out in the current state, for example an unpublished template
- `429`: Rate limit exceeded - retry after the period indicated in the Retry-After header
- `500`: Internal server error

---

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