Import & Export
Routebase is not a place your API contract gets locked into. An OpenAPI file goes in, an OpenAPI file comes out, and the same is true for Postman and Insomnia collections on the way in. When your OpenAPI file is generated from code, a newer version of it updates the draft in place. This page covers all three.
Importing
Where to import
There are two entry points, and they do not accept the same formats:
| Entry point | Where | Accepts |
|---|---|---|
| Import OpenAPI | The dashboard, and the project list | OpenAPI only |
| Import in the specification wizard | Inside a project, when you create a specification | OpenAPI, Postman Collection, Insomnia Export |
The dashboard route creates the project, the specification and the environments in one go, which is the fastest path when you are starting from an existing file. If you are holding a Postman or Insomnia export, take the second route and create the project first, then import the collection through the specification wizard.
Both accept .yaml, .yml, and .json.
The import preview
Before anything is created, Routebase validates the file and shows you what it found. The preview counts endpoints, folders and schemas, splitting the schemas into the ones it could link and the ones that stay inline. It also lists the reusable components it recognized, which are responses, request bodies, parameters, security schemes and, on a 3.2 file, media types. Warnings appear here too rather than after the fact. A property that the OpenAPI specification does not define at that location is listed as a warning with its location and left out, so the rest of the file still imports. Typical cases are a logo field inside info or minItems on a query parameter. A $ref that points to another file is handled by its position. Parameters, responses, request bodies, headers and security schemes that live in a file outside the upload are listed as warnings and left out. A schema reference to another file stays a reference in the imported schema, so the endpoint itself still imports. An OpenAPI 3.2 file keeps its version, and the designer imports its query operations, its tag hierarchy, the itemSchema of sequential media types, its querystring parameters, the cookie parameter style, the deprecated flag, oauth2MetadataUrl and deviceAuthorization flow of its security schemes, the reusable media types under components.mediaTypes together with every $ref that points at them, the document's $self URI, the dataValue and serializedValue of Example Objects, the defaultMapping of a discriminator and the nodeType of an XML object. A named examples map is read through its first entry on every version, because the designer keeps one example per place. Constructs the designer does not model yet, such as itemEncoding or prefixEncoding, appear as warnings with their location in the document.
Read the preview before you confirm. It is the cheapest moment to notice that a file contains half of what you expected.

Import options
| Option | Default | What it does |
|---|---|---|
| Convert to OpenAPI 3.1 | off | Only offered for OpenAPI 3.0 files. Upgrades nullable syntax and exclusive min/max to the 3.1 form. |
| Organize endpoints by tags | on from the dashboard, off in the wizard | Creates folders from the OpenAPI tags and groups endpoints into them. For a Postman collection it follows the folder structure instead, and for an Insomnia export it follows the request groups. |
| Shorten schema names | off | Keeps only the last dot-segment of a schema name, so Foo.Bar.Response becomes Response, and only where the short name stays unique within the spec. |
Turning on Shorten schema names reveals a follow-up choice that matters more than it looks, especially for specs generated from .NET or Java:
- Keep original names internally stores the full namespaced names alongside the short ones. Take this if you will re-import the file or diff against it later.
- Discard namespaces permanently does not keep the original names. Later comparisons against the source file will report every schema as renamed.
Importing from Postman or Insomnia
Collections describe requests, not contracts. There is no schema in a Postman collection, only example bodies. Routebase therefore infers schemas from the examples it finds and says so plainly with "Schemas were inferred from example data and may be incomplete."
Treat an inferred schema as a first draft. A field that happened to be null in the example will be typed from that, and a field absent from the example does not exist at all. The import gets you a structured starting point in minutes, but the contract is still yours to finish.
When validation fails
You do not have to leave and re-upload. The wizard shows a Validation failed — N errors panel that lists every error above an inline editor with the offending lines highlighted. The panel reads "Edit the content below and re-validate. Click an error to jump to its location." Fix the file in place and click Re-validate.
When the failure is a recognizable class, a one-click fix appears. The common case is a spec that declares OpenAPI 3.0 but uses 3.1-only keywords. Routebase offers "This looks fixable automatically" with a Retry as OpenAPI 3.1 button instead of making you find every occurrence by hand.


Updating a draft from a file
Use this when your specification comes from code or from a generator, and the file is where changes start. Instead of deleting the specification and importing it again, you write the newer file into the draft. Endpoints are matched by method and path, and schemas and components by name. Matched items are updated in place, so the tests, mock rules and monitors linked to them stay linked. What the file no longer contains is removed from the draft.
Updating the draft
- Open the draft of the specification. A published version can't be updated from a file.
- Click Update draft from file in the version menu.
- Choose the OpenAPI file, in YAML or JSON. Routebase compares it with the draft right away and writes nothing yet.
- Read the comparison. It counts what is Added, Changed and Removed, and how much of it is Breaking, and it lists every item with the fields that changed.
- Click Update draft. A message confirms how many items were added, changed and removed, and the designer shows the new state.

