AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Configuring Multi-Version API Documentation and Deprecation Notices in Mintlify with docs.json

Tsen-Waye Goh · 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

Maintaining developer documentation across major architectural transitions is one of the highest-friction challenges in API lifecycle management. When breaking changes occur between API versions—such as transitioning from v1 to v2—engineering and DevRel teams face a common failure mode: developers inadvertently invoke new endpoints with legacy schemas, or continue building production dependencies on deprecated interfaces due to inadequate visual warnings.

Mintlify resolves this governance dilemma through its declarative configuration schema in docs.json. By pairing parallel version routing via navigation.versions with a multi-tier deprecation announcement system, documentation architects can enforce clean separation between API versions while maintaining continuous navigation clarity for historical integrators.

365Finds evaluates the mechanics of structuring multi-version API documentation in Mintlify, details the syntax for docs.json, and outlines a hardened operational pipeline for broadcasting deprecation notices.


The 365Finds Perspective: Architectural Principles for API Versioning

API versioning is not merely a backend routing concern; it is a developer trust contract. 365Finds maintains two definitive architectural positions regarding technical documentation operations:

  1. Monorepo Directory Isolation over Multi-Branch Deployments: Many legacy platforms rely on separate Git branches (e.g., a v1 branch and a main branch) to serve multiple documentation versions. 365Finds strongly advises against this practice. Branch-based doc hosting fragments search indexing, breaks cross-version anchor links, complicates pull request reviews, and impairs modern AI agent discovery (such as llms.txt and embedded chat assistants). Instead, adopt a single-branch architecture where version directories (/v1/, /v2/) exist side-by-side, coordinated declaratively inside docs.json.
  2. Three-Tier Deprecation Enforcement: A deprecation notice hidden inside release notes is functionally invisible. Deprecation governance must operate across three synchronized levels: a site-wide banner in docs.json for macroeconomic visibility, machine-readable deprecated: true flags in OpenAPI specs to mark interactive playground endpoints, and structured <Warning> MDX callouts on specific endpoint pages detailing the exact migration path and hard sunset deadline.

Directory Organization: Laying the Multi-Version Foundation

Before modifying docs.json, organize your repository filesystem into clear, version-prefixed trees. This guarantees that file slugs, relative asset references, and OpenAPI specifications remain entirely conflict-free.

A standard repository layout for dual-version API docs:

├── docs.json
├── openapi/
│   ├── v1.json
│   └── v2.json
├── v1/
│   ├── introduction.mdx
│   ├── authentication.mdx
│   └── endpoints/
│       ├── users.mdx
│       └── payments.mdx
└── v2/
    ├── introduction.mdx
    ├── authentication.mdx
    ├── migration-guide.mdx
    └── endpoints/
        ├── users.mdx
        └── payments.mdx

Under this layout, every page path in docs.json maps cleanly to its version folder, preventing accidental slug collisions and simplifying granular CI validation.


Configuring Multi-Version Navigation in docs.json

Mintlify provides the navigation.versions array to configure parallel documentation trees and generate the automated Version Switcher dropdown menu in the sidebar header.

1. Root-Level Multi-Version Navigation

When your entire documentation site splits into distinct versions, define versions directly inside the navigation object:

{
  "$schema": "https://mintlify.com/docs.json",
  "name": "Acme API Docs",
  "theme": "mint",
  "colors": {
    "primary": "#2563EB"
  },
  "navigation": {
    "versions": [
      {
        "version": "v2",
        "default": true,
        "groups": [
          {
            "group": "Overview",
            "pages": [
              "v2/introduction",
              "v2/authentication",
              "v2/migration-guide"
            ]
          },
          {
            "group": "Core Endpoints",
            "openapi": "openapi/v2.json",
            "pages": [
              "v2/endpoints/users",
              "v2/endpoints/payments"
            ]
          }
        ]
      },
      {
        "version": "v1",
        "groups": [
          {
            "group": "Overview",
            "pages": [
              "v1/introduction",
              "v1/authentication"
            ]
          },
          {
            "group": "Legacy Endpoints",
            "openapi": "openapi/v1.json",
            "pages": [
              "v1/endpoints/users",
              "v1/endpoints/payments"
            ]
          }
        ]
      }
    ]
  }
}

Configuration Syntax Breakdown

2. Versioning Within Navigation Tabs

For organizations that host product guides, tutorials, and an API reference under one roof, versioning the entire site may create unnecessary duplication. Mintlify supports placing versions inside a dedicated tab:

