---
title: "Update a template"
description: "Renames a template, or changes its description or icon (an empty icon clears it)."
canonical_url: https://docs.markdrop.in/api/templates/update-a-template
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Update a template

`PATCH https://api.markdrop.in/api/v1/page-templates/{template_id}`

Renames a template, or changes its description or icon (an empty `icon` clears it). A workspace template: its admins and whoever saved it.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 10 per minute per IP address.

## Path parameters

- `template_id` (string, required): The template's id, from [List every template](https://docs.markdrop.in/api/templates/list-every-template).

## Request body

`application/json`, required.

- `name` (string): Up to 200 characters.
- `description` (string): Up to 600 characters.
- `icon` (string): Up to 32 characters.

## Responses

- `200`: OK.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X PATCH https://api.markdrop.in/api/v1/page-templates/TEMPLATE_ID \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Weekly sync"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/page-templates/TEMPLATE_ID", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Weekly sync"
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.patch(
    "https://api.markdrop.in/api/v1/page-templates/TEMPLATE_ID",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"name": "Weekly sync"},
)
r.raise_for_status()
print(r.json())
```
