---
title: "Restore from the trash"
description: "Puts a deleted item back where it was, with the same link, access and people, together with what was deleted with it: a page's sub-pages, or a folder's…"
canonical_url: https://docs.markdrop.in/api/trash/restore-from-the-trash
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Restore from the trash

`POST https://api.markdrop.in/api/v1/trash/{slug}/restore`

Puts a deleted item back where it was, with the same link, access and people, together with what was deleted with it: a page's sub-pages, or a folder's folders and items. If the place it came from is gone, it comes back as close as it can and `notes` says where. Send a token as its owner or an admin of its workspace, or the document's edit secret.

- **Authentication:** Token optional: send `Authorization: Bearer mdk_…` to act as your account, or the document's edit secret in `X-Edit-Secret`.
- **Rate limit:** 10 per minute per IP address.
- **MCP tool:** `restore_document` ([tools](https://docs.markdrop.in/ai/tools))
- **Guide:** [Trash](https://docs.markdrop.in/documents/trash)

## Path parameters

- `slug` (string, required): The item's address, or a deleted folder's id, from [List the trash](https://docs.markdrop.in/api/trash/list-the-trash).

## Headers

- `X-Edit-Secret` (string): The document's edit secret (`sk_…`), for a document published without an account. See [Edit key](https://docs.markdrop.in/documents/edit-key).

## Responses

- `200`: OK.
- `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 POST https://api.markdrop.in/api/v1/trash/k3x9q2m/restore \
  -H "Authorization: Bearer $MARKDROP_TOKEN"
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/trash/k3x9q2m/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/trash/k3x9q2m/restore",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
)
r.raise_for_status()
print(r.json())
```
