Duplicate Template

Create a copy of an existing template. The duplicate is created as a draft with the name "<original name> (Copy)" and no alias.

POST/templates/{template_id}/duplicate

Requires a full_access API key.

Path Parameters

template_idstringrequired

The template ID (UUID) or alias string of the template to duplicate.

Response Fields

objectstring

Always "template".

idstring

The ID of the newly created duplicate template.

curl -X POST 'https://api.postflare.app/templates/e5f6a7b8-c9d0-1234-efab-345678901234/duplicate' \
  -H 'Authorization: Bearer re_xxxxxxxxx'
const response = await fetch(
  'https://api.postflare.app/templates/welcome-email/duplicate',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer re_xxxxxxxxx',
    },
  }
);

const data = await response.json();

Response

Response
{
  "object": "template",
  "id": "f6a7b8c9-d0e1-2345-fabc-456789012345"
}