---
title: "Keep unsaved text"
description: "Keeps text you couldn't save, because someone took over the page, as a version in its history."
canonical_url: https://docs.markdrop.in/api/pages/keep-unsaved-text
last_updated: 2026-11-05
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Keep unsaved text

`POST https://api.markdrop.in/api/v1/documents/{slug}/lock/keep`

Keeps text you couldn't save, because someone took over the page, as a version in its history. The page itself doesn't change.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 60 per minute per IP address.
- **Guide:** [Editing together](https://docs.markdrop.in/pages/editing-together)

## Path parameters

- `slug` (string, required): The document's address: the part after `markdrop.in/`.

## Request body

`application/json`, required.

- `title` (string): Shown on the page and in link previews. Up to 500 characters.
- `content` (string, required): The document's Markdown. Up to 2,000,000 characters.
- `base_rev` (integer)
- `reason` ("taken_over" | "lost" | "conflict"): Default `"taken_over"`.

## 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 POST https://api.markdrop.in/api/v1/documents/k3x9q2m/lock/keep \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
       "title": "Launch plan",
       "content": "# Launch plan\n\nWhat I was writing…",
       "base_rev": 12,
       "reason": "taken_over"
     }'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/documents/k3x9q2m/lock/keep", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "title": "Launch plan",
    "content": "# Launch plan\n\nWhat I was writing…",
    "base_rev": 12,
    "reason": "taken_over"
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.post(
    "https://api.markdrop.in/api/v1/documents/k3x9q2m/lock/keep",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={
        "title": "Launch plan",
        "content": "# Launch plan\n\nWhat I was writing…",
        "base_rev": 12,
        "reason": "taken_over",
    },
)
r.raise_for_status()
print(r.json())
```
