POST/pages/export

Export a page as HTML or Markdown

Exports a page as an HTML or Markdown zip archive. Supply pageId and choose format; set includeAttachments or includeChildren to include attachments or recursively export sub-pages. The response contains the generated zip archive.

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

4 body fields

Page export options.

formatstringrequired
Export format. `html`: HTML files. `markdown`: Markdown (.md) files.
Allowed:htmlmarkdown
includeAttachmentsbooleanoptional
If `true`, includes file attachments (images, etc.) in the export archive. If `false` (default), only text content is exported.
includeChildrenbooleanoptional
If `true`, exports the page and all its sub-pages recursively. If `false` (default), exports only the specified page.
pageIdstringrequired
ID of the page to export.

3 status codes
200Returns the generated zip archive as a file stream.
403Returned when the authenticated user is forbidden from exporting the page.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
404Returned when the page cannot be found.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional

Error handling

A 403 is returned when the authenticated user is forbidden from exporting the page. A 404 is returned when the page cannot be found. format must be html or markdown, and pageId must identify the page to export.