GET

List templates

Workspace templates, or one user’s templates, newest first.

View as Markdown
GEThttps://api.muzekit.com/v1/templates
curl "https://api.muzekit.com/v1/templates?limit=20" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

Query

userusr_…

List this user’s templates instead of the workspace’s.

tagstring

Only templates with this exact tag (case matters), up to 50 characters.

qstring

Only templates whose name or key contains this text, in any case. Up to 100 characters.

limitnumber

1 to 100, default 20.

aftertpl_…

next_cursor from the previous page.

Without user, the list has workspace templates only, never end users' designs. tag, q and user combine: every filter you send must match. q matches its text as typed, so % and _ are plain characters.

Examples

List one end user's designs

Pass user to show a user the designs they made, for example on a "My designs" page in your app. Their templates carry user, and usually no key (external_id is null). thumbnail_url is null until the editor saves the template once.

curl "https://api.muzekit.com/v1/templates?user=usr_8fK2mQ1xZpR" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

Find templates by tag or name

Send tag for templates you tagged, for example holiday, and q to narrow them by name or key. Here: holiday templates whose name or key has "card" in it.

curl -G https://api.muzekit.com/v1/templates \
  --data-urlencode "tag=holiday" \
  --data-urlencode "q=card" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

A tag is matched whole: tag=holiday doesn't find holiday-2026. Set tags with Update a template.

Page through every template

While has_more is true, send next_cursor as after to get the next page.

AFTER=""
while : ; do
  PAGE=$(curl -s "https://api.muzekit.com/v1/templates?limit=100&after=$AFTER" \
    -H "Authorization: Bearer $MUZEKIT_SECRET_KEY")
  echo "$PAGE" | jq -r '.data[] | "\(.id) \(.name)"'
  AFTER=$(echo "$PAGE" | jq -r '.next_cursor // empty')
  [ -z "$AFTER" ] && break
done

Response

JSON
{
  "object": "list",
  "data": [
    {
      "object": "template",
      "id": "tpl_Vk1t4l9xvQv",
      "name": "Product card",
      "description": null,
      "tags": [],
      "external_id": "product-card",
      "user": null,
      "source": "api",
      "version": { "id": "ver_…", "number": 1, "revision": 1 },
      "width": 1080,
      "height": 1080,
      "page_count": 1,
      "thumbnail_url": "https://storage.muzekit.com/…/r1.png",
      "created_at": "…",
      "updated_at": "…"
    }
  ],
  "has_more": false,
  "next_cursor": null
}