PATCH

Update a template

Change a template’s name, description, tags or key.

View as Markdown
PATCHhttps://api.muzekit.com/v1/templates/{id}
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)" }'

{id} is the template's tpl_… id or its key. Send only the fields you change.

Body

namestring

Up to 200 characters.

descriptionstring

Up to 2,000 characters.

tagsstring[]

Replaces the tags.

external_idstring

The 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 }"

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" }'
done

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" }'

Response

The updated template.

JSON
{
  "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"
}