Update a template
Change a template’s name, description, tags or key.
curl -X PATCH https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv \
-H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Product card (square)" }'const res = await fetch("https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.MUZEKIT_SECRET_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Product card (square)" }),
});
const template = await res.json();import os
import requests
template = requests.patch(
"https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv",
headers={"Authorization": f"Bearer {os.environ['MUZEKIT_SECRET_KEY']}"},
json={"name": "Product card (square)"},
).json(){id} is the template's tpl_… id or its key. Send only the fields you change.
Body
namestringUp to 200 characters.
descriptionstringUp to 2,000 characters.
tagsstring[]Replaces the tags.
external_idstringThe template's key. Change it in Test and Live, or Copy to Live treats the template as new. 409 external_id_taken when another template here has it.
To change the content, use Update a document.
Examples
Add a tag
tags replaces the whole list. To add one, read the template, add the tag, and send the full list. Send [] to clear them.
TAGS=$(curl -s https://api.muzekit.com/v1/templates/product-card \
-H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
| jq -c '.tags + ["holiday"] | unique')
curl -X PATCH https://api.muzekit.com/v1/templates/product-card \
-H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
-H "Content-Type: application/json" \
-d "{ \"tags\": $TAGS }"const url = "https://api.muzekit.com/v1/templates/product-card";
const headers = {
Authorization: `Bearer ${process.env.MUZEKIT_SECRET_KEY}`,
"Content-Type": "application/json",
};
const template = await (await fetch(url, { headers })).json();
const tags = [...new Set([...template.tags, "holiday"])];
await fetch(url, { method: "PATCH", headers, body: JSON.stringify({ tags }) });import os
import requests
url = "https://api.muzekit.com/v1/templates/product-card"
headers = {"Authorization": f"Bearer {os.environ['MUZEKIT_SECRET_KEY']}"}
template = requests.get(url, headers=headers).json()
tags = sorted(set(template["tags"]) | {"holiday"})
requests.patch(url, headers=headers, json={"tags": tags})Change a template's key
Copy to Live matches templates by key, so change it with your Test key (mk_test_…) and your Live key (mk_live_…). Keys are stored in lower case. A key another template in that environment has answers 409 external_id_taken.
for KEY in "$MUZEKIT_TEST_SECRET_KEY" "$MUZEKIT_LIVE_SECRET_KEY"; do
curl -X PATCH https://api.muzekit.com/v1/templates/product-card \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{ "external_id": "product-card-square" }'
doneconst keys = [
process.env.MUZEKIT_TEST_SECRET_KEY,
process.env.MUZEKIT_LIVE_SECRET_KEY,
];
for (const key of keys) {
await fetch("https://api.muzekit.com/v1/templates/product-card", {
method: "PATCH",
headers: {
Authorization: `Bearer ${key}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ external_id: "product-card-square" }),
});
}import os
import requests
for key in ["MUZEKIT_TEST_SECRET_KEY", "MUZEKIT_LIVE_SECRET_KEY"]:
requests.patch(
"https://api.muzekit.com/v1/templates/product-card",
headers={"Authorization": f"Bearer {os.environ[key]}"},
json={"external_id": "product-card-square"},
)Rename an end user's design
User designs are updated the same way, by their tpl_… id from List templates with user. Use it when your app lets users rename designs outside the editor.
curl -X PATCH https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv \
-H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Spring flyer", "description": "Final version for print" }'const res = await fetch("https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.MUZEKIT_SECRET_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Spring flyer",
description: "Final version for print",
}),
});
const design = await res.json();import os
import requests
design = requests.patch(
"https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv",
headers={"Authorization": f"Bearer {os.environ['MUZEKIT_SECRET_KEY']}"},
json={"name": "Spring flyer", "description": "Final version for print"},
).json()Response
The updated template.
{
"object": "template",
"id": "tpl_Vk1t4l9xvQv",
"name": "Product card (square)",
"description": null,
"tags": ["shop"],
"external_id": "product-card",
"user": null,
"source": "api",
"version": { "id": "ver_…", "number": 1, "revision": 3 },
"width": 1080,
"height": 1080,
"page_count": 1,
"thumbnail_url": "https://storage.muzekit.com/…/r1.png",
"created_at": "2026-10-17T02:10:00.000Z",
"updated_at": "2026-10-18T09:42:00.000Z"
}