AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How to Configure Multi-Version API Documentation and Routing in Mintlify

Kim Hyuk-chul · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Technical documentation teams and Developer Relations (DevRel) architects inevitably hit a structural crisis when a platform API undergoes major breaking changes. Upgrading from v1 to v2—or maintaining an enterprise Long-Term Support (LTS) release alongside a cutting-edge Beta—forces an architectural choice: split the documentation across separate Git repositories, stack legacy and modern endpoints into a bloated single page, or configure native multi-version routing.

Splitting repositories causes maintenance costs to surge and splinters search indexes into isolated silos. Stacking endpoints within a single navigation tree leads to developer confusion, stale copy-pasting, and accidental calls to deprecated endpoints.

At 365Finds, our research position is unequivocal: single-repository version partitioning via Mintlify's modern docs.json engine is the superior architecture for API platforms undergoing major version iterations. It provides native sidebar version switching, unified search filtering, independent OpenAPI schema bindings, and clear URL routing—without duplicating repository overhead.

Here is the comprehensive guide to structuring, configuring, and governing multi-version API documentation in Mintlify.


1. Information Architecture and Directory Partitioning

Before touching configuration files, organize your Git repository into a deterministic folder structure. Mintlify resolves pages directly from repository file paths. When managing multiple versions, keep each version isolated in its own top-level directory while maintaining shared assets and schemas in centralized locations.

Recommended Repository Layout

├── docs.json                 # Global configuration and version routing
├── openapi/
│   ├── v1.json               # OpenAPI 3.0/3.1 spec for v1 endpoints
│   └── v2.json               # OpenAPI 3.0/3.1 spec for v2 endpoints
├── snippets/                 # Shared MDX snippets, callouts, and banners
│   └── deprecation-notice.mdx
├── v1/                       # Legacy / LTS documentation partition
│   ├── quickstart.mdx
│   ├── authentication.mdx
│   └── api-reference/
│       ├── users.mdx
│       └── billing.mdx
└── v2/                       # Active / Latest documentation partition
    ├── quickstart.mdx
    ├── authentication.mdx
    ├── migration-from-v1.mdx
    └── api-reference/
        ├── users.mdx
        └── billing.mdx

Key Architectural Guidelines

  1. Parallel Endpoint Slugs: Use identical relative structures within /v1/ and /v2/ where applicable. This consistency simplifies redirect mapping and automated migration guides.
  2. Dedicated Migration Guides: Always place migration documents (for example, v2/migration-from-v1.mdx) within the newer version partition so developers landing on v2 have immediate upgrade context.
  3. Externalized Specs: Store versioned OpenAPI specification files in an /openapi or /specs root directory rather than embedding them directly in content folders.

2. Configuring navigation.versions in docs.json

In Mintlify's architecture, multi-version navigation is declared under navigation.versions within docs.json. Each entry represents a distinct version state in the user interface.

Production Configuration Example

{
  "$schema": "https://mintlify.com/docs.json",
  "name": "Acme API Documentation",
  "theme": "mint",
  "colors": {
    "primary": "#0D9488",
    "light": "#14B8A6",
    "dark": "#0F766E"
  },
  "navigation": {
    "versions": [
      {
        "version": "v2",
        "tag": "Latest",
        "default": true,
        "groups": [
          {
            "group": "Getting Started",
            "pages": [
              "v2/quickstart",
              "v2/authentication",
              "v2/migration-from-v1"
            ]
          },
          {
            "group": "Core Endpoints",
            "openapi": "openapi/v2.json",
            "pages": [
              "v2/api-reference/users",
              "v2/api-reference/billing"
            ]
          }
        ]
      },
      {
        "version": "v1",
        "tag": "LTS",
        "groups": [
          {
            "group": "Getting Started",
            "pages": [
              "v1/quickstart",
              "v1/authentication"
            ]
          },
          {
            "group": "Core Endpoints",
            "openapi": "openapi/v1.json",
            "pages": [
              "v1/api-reference/users",
              "v1/api-reference/billing"
            ]
          }
        ]
      }
    ]
  }
}

Critical Configuration Properties


3. OpenAPI Schema Binding and Endpoint Routing

Mintlify automatically generates interactive API playground pages, request parameters, and response schemas when OpenAPI files are bound to navigation elements.

In a multi-version platform, you must avoid global OpenAPI declarations that can cross-contaminate endpoints. Instead, declare the schema per version partition or per endpoint group:

{
  "group": "Core Endpoints",
  "openapi": "openapi/v2.json",
  "pages": [
    "v2/api-reference/users",
    "v2/api-reference/billing"
  ]
}

Binding Endpoints Inside MDX

Inside individual MDX files, associate the endpoint using the frontmatter openapi property. For example, in /v2/api-reference/users.mdx:

---
title: "Create User"
description: "Register a new user account in v2."
openapi: "POST /v2/users"
---

And in /v1/api-reference/users.mdx:

---
title: "Create User"
description: "Register a new user account in legacy v1."
openapi: "POST /v1/users"
deprecated: true
---

