GET

List versions

A template’s versions, newest first; one is current.

View as Markdown
GEThttps://api.muzekit.com/v1/templates/{id}/versions
curl https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv/versions \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

{id} is the template's tpl_… id or its key. The list is ordered by number, highest first, 100 versions a page (limit sets fewer). When has_more is true, pass next_cursor as after for the next page.

The current version (current: true) is the one saves update in place; its revision goes up with each save. The others are history: versions your team named in the editor, the state at the end of an editing session, and the version that was current before a restore or a Copy to Live. A named copy gets a higher number than the current version, so find the current one by current, not by its place in the list.

Get a version's document reads any of them by id or number; Get a document always returns the current version. To restore an older one, use the version history in the editor.

Examples

Check whether a template changed

Store the current version's id and revision when you render or export. If either differs later, the template was saved or restored since.

curl -s https://api.muzekit.com/v1/templates/product-card/versions \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq '.data[] | select(.current) | { id, revision, updated_at }'

A render records the revision it used too (revision on the render).

List the named versions

Names mark the versions people meant to keep, like "Approved by client". Unnamed versions have label: null.

curl -s https://api.muzekit.com/v1/templates/product-card/versions \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq -r '.data[] | select(.label) | "\(.number)\t\(.label)\t\(.created_at)"'

Response

JSON
{
  "object": "list",
  "data": [
    {
      "object": "version",
      "id": "ver_Qa7mT2kWz9c",
      "number": 3,
      "label": "Approved by client",
      "revision": 1,
      "current": false,
      "page_count": 1,
      "width": 1080,
      "height": 1080,
      "created_at": "2026-11-20T14:02:11.384Z",
      "updated_at": "2026-11-20T14:02:11.384Z"
    },
    {
      "object": "version",
      "id": "ver_Lp0sQ7dXk2m",
      "number": 2,
      "label": null,
      "revision": 6,
      "current": true,
      "page_count": 1,
      "width": 1080,
      "height": 1080,
      "created_at": "2026-11-12T09:40:57.020Z",
      "updated_at": "2026-11-28T17:21:30.715Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}