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
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
Request body
application/json, ExportRequest.
| Field | Type | Description |
|---|---|---|
children | boolean | Documents: include the page's descendants. |
format required | string | zip-md (the full export) or a document format: html, pdf, docx, odt, epub, revealjs, latex, txt, md. |
include_secrets | boolean | Zip: include secrets, encrypted with passphrase (humans only). |
passphrase | string | null | The passphrase for secrets.json.age (at least 12 characters). |
scope | string | null | What 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
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
id required | path | string (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
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The 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