/api/v1/documentsPublish a document
Creates a Markdown document and returns its link. Works without an account: send a token to own it. Keep the edit_secret from a call without a token: it is the only way to change or delete that document later.
Guide: Publish your first document
Code samples and Try itRequest body
#application/json, required
titlestringShown on the page and in link previews. Up to 200 characters.
contentstringRequiredThe document's Markdown. 1–500,000 characters.
custom_slugstringYour own address:
markdrop.in/<custom_slug>. Letters, digits,-and_. Taken or reserved addresses answer409. 3–50 characters. Matches^[a-zA-Z0-9_-]+$.expires_in"never" | "1d" | "7d" | "30d" | "custom"When the document is deleted.
customneedscustom_expires_at. Default"never".custom_expires_atstring (date-time)The deletion time, when
expires_iniscustom. Must be in the future. ISO 8601, for example2026-11-30T12:00:00Z.read_passwordstringReaders must enter this password before they see the content. 1–100 characters.
encryptedbooleanSet by clients that encrypt in the browser:
contentandtitleare already ciphertext. The server never sees the key. Defaultfalse.access_level"private" | "link" | "workspace"Who can open it:
link(anyone with the link),private(only you and the people you share it with) orworkspace(members of its workspace). Default"link".workspacestringFile it in this workspace: the workspace's id. 1–64 characters.
folderstringAn existing folder of
workspace: its id or its path, likeguides/setup. 1–400 characters.
Responses
#201Created. Returns the document with itsslug,urlandedit_secret.409The custom address is taken, or reserved.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.
201 response: 37 fields (DocumentCreateResponse)
slugstringurlstringfolder_patharray of stringtitlestring | nullShown on the page and in link previews.
contentstringThe document's Markdown.
created_atstring (date-time)ISO 8601, for example
2026-11-30T12:00:00Z.updated_atstring (date-time)ISO 8601, for example
2026-11-30T12:00:00Z.expires_atstring (date-time) | nullISO 8601, for example
2026-11-30T12:00:00Z.viewsintegerDefault
0.is_password_protectedbooleanDefault
false.is_ownedbooleanDefault
false.is_ownerbooleanDefault
false.idstring | nullrefstring | nullgoogle_doc_urlstring | nullgoogle_doc_stalebooleanDefault
false.vscode_syncedbooleanDefault
false.encryptedbooleanSet by clients that encrypt in the browser:
contentandtitleare already ciphertext. The server never sees the key. Defaultfalse.kindstringDefault
"markdown".mimestring | nullrendererstring | nulltype_labelstring | nullsize_bytesinteger | nulloriginal_filenamestring | nullartifact_urlstring | nulldownload_urlstring | nullposter_urlstring | nullmediaobject | nullfile_versioninteger | nullworkspace_urlstring | nullaccess_levelstringWho can open it:
link(anyone with the link),private(only you and the people you share it with) orworkspace(members of its workspace). Default"link".workspace_idstring | nullcanobject | nullread_ticketstring | nullaccess_epochintegerDefault
0.edit_secretstringReturned once. Send it as
X-Edit-Secretto change or delete a document published without a token.workspace_errorstring | null