Docs Open org

API reference

Exports API

Zip and document exports

POST /orgs/{org}/exports

Starts an export: zip-md (the whole org, a space or a page subtree, with attachments, export.json, audit.jsonl for admins, and secrets encrypted to a passphrase if asked), or a document of a page. Formats that need Pandoc or Typst answer 501 export_tool_missing when the server doesn't have them.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.

Request body

application/json, ExportRequest.

FieldTypeDescription
childrenbooleanDocuments: include the page's descendants.
format requiredstringzip-md (the full export) or a document format: html, pdf, docx, odt, epub, revealjs, latex, txt, md.
include_secretsbooleanZip: include secrets, encrypted with passphrase (humans only).
passphrasestring | nullThe passphrase for secrets.json.age (at least 12 characters).
scopestring | nullWhat to export: org (default for zip), a space slug, or a page reference (required for documents).

Responses

202
Accepted. ExportView application/json
501
export_tool_missing

GET /orgs/{org}/exports/{id}

An export's status, with a 5-minute download link once it's done.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
id requiredpathstring (uuid)The export.

Responses

200
OK. ExportView application/json

POST /orgs/{org}/imports/zip

Imports a full zip-md export (the raw body) into this org, which must have no pages. Secrets come back only with the export's passphrase in Aegent-Import-Passphrase. Runs as a job: follow GET /orgs/{org}/imports/{id}; undo with POST …/imports/{id}/undo.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.

Request body

application/zip, integer (int32)[].

Responses

202
Accepted. ZipImport application/json
409
org_not_empty
422
not_an_export or bad_passphrase