Skip to content

Creates a clone of an existing template.
The cloned template will belong to the same user and can be customized independently.
The clone maintains a reference to the source template through the sourceTemplateId field.

id string REQUIRED
The template id of the template that you want to clone.

name string OPTIONAL
Query parameter. The name of the cloned template. When omitted, the clone keeps the name of the source template.

Here’s a sample request to clone a template:

ENDPOINT
POST /v1/template/:id/clone?name=My%20Clone
REQUEST
fetch(`https://api.templated.io/v1/template/${id}/clone?name=${encodeURIComponent('My Clone')}`, {
method: 'POST',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

The API returns a JSON object with the cloned template details.

{
"id": "new-template-id-123",
"name": "My Template",
"width": 1200,
"height": 800,
"sourceTemplateId": "original-template-id-456",
"isClone": true,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
}