POST
/api/v1/documents/{slug}/comments/{thread_id}/suggestion/acceptAccept 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.
Guide: Suggested edits
Code samples and Try itPath parameters
#slugstringRequiredThe document's address: the part after
markdrop.in/.thread_idstringRequiredMatches
^[0-9a-f]{24}$.
Headers
#X-Read-PasswordstringThe password of a password-protected document.
X-Markdrop-WorkspacestringA 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
resolvebooleanDefault
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.detaillists 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 inRetry-After.