---
title: "Reorder templates"
description: "Sets the order of a workspace's templates (admins) or, with workspace left out, of your personal ones."
canonical_url: https://docs.markdrop.in/api/templates/reorder-templates
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Reorder templates

`PUT https://api.markdrop.in/api/v1/page-templates/order`

Sets the order of a workspace's templates (admins) or, with `workspace` left out, of your personal ones.

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

## Request body

`application/json`, required.

- `workspace` (string): The workspace whose templates these are. Leave it out for your personal ones. 1–64 characters.
- `ids` (array of string, required): The templates' ids, in the new order. Up to 200 items.

## 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 PUT https://api.markdrop.in/api/v1/page-templates/order \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workspace":"WORKSPACE_ID","ids":["TEMPLATE_ID"]}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/page-templates/order", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "workspace": "WORKSPACE_ID",
    "ids": [
      "TEMPLATE_ID"
    ]
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.put(
    "https://api.markdrop.in/api/v1/page-templates/order",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"workspace": "WORKSPACE_ID", "ids": ["TEMPLATE_ID"]},
)
r.raise_for_status()
print(r.json())
```
