POST/api/v1/workspaces/{workspace_id}/documents

Add a document

Files one of your documents in the workspace, by its id.

API token required60 per minute per IP
Code samples and Try it

Path parameters

#
  • workspace_idstringRequired

    The workspace's id, from the address of its settings page (markdrop.in/settings/workspaces/<workspace-id>) or from List workspaces.

Request body

#

application/json, required

  • document_idstringRequired
  • folder_idstring

Responses

#
  • 201Created.
  • 401No token, or the token is revoked or mistyped.
  • 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.
201 response: 30 fields (MyDocListItem)
  • idstring | null
  • slugstring
  • urlstring
  • titlestring | null

    Shown on the page and in link previews.

  • content_previewstring
  • 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) | null

    ISO 8601, for example 2026-11-30T12:00:00Z.

  • viewsinteger

    Default 0.

  • export_pdf_countinteger

    Default 0.

  • copy_url_countinteger

    Default 0.

  • is_password_protectedboolean

    Default false.

  • google_doc_urlstring | null
  • google_doc_staleboolean

    Default false.

  • vscode_syncedboolean

    Default false.

  • encryptedboolean

    Set by clients that encrypt in the browser: content and title are already ciphertext. The server never sees the key. Default false.

  • kindstring

    Default "markdown".

  • mimestring | null
  • rendererstring | null
  • type_labelstring | null
  • size_bytesinteger | null
  • original_filenamestring | null
  • workspace_idstring | null
  • folder_idstring | null
  • folder_patharray of string
  • access_levelstring

    Who can open it: link (anyone with the link), private (only you and the people you share it with) or workspace (members of its workspace). Default "link".

  • shared_with_countinteger

    Default 0.

  • shared_by_namestring | null
  • shared_by_emailstring | null
  • is_mineboolean

    Default true.

Did this page help?