# Get a template

> One template’s details (not its document).

<Endpoint method="GET" path="/v1/templates/{id}" />

<CodeTabs>

```bash tab="cURL"
curl https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"
```

```javascript tab="Node"
const res = await fetch("https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv", {
  headers: { Authorization: `Bearer ${process.env.MUZEKIT_SECRET_KEY}` },
});
const template = await res.json();
```

```python tab="Python"
import os
import requests

template = requests.get(
    "https://api.muzekit.com/v1/templates/tpl_Vk1t4l9xvQv",
    headers={"Authorization": f"Bearer {os.environ['MUZEKIT_SECRET_KEY']}"},
).json()
```

</CodeTabs>

`{id}` is the template's `tpl_…` id or its key. It can be a workspace template or one of an end user's designs. Returns the [template](/docs/api-reference/templates-list). Use [Get a document](/docs/api-reference/templates-document-get) for the content.

## Examples

### Get a template by its key

The key is the same in Test and Live, so your code can use it with either key and skip storing `tpl_…` ids.

<CodeTabs>

```bash tab="cURL"
curl https://api.muzekit.com/v1/templates/product-card \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"
```

```javascript tab="Node"
const res = await fetch("https://api.muzekit.com/v1/templates/product-card", {
  headers: { Authorization: `Bearer ${process.env.MUZEKIT_SECRET_KEY}` },
});
const template = await res.json();
```

```python tab="Python"
import os
import requests

template = requests.get(
    "https://api.muzekit.com/v1/templates/product-card",
    headers={"Authorization": f"Bearer {os.environ['MUZEKIT_SECRET_KEY']}"},
).json()
```

</CodeTabs>

### Check a template exists before opening a session

A template that doesn't exist, or was deleted, answers `404 template_not_found`. Check first when the id or key comes from your own data, then open the editor on it with [Create a session](/docs/api-reference/sessions-create).

<CodeTabs>

```bash tab="cURL"
curl -s -o /dev/null -w "%{http_code}\n" \
  https://api.muzekit.com/v1/templates/product-card \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"
```

```javascript tab="Node"
const res = await fetch("https://api.muzekit.com/v1/templates/product-card", {
  headers: { Authorization: `Bearer ${process.env.MUZEKIT_SECRET_KEY}` },
});
if (res.status === 404) {
  // Fall back to another template, or open a blank editor
}
```

```python tab="Python"
import os
import requests

res = requests.get(
    "https://api.muzekit.com/v1/templates/product-card",
    headers={"Authorization": f"Bearer {os.environ['MUZEKIT_SECRET_KEY']}"},
)
if res.status_code == 404:
    pass  # Fall back to another template, or open a blank editor
```

</CodeTabs>

## Response

```json
{
  "object": "template",
  "id": "tpl_Vk1t4l9xvQv",
  "name": "Product card",
  "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/…/r3.png",
  "created_at": "2026-10-17T02:10:00.000Z",
  "updated_at": "2026-10-18T09:42:00.000Z"
}
```