Setting deprecated: true on the legacy page adds an explicit deprecation badge in the sidebar and page header, warning developers away from building new production workflows on v1 endpoints.


4. In-Product Search Scoping and Version Filtering

One of the largest hazards of multi-version documentation is search contamination: developers searching for POST /users might retrieve an outdated v1 signature instead of the v2 standard.

Mintlify resolves this across two operational dimensions:

1. In-Product Search Filters

When multiple versions are defined under navigation.versions, Mintlify's search architecture supports version-scoped indexing. On eligible plans, a version dropdown appears within the search modal, allowing developers to filter queries strictly to the active version context.

Under the hood, Mintlify's Search API (POST /v1/search/{domain}) accepts structured filter criteria:

{
  "query": "create user",
  "pageSize": 10,
  "filter": {
    "version": "v2"
  }
}

2. Search Ranking Tuning with boost and searchable

If your team wants v2 results to dominate global search results, use page-level frontmatter controls:

---
title: "Legacy Authentication"
description: "API Key authentication for v1."
boost: 0.3
---

5. SEO Governance and Canonical URL Management

Search engines penalize documentation sites that serve duplicated or near-identical content across multiple URL routes. In an API migration, foundational pages (such as /v1/authentication vs /v2/authentication, or rate limit documentation) often share 80% identical wording.

If left unmanaged, Google and other crawlers split domain authority between parallel versions, often ranking outdated v1 pages above the official v2 platform.

Canonical URL Strategy

Mintlify automatically generates canonical tags (<link rel="canonical" href="...">) matching the page's current URL. To consolidate ranking authority onto the latest version, technical writers must apply explicit canonical overrides.

Rule 1: Consolidate Conceptual Duplicates

For general guides that do not vary drastically between versions, set the canonical URL in the v1 page's frontmatter to point directly to the v2 counterpart:

---
title: "Authentication"
description: "How to authenticate API requests."
canonical: "https://docs.example.com/v2/authentication"
deprecated: true
---

Rule 2: Keep Divergent Endpoints Self-Referential

Do not point canonical tags from /v1/api-reference/users to /v2/api-reference/users if request/response payloads differ substantially. Search engines will treat divergent content as a false canonical and drop indexation. Instead, let them remain self-referential, but apply deprecated: true.

Rule 3: Folder-Level Noindex via seo.paths

When an older version enters terminal sunset, or when testing an internal release candidate, prevent entire folder trees from indexing using seo.paths in docs.json:

{
  "seo": {
    "paths": [
      {
        "path": "v1",
        "metatags": {
          "robots": "noindex, follow"
        }
      }
    ]
  }
}

[!NOTE] Mintlify deliberately ignores the canonical key inside seo.paths. Canonical URLs must be declared either globally in seo.metatags or per-page in MDX frontmatter. Directory-level scoping via seo.paths is designed for tags like robots: noindex or custom Open Graph properties.


6. Implementation Checklist & Governance Matrix

Documentation LayerConfiguration TargetImplementation Syntax365Finds Recommended Practice
Version Selectordocs.jsonnavigation.versions[].versionUse concise major semantic tags ("v2", "v1").
Status Indicatorsdocs.jsonnavigation.versions[].tagAdd "Latest", "LTS", or "Beta" pill badges.
Default Landingdocs.jsonnavigation.versions[].defaultExplicitly flag the latest production version as true.
Schema Isolationdocs.json / MDXopenapi: "openapi/v2.json"Bind specs at the navigation group level, never globally.
Legacy DeprecationMDX frontmatterdeprecated: trueMark all retiring v1 pages to display warning banners.
Search PriorityMDX frontmatterboost: 1.2 vs boost: 0.3Lower legacy page ranking; amplify current version pages.
Duplicate Content SEOMDX frontmattercanonical: "https://..."Point conceptual v1 guides to their equivalent v2 path.
Sunset Stagingdocs.jsonseo.paths[].metatags.robotsApply "noindex, follow" to archived major versions.

7. 365Finds Institutional Evaluation

Managing multi-version developer documentation is fundamentally an information governance challenge, not merely a styling choice.

From our analysis of API developer experiences across modern documentation engines:

  1. Avoid the Multi-Repo Trap: Managing separate repositories for v1 and v2 creates an illusion of separation at the cost of duplicate continuous integration (CI) workflows, fractured search indexes, and broken cross-references. Mintlify's monorepo navigation.versions approach keeps the documentation codebase maintainable by a lean team.
  2. Enforce Frontmatter Canonical Linting: Because Mintlify does not support wildcard canonical mapping in seo.paths, teams must establish automated pre-commit checks (such as a GitHub Actions script) to verify that legacy v1 conceptual pages contain explicit canonical links pointing to v2.
  3. Commit to Clean Version Partitioning: Do not attempt to merge v1 and v2 into single tabbed pages using conditional UI components. Clear directory separation (/v1 and /v2) paired with explicit version tags builds long-term developer trust and prevents costly API integration errors.

References