POST/api/v1/documents/{slug}/comments/{thread_id}/suggestion/accept

Accept a suggested edit

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.

API token required60 per minute per IPMCP: accept_suggestion

Guide: Suggested edits

Code samples and Try it

Path parameters

#
  • slugstringRequired

    The document's address: the part after markdrop.in/.

  • thread_idstringRequired

    Matches ^[0-9a-f]{24}$.

Headers

#
  • X-Read-Passwordstring

    The password of a password-protected document.

  • X-Markdrop-Workspacestring

    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

  • resolveboolean

    Default true.

Responses

#
  • 200OK.
  • 401No token, or the token is revoked or mistyped.
  • 409The text it replaces changed (suggestion_stale), it crosses formatting (suggestion_unappliable), or nothing is open.
  • 422The request didn't validate. detail lists each problem, with where it is (loc) and why (msg).
  • 423The page is locked, or the edit touches a signed-off section.
  • 429Too many requests from your IP address. Wait the seconds in Retry-After.