---
title: "Accept a suggested edit"
description: "For people who can edit the page."
canonical_url: https://docs.markdrop.in/api/comments/accept-a-suggested-edit
last_updated: 2026-11-20
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Accept a suggested edit

`POST https://api.markdrop.in/api/v1/documents/{slug}/comments/{thread_id}/suggestion/accept`

For people who can edit the page. 200: the quote is replaced, saved as its own version in the page's history (`version_id`), and the thread resolves (`resolve: false` keeps it open). 202 (`offered: true`): someone else is editing the page, so the suggestion waits for them to apply it.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 60 per minute per IP address.
- **MCP tool:** `accept_suggestion` ([tools](https://docs.markdrop.in/ai/tools))
- **Guide:** [Suggested edits](https://docs.markdrop.in/collaboration/suggested-edits)

## Path parameters

- `slug` (string, required): The document's address: the part after `markdrop.in/`.
- `thread_id` (string, required): Matches `^[0-9a-f]{24}$`.

## Headers

- `X-Read-Password` (string): The password of a password-protected document.
- `X-Markdrop-Workspace` (string): A workspace's id: answer only if the document is in that workspace, else `404`. Workspace domains send it; you rarely need it.

## Request body

`application/json`.

- `resolve` (boolean): Default `true`.

## Responses

- `200`: OK.
- `401`: No token, or the token is revoked or mistyped.
- `409`: The text it replaces changed (`suggestion_stale`), it crosses formatting (`suggestion_unappliable`), or nothing is open.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `423`: The page is locked, or the edit touches a signed-off section.
- `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/comments/THREAD_ID/suggestion/accept \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"resolve":true}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/documents/k3x9q2m/comments/THREAD_ID/suggestion/accept", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "resolve": true
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.post(
    "https://api.markdrop.in/api/v1/documents/k3x9q2m/comments/THREAD_ID/suggestion/accept",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"resolve": True},
)
r.raise_for_status()
print(r.json())
```
