POST/spaces/export

Export all pages in a space as a zip archive

Exports all pages in a space as an HTML or Markdown zip archive. Supply spaceId and choose format; set includeAttachments to include file attachments in the archive. The response contains the generated zip archive.

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

3 body fields

Space export options.

formatstringrequired
Export format. `html`: HTML files. `markdown`: Markdown (.md) files.
Allowed:htmlmarkdown
includeAttachmentsbooleanoptional
If `true`, includes file attachments in the export archive. If `false` (default), only text content is exported.
spaceIdstringrequired
ID of the space to export. All pages in the space are included.

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

Error handling

A 403 is returned when the authenticated user is forbidden from exporting the space. spaceId must identify the space to export, and format must be html or markdown.