POST/api/v1/pages

Create a page

Creates a page: a document that opens in the block editor. template fills it from a template, or content gives its Markdown. workspace and folder file it (members and up); parent puts it inside a page you can edit, with that page's workspace, folder and access. Unless it has a cover, or auto_cover is false, a cover is picked for it in the background.

API token required10 per minute per IPMCP: create_page

Guide: Pages and the block editor

Code samples and Try it

Request body

#

application/json, required

  • titlestringRequired

    Shown on the page and in link previews. 1–200 characters.

  • workspacestring

    File it in this workspace: the workspace's id. 1–64 characters.

  • folderstring

    An existing folder of workspace: its id or its path, like guides/setup. 1–400 characters.

  • parentstring

    The address of a page you can edit: the new page goes inside it, in its workspace and folder, with its access. Leave workspace and folder out. 1–64 characters.

  • templatestring

    A template's id, from List every template. Leave it out for a blank page. 1–64 characters.

  • contentstring

    The document's Markdown. Up to 500,000 characters.

  • slugstring

    Your own address: markdrop.in/<slug>. Random when left out; 409 when taken. 3–50 characters. Matches ^[a-zA-Z0-9_-]+$.

  • auto_coverboolean

    false: no cover is picked for it. Default true.

Responses

#
  • 201Created. Returns the page as document, with its slug and url.
  • 401No token, or the token is revoked or mistyped.
  • 409slug is taken, or reserved. Nothing is created.
  • 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: 3 fields (PageCreateResponse)
  • documentobject
    51 fields inside
    • slugstring
    • urlstring
    • folder_patharray of string
    • titlestring | null

      Shown on the page and in link previews.

    • contentstring

      The 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) | null

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

    • viewsinteger

      Default 0.

    • revinteger | null
    • is_password_protectedboolean

      Default false.

    • is_ownedboolean

      Default false.

    • is_ownerboolean

      Default false.

    • idstring | null
    • refstring | null
    • 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
    • artifact_urlstring | null
    • download_urlstring | null
    • poster_urlstring | null
    • mediaobject | null
    • file_versioninteger | null
    • workspace_urlstring | null
    • 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".

    • workspace_idstring | null
    • canobject | null
    • read_ticketstring | null
    • access_epochinteger

      Default 0.

    • presence_ticketstring | null
    • show_presenceboolean | null
    • editorstring | null
    • parentobject | null
    • breadcrumbsarray of object
    • children_countinteger

      Default 0.

    • access_inheritboolean | null
    • page_patharray of string
    • template_idstring | null
    • templateobject | null
    • pageobject | null
    • page_propertiesobject | null
    • assetsobject

      Default {}.

    • cover_autoboolean

      Default false.

    • cover_pendingboolean

      Default false.

  • edit_secretstring | null

    The new page's edit secret. Not returned on a workspace's own domain.

  • workspace_errorstring | null
Did this page help?