POST/api/v1/documents/{slug}/comments

Start a thread

Comments on quoted text (anchor.type: text with quote.exact and the characters around it), a whole block (block, by block_id or block_text) or the page (page). mentions are user ids of people who can open it; assignee makes it a task. The page's text never changes.

API token required30 per minute per IP300 per day per IPMCP: add_comment

Guide: Comments

Code samples and Try it

Path parameters

#
  • slugstringRequired

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

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, required

  • anchorobjectRequired
    5 fields inside
    • type"text" | "block" | "page"Required
    • block_idstring

      Up to 40 characters.

    • block_textstring

      Up to 2,000 characters.

    • quoteobject
    • startinteger
  • bodystringRequired

    1–5,000 characters.

  • mentionsarray of string

    Up to 20 items.

  • assigneestring

    Up to 40 characters.

  • attachmentsarray of string

    Up to 10 items.

  • suggestionstring

    Up to 5,000 characters.

Responses

#
  • 201Created.
  • 401No token, or the token is revoked or mistyped.
  • 422The quoted text or block isn't on the page (code anchor_not_found), or the comment is empty or too long.
  • 429Too many requests from your IP address. Wait the seconds in Retry-After.
Did this page help?