Import & Export
Move content in and out of Theneo from the command line, import an API spec to update a project, or export your docs as Markdown or an OpenAPI spec.
Import a spec
theneo project import updates an existing project from an API file, link, or Postman collection. The --import-type flag controls how the incoming spec is applied to what’s already there:
Endpoints Only · endpoints
Nothing is created automatically. Imported endpoints land in the Collections tab and you drag and drop them into your docs by hand, for maximum control.
Append · append
Adds new sections and endpoints on top of your existing docs, leaving current content untouched. Ideal for combining multiple specs.
Merge · merge
Updates only what changed and preserves your customizations and descriptions. The smartest way to re-import a changed spec.
Overwrite · overwrite
Replaces all existing content with the uploaded spec, a clean slate. Use with caution: customizations are lost.
theneo project import --project <project-slug> --file ./api-spec.json --import-type merge --publish
During a merge, add --keepOldParameterDescription and --keepOldSectionDescription to protect manual edits. For the full flag reference see Common Commands; for what Merge preserves, see Merge.
Export your project
Export from the command line as Markdown for a docs-as-code workflow, or as an OpenAPI spec. Both are in beta.
theneo export --project <project-slug> --projectVersion <version-slug> --workspace <workspace-slug> --dir <directory>
Writes a structured folder of Markdown, the same layout Theneo imports. See Docs-as-Code with Markdown for the full folder layout, theneo.json, and section.json reference.
theneo export --openapi --format json
The same export options as the regular export command apply.
Exported Markdown is the foundation of a docs-as-code workflow, see Docs-as-Code with Markdown and GitHub Sync.
Round-tripping Markdown
- Re-imports update in place: importing an exported folder back into the same project updates the matching sections instead of adding duplicate copies, and keeps widgets and formatting intact.
- Tabs are replaced, not merged: each tab's section list is set from the imported files, so an unchanged export imports back exactly as it was.
- Clean exports: exporting into a folder that already holds an earlier export removes the pages that export left behind, such as pages since renamed or deleted in Theneo. Only files the export produces (
index.md,section.json,theneo.json) are removed; READMEs, assets, and hand-written pages stay. Pass--no-cleanto keep everything. A--tabexport never removes files. - Import into a branch: add
--branch <branch-id>to import into a documentation branch instead of the live version. See Branches & Preview Deployments.
On this page
- Import & Export