Turn on Put new endpoints into folders named after their first tag if new endpoints should land in folders. Endpoints that already exist keep their folder.
What the file owns
| The file decides | Routebase keeps |
|---|---|
| Paths, operations, parameters, request bodies and responses | The folder of each endpoint |
| Schemas and reusable components | The order of endpoints and parameters |
Tags and the security of each operation |
Internal notes on endpoints |
info and servers belong to the specification rather than to the draft, so an update leaves them as they are. When the file says something else there, the comparison lists it as a note.
Headers that a header policy adds to a response stay with the policy. The export writes them into every response the policy covers, so an update from a file leaves out each header that matches its policy and writes only the headers that differ. A schema or response linked from the shared library also stays linked, although the export writes it as a component of the specification.
Values edited in Routebase
Routebase remembers what the last update from a file wrote. If someone changed one of those values in the designer since then, and the file still says something else, the comparison shows the change as a conflict. Each conflict names the item and the field, and shows the value in Routebase next to the value in the file.
Update draft stays disabled until you check the box below the conflicts. It reads Replace the value edited in Routebase for one conflict and names the number when there are more. Leave it unchecked and cancel if the edit should go into the file first.
A draft that was never updated from a file has nothing to compare against. Routebase then can't tell which values were edited by hand, so it asks once with Replace the values of this draft with the file. If the draft changes between the comparison and the update, the dialog shows the new conflicts and asks again.
Removed endpoints
An endpoint that is missing from the file is removed from the draft. Its tests and mock rules stay, and they appear under Derived artifacts in the designer, marked needs review. The entry disappears once you delete the test or the mock rule, or link the test to another endpoint.
The first update of an empty draft
When the draft had no endpoints yet, the first update also sets up what you need to work with the new specification:
- a mock server with a rule for each endpoint, unless the project already has one, in which case its rules are added
- the base URL of the environment that uses the mock, if that base URL is still empty
- a test suite with one linked test per endpoint, unless tests are already linked to the specification
- one run of that suite against the mock, when the suite has at most 100 tests and the mock server is active
Each step runs only if you hold its permission. The confirmation message says which steps started and which were skipped. A deactivated mock server stays deactivated, and the run is then skipped.
Limits. The automatic run counts toward the monthly test runs of your plan. When that limit is reached, the suite is still created, but it does not run.
From CI or an agent
The same update is available outside the app. In the Public API, POST /api/projects/{projectId}/specs/{specId}/push updates the draft and POST /api/projects/{projectId}/specs/{specId}/push/preview returns the comparison without writing. A conflict answers 409 with the code SPEC_PUSH_CONFLICT and the list of conflicts, until the request sets overwrite.
In a pipeline, the CLI runs the same update with routebase spec push, and --dry-run shows the comparison on a pull request. CLI in CI/CD covers the command and its exit codes.
Agents use the MCP tool push_spec, and validate_spec with the mode push for the comparison. The MCP quickstart shows how to connect an agent.
Exporting
Every frozen version can be downloaded in four formats:
| Format | Use |
|---|---|
| YAML | The usual OpenAPI form, readable in review and friendly to version control. |
| JSON | The same document for tools that prefer JSON. |
| Postman | A collection your consumers can open and call straight away. |
| Insomnia | The same, for Insomnia. |
Exports need a frozen snapshot. The download buttons appear once a version is actually frozen. A promotion into an environment that does not freeze leaves the version a draft, and a draft has no snapshot to export. This is deliberate, because an export is a copy of a contract, and a contract that can still change underneath the file you handed out is not one.
You reach the exports from the release receipt of the Release Version wizard, and from the version itself afterwards.
What travels with the export
The export is a complete OpenAPI document, not a Routebase-flavored one. Tag descriptions, enum labels and per-value descriptions (x-enumNames, x-enumDescriptions), deprecation metadata and your reusable components are all in the file. A generator on the other side therefore produces the same names and the same documentation your portal shows. A schema example is written as the singular example on a 3.0 document and as the JSON Schema examples list on 3.1 and 3.2, which is the form those versions recommend.
Permissions
Importing creates a specification and requires specs:write, included in the Member role. Exporting requires specs:read.
Updating a draft from a file requires specs:write and specs:delete, because the update removes what the file no longer contains. The comparison alone requires specs:read. Each step of the setup after the first update needs its own permission, which is mock-server:manage for the mock server, projects:write for the environment, tests:write for the tests and tests:execute for the run.
Related
- API Design Settings — the specification wizard and per-spec settings
- Versioning — freezing a version, which is what makes it exportable
- Endpoints — what you work with after the import
- Schemas — including enum labels and how they export
- Getting Started — the path from an existing file to a first project
- MCP quickstart — connecting an agent that updates the draft with
push_spec