POST/pages/import

Import a single file as a page

Imports a single Markdown, HTML, or Word document as a page in a space. Provide the file and spaceId; files must be in a supported format and no larger than 10 MB. Supply parentPageId to create the imported page as a child, or omit it to create the page at the root level.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 body fields

Multipart form data containing the file to import and its destination space, with an optional parent page.

filestringrequired
File to import. Supported formats: `.md` (Markdown), `.html` (HTML), `.docx` (Word document). Max 10 MB.
parentPageIdstringoptional
ID of the parent page. If provided, the imported page is created as a child. If omitted, created at root level.
spaceIdstringrequired
ID of the space to import the page into.

3 status codes
200Returns the imported page.
dataobjectoptional
statusintegeroptional
successbooleanoptional
400Returned when the request fails validation.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
403Returned when the import is forbidden.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional

Error handling

A 400 is returned when the request fails validation; include the required file and spaceId fields. The file must be a .md, .html, or .docx file no larger than 10 MB, and a 403 is returned when the import is forbidden. spaceId and, if supplied, parentPageId must be UUIDs.