---
title: "Restore a page version"
description: "Makes version n the page again, as a new version."
canonical_url: https://docs.markdrop.in/api/page-history/restore-a-page-version
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Restore a page version

`POST https://api.markdrop.in/api/v1/documents/{slug}/versions/{n}/restore`

Makes version `n` the page again, as a new version. The page as it was is saved first, so a restore can be undone.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 60 per minute per IP address.
- **MCP tool:** `restore_page_version` ([tools](https://docs.markdrop.in/ai/tools))
- **Guide:** [Version history](https://docs.markdrop.in/pages/history)

## Path parameters

- `slug` (string, required): The document's address: the part after `markdrop.in/`.
- `n` (integer, required): The version number, from [List page versions](https://docs.markdrop.in/api/page-history/list-page-versions).

## 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`).
- `423`: Someone else has the page open in the editor.
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X POST https://api.markdrop.in/api/v1/documents/k3x9q2m/versions/3/restore \
  -H "Authorization: Bearer $MARKDROP_TOKEN"
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/documents/k3x9q2m/versions/3/restore", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.post(
    "https://api.markdrop.in/api/v1/documents/k3x9q2m/versions/3/restore",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
)
r.raise_for_status()
print(r.json())
```
