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

Upload a file for a comment

A file for a comment you're writing (images, PDF, Word, Excel, PowerPoint, zip, text; up to 10 MB), as multipart file. Send its id in the comment's attachments. Anyone who can comment.

API token required30 per minute per IP

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

#

multipart/form-data, required

  • filefileRequired

Responses

#
  • 201Created.
  • 401No token, or the token is revoked or mistyped.
  • 415That kind of file can't go in a comment.
  • 422The request didn't validate. detail lists each problem, with where it is (loc) and why (msg).
  • 429Too many requests from your IP address. Wait the seconds in Retry-After.
Did this page help?