{
  "navigation": {
    "tabs": [
      {
        "tab": "Guides",
        "pages": [
          "guides/overview",
          "guides/quickstart",
          "guides/webhooks"
        ]
      },
      {
        "tab": "API Reference",
        "versions": [
          {
            "version": "v2",
            "default": true,
            "groups": [
              {
                "group": "V2 Reference",
                "pages": ["v2/endpoints/users"]
              }
            ]
          },
          {
            "version": "v1",
            "groups": [
              {
                "group": "V1 Reference",
                "pages": ["v1/endpoints/users"]
              }
            ]
          }
        ]
      }
    ]
  }
}

In this architecture, the Version Switcher only activates when the developer selects the "API Reference" tab, keeping general guides unified and lightweight.


Implementing the Three-Tier Deprecation Notice System

When sunsetting legacy APIs, passive documentation guarantees migration failure. Teams should implement a coordinated three-tier warning mechanism across global, machine-readable, and page-level touchpoints.

Tier 1: Global Site Banner (docs.json)

Mintlify supports a persistent, site-wide banner displayed at the top of every documentation page. Use this to broadcast pending API deprecations and sunset timelines:

{
  "banner": {
    "content": "⚠️ **API v1 Sunset Notice:** Legacy endpoints will be retired on December 31, 2026. Please consult the [v1 to v2 Migration Guide](/v2/migration-guide) to avoid service disruption.",
    "type": "warning",
    "dismissible": false
  }
}

Banner Parameters:

Tier 2: OpenAPI Machine-Readable Deprecation Badges

To alert developers exploring specific endpoints inside Mintlify's interactive API Playground, flag the deprecated operations directly within your OpenAPI specification (openapi/v1.json):

paths:
  /v1/users:
    get:
      summary: Retrieve Users (Legacy)
      deprecated: true
      description: Returns all users using page-number pagination.
      responses:
        '200':
          description: OK

When Mintlify compiles this specification, it automatically appends a visible DEPRECATED badge to the endpoint header, strikes through the method badge in the sidebar, and renders caution notices in the interactive request builder.

Tier 3: In-Page MDX Warning Callouts

On each deprecated endpoint's dedicated .mdx page, insert an explicit <Warning> component immediately below the frontmatter title:

---
title: "Retrieve Users (v1)"
openapi: "GET /v1/users"
---

<Warning>
  **Endpoint Deprecated as of Q3 2026**

  `/v1/users` is scheduled for decommission on **December 31, 2026**.
  
  * **Breaking Change**: Page-based pagination is replaced by cursor pagination.
  * **Replacement**: Use [`GET /v2/users`](/v2/endpoints/users) for all new implementations.
  * **Migration Checklist**: See the full [Pagination Migration Guide](/v2/migration-guide#pagination).
</Warning>

This ensures that developers arriving directly via search engines or deep links immediately encounter the sunset timetable and alternative endpoint links.


Architectural Comparison: Mintlify vs. Alternative Approaches

Understanding the structural trade-offs between documentation architectures is vital when standardizing API governance across engineering teams:

Evaluation DimensionMintlify (navigation.versions)Multi-Branch Git DeploymentsDocusaurus Versioning
Configuration ModelSingle declarative docs.json fileFragmented across isolated Git branchesCLI-generated snapshot folders (versioned_docs/)
Search & AI DiscoveryUnified indexing; single llms.txt and Assistant contextFragmented indexes; requires multiple search crawlersUnified or segmented local search plugins
OpenAPI Multi-Spec SupportNative schema binding per version groupRequires separate build configurations per branchRequires third-party plugins (e.g., docusaurus-plugin-openapi-docs)
Deprecation AlertingNative top banner, typed MDX callouts, OpenAPI badgesManual banner maintenance per branch buildAdmonition blocks; custom banner swizzling
Maintenance OverheadLow; single PR updates navigation, banners, and pagesHigh; backporting fixes across long-lived branchesModerate; duplicate code snapshots inflate repository size

Operational Cutover Checklist for DevRel Teams

When promoting a new API version to production, follow this disciplined sequence to prevent traffic misdirection:

  1. Verify Asset Isolation: Confirm that all new routes reside within /v2/ and that openapi/v2.json validates against OpenAPI 3.1 standards.
  2. Set Version Defaults: Update docs.json so that the v2 object specifies "default": true. Ensure v1 remains accessible via the Version Switcher dropdown.
  3. Mount the Global Deprecation Banner: Add the banner configuration to docs.json with type: "warning" and dismissible: false.
  4. Tag Deprecated OpenAPI Endpoints: Apply deprecated: true to legacy operations in openapi/v1.json.
  5. Publish the Migration Guide: Place a comprehensive migration document inside the v2 directory (v2/migration-guide.mdx) and verify all cross-version links.
  6. Preview Locally: Run npx mintlify dev to verify that the Version Switcher transitions smoothly and that the top banner renders across both version paths.

By standardizing on Mintlify's declarative versioning and multi-tier deprecation pipeline, engineering organizations safeguard production integrations while accelerating developer adoption of modern API capabilities.


References