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 2.0 · merge_v2
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_v2 --publish
During a merge, add --keepOldParameterDescription and --keepOldSectionDescription to protect manual edits. For the full flag reference see Common Commands; for how each option reshapes your docs, see Import Your API.
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 from. 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.
On this page
- Import & Export