POST
/api/v1/documents/{slug}/comments/{thread_id}/ai/applyDraft a suggested edit with AI
Apply with AI: replacement text for the thread's quote, drafted from the discussion. Nothing is saved; suggest it with PUT …/suggestion. Within fair-use limits (429 ai_limit when reached).
API token required20 per minute per IP
Guide: AI help
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
instructionstringUp to 300 characters.
Responses
#200OK.401No token, or the token is revoked or mistyped.422The request didn't validate.detaillists each problem, with where it is (loc) and why (msg).429Too many requests from your IP address. Wait the seconds inRetry-After.