POST/api/v1/documents/{slug}/save-as-template

Save as a template

Saves a copy of a page, with its images, as a template: the workspace's (members and up) or your own (scope: "personal"). include_subpages copies the sub-pages you can open too.

API token requiredOr edit secret10 per minute per IPMCP: save_page_as_template

Guide: Templates

Code samples and Try it

Path parameters

#
  • slugstringRequired

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

Headers

#
  • X-Edit-Secretstring

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

Request body

#

application/json, required

  • namestring

    The template's name. Defaults to the page's title. Up to 200 characters.

  • descriptionstring

    Up to 600 characters.

  • iconstring

    Up to 32 characters.

  • include_subpagesboolean

    Copy the sub-pages you can open too. Default false.

  • scope"workspace" | "personal"

    workspace (the default for a page in a workspace) or personal.

  • workspacestring

    Save it to this workspace instead of the page's own (members and up). 1–64 characters.

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.
Did this page help?