DELETE/api/v1/documents/{slug}

Delete a document

Moves a document to the trash for 30 days. Its link stops working at once; Restore from the trash brings it back as it was. Send a token as the owner, or the document's edit secret in X-Edit-Secret.

A page with sub-pages needs children: delete sends them to the trash with it, lift moves them up a level.

Token optionalOr edit secret10 per minute per IPMCP: delete_document

Guide: Trash

Code samples and Try it

Path parameters

#
  • slugstringRequired

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

Query parameters

#
  • children"delete" | "lift"

    For a page with sub-pages: delete (they go to the trash too) or lift (they move up a level).

Headers

#
  • X-Edit-Secretstring

    The document's edit secret (sk_…), for a document published without an account. See Edit key.

Responses

#
  • 204No content.
  • 409The page has sub-pages and children is missing: code is has_children, with their count.
  • 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?