AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How Technical Documentation Teams Configure Multi-Version API Documentation and Deprecation Banners in Mintlify

Rob Barshad · 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

Enterprise APIs rarely enjoy the luxury of a clean break. When an API engineering team cuts a major release—transitioning from v1 to v2—Developer Relations (DevRel) engineers, documentation architects, and API product managers inherit an operational challenge: existing enterprise customers depend on v1 reference documentation to sustain production workloads, while prospective developers require immediate, unambiguous access to v2 specifications.

Without a deliberate documentation architecture, version transitions devolve into developer friction, support escalation, and production outages caused by developers inadvertently calling legacy endpoints.

Mintlify resolves this operational tension through native versioning primitives and structured MDX components. At 365Finds, our assessment is straightforward: enterprise API teams should always favor Mintlify's native monorepo versioning over multi-repository or multi-domain fragmentation. Managing multiple API versions within a unified configuration guarantees atomic deployments, preserves SEO equity, synchronizes semantic search indexing, and keeps AI discovery pipelines (llms.txt) intact.

This guide provides a production-grade implementation blueprint for configuring native versioning, designing isolated directory hierarchies, embedding reusable deprecation banners, and orchestrating a robust Git lifecycle in Mintlify.


1. Native Versioning Architecture in Mintlify (mint.json & docs.json)

Mintlify drives site navigation and metadata through a central configuration file at the repository root—historically mint.json, and increasingly standardized as docs.json. The platform provides first-class support for versioning, generating an interactive version switcher dropdown in the global navigation bar.

Core Configuration Models

Depending on whether your team uses the classic mint.json schema or the modern docs.json schema, versioning is declared either through root-level arrays or dedicated navigation blocks.

Model A: The Classic mint.json Schema

In mint.json, you declare an active versions array at the root level and bind navigation groups to individual versions using the version key:

{
  "$schema": "https://mintlify.com/schema.json",
  "name": "CloudScale Engine API",
  "versions": ["v2", "v1"],
  "navigation": [
    {
      "group": "Getting Started",
      "version": "v2",
      "pages": [
        "v2/getting-started/overview",
        "v2/getting-started/authentication"
      ]
    },
    {
      "group": "Core Endpoints",
      "version": "v2",
      "pages": [
        "v2/api-reference/users",
        "v2/api-reference/clusters"
      ]
    },
    {
      "group": "Getting Started",
      "version": "v1",
      "pages": [
        "v1/getting-started/overview",
        "v1/getting-started/authentication"
      ]
    },
    {
      "group": "Core Endpoints",
      "version": "v1",
      "pages": [
        "v1/api-reference/users",
        "v1/api-reference/servers"
      ]
    }
  ]
}

Model B: The Unified docs.json Schema

In the modern docs.json specification, Mintlify encapsulates version hierarchies directly inside navigation.versions, allowing granular metadata tags such as "Latest" or "Deprecated":

{
  "$schema": "https://mintlify.com/docs.json",
  "name": "CloudScale Engine API",
  "navigation": {
    "versions": [
      {
        "version": "v2",
        "tag": "Latest",
        "default": true,
        "groups": [
          {
            "group": "Overview",
            "pages": [
              "v2/overview",
              "v2/migration-from-v1"
            ]
          },
          {
            "group": "Endpoints",
            "pages": [
              "v2/endpoints/users",
              "v2/endpoints/clusters"
            ]
          }
        ]
      },
      {
        "version": "v1",
        "tag": "Deprecated",
        "groups": [
          {
            "group": "Overview",
            "pages": [
              "v1/overview"
            ]
          },
          {
            "group": "Endpoints",
            "pages": [
              "v1/endpoints/users",
              "v1/endpoints/servers"
            ]
          }
        ]
      }
    ]
  }
}

The Version Switcher Dropdown

When Mintlify detects multiple entries in the versions array:

  1. It automatically mounts a Version Switcher UI element into the sidebar header.
  2. It sets the first version in the array (or the item marked "default": true) as the default destination when visitors hit the root domain.
  3. It maps each version's sidebar independently, ensuring that deprecated endpoints (such as v1/endpoints/servers) vanish from the navigation when a user browses v2, eliminating accidental reference cross-contamination.

2. Monorepo File System Layout

A frequent structural misstep is attempting to split API versions across divergent Git branches or disconnected repositories. Mintlify compiles from a single Git branch per production deployment. Therefore, multi-version architectures must reside within a unified folder hierarchy on your default branch (typically main).

├── docs.json                      # Global site configuration & version manifest
├── openapi/
│   ├── v1.json                    # Full OpenAPI 3.1 specification for v1
│   └── v2.json                    # Full OpenAPI 3.1 specification for v2
├── snippets/
│   ├── v1-deprecation-banner.mdx  # Single source of truth for v1 warnings
│   └── rate-limits.mdx            # Shared rate limit component across versions
├── v1/
│   ├── overview.mdx               # v1 Landing documentation
│   └── endpoints/
│       ├── users.mdx              # OpenAPI playground referencing v1.json
│       └── servers.mdx            # Legacy server API
└── v2/
    ├── overview.mdx               # v2 Landing documentation
    ├── migration-from-v1.mdx      # Step-by-step breaking changes guide
    └── endpoints/
        ├── users.mdx              # OpenAPI playground referencing v2.json
        └── clusters.mdx           # Modern clusters API

Decoupling OpenAPI Specifications

For teams generating API reference pages from OpenAPI specs, keep the specification files strictly partitioned (openapi/v1.json vs openapi/v2.json). In your endpoint MDX files, reference the corresponding spec:

---
title: "List Clusters"
api: "GET /v2/clusters"
openapi: "openapi/v2.json GET /clusters"
---

This ensures that the interactive "Send Request" playground in Mintlify executes against the correct base URLs and validates payload schemas specific to that version.


3. Deprecation Banners: Architectural Tiers

Deprecating an API version requires deliberate signaling across three distinct tiers: global announcements, page-level visual alerts, and search/SEO suppression.

┌────────────────────────────────────────────────────────┐
│ 1. Site-Wide Global Banner (docs.json)                 │
│ "⚠️ API v1 is deprecated. Sunset: Dec 31, 2026."       │
└────────────────────────────────────────────────────────┘
                           │
                           ▼
┌────────────────────────────────────────────────────────┐
│ 2. Page-Level MDX Snippet Banner (<Warning>)           │
│ Reusable Callout on every legacy endpoint page         │
└────────────────────────────────────────────────────────┘
                           │
                           ▼
┌────────────────────────────────────────────────────────┐
│ 3. Metadata & Search Suppression (Frontmatter)         │
│ deprecated: true | boost: 0.25                         │
└────────────────────────────────────────────────────────┘

Tier 1: Global Announcement Banner in docs.json

For broad notifications visible across all documentation pages (or targeted to legacy sections), configure the banner object in docs.json:

{
  "banner": {
    "content": "⚠️ **API v1 is deprecated** and will enter End-of-Life on December 31, 2026. Please read the [v1 to v2 Migration Guide](/v2/migration-from-v1).",
    "type": "warning",
    "dismissible": true
  }
}

Tier 2: Reusable Page-Level Deprecation Banners via Snippets

Copying and pasting deprecation notices across dozens of MDX endpoint files introduces severe maintenance debt. When a sunset timeline changes, documentation teams risk leaving stale dates scattered across endpoints.

Mintlify resolves this through the /snippets/ engine. Pages stored in /snippets/ do not render as standalone URLs; instead, they serve as importable MDX components.

Step 1: Create the Shared Snippet

Save this as snippets/v1-deprecation-banner.mdx:

<Warning>
  **This endpoint belongs to API v1 (Deprecated).**
  
  Active support for v1 terminates on **December 31, 2026**. This endpoint will not receive functional enhancements or non-critical security patches.
  
  * **Replacement:** Migrate to the corresponding [v2 API endpoint](/v2/overview).
  * **Guide:** Follow our [v1 to v2 Migration Checklist](/v2/migration-from-v1).
  * **Assistance:** Reach out to [DevRel Support](mailto:api-support@example.com).
</Warning>

Step 2: Import the Snippet into Legacy Endpoint Pages

In every v1 endpoint MDX file, import and mount the snippet directly below the frontmatter:

---
title: "Get Server Details"
api: "GET /v1/servers/{server_id}"
deprecated: true
boost: 0.25
---

import V1DeprecationBanner from '/snippets/v1-deprecation-banner.mdx';

<V1DeprecationBanner />

## Endpoint Description

Retrieves configuration and runtime status for a legacy dedicated server instance.

If the deprecation policy shifts, your team updates snippets/v1-deprecation-banner.mdx once, instantly propagating changes across every v1 page.

Tier 3: Metadata Badging and Search Deprioritization

In addition to visual banners, legacy pages must communicate their status to search indexing engines, the local Mintlify search bar, and AI discovery agents:

  1. deprecated: true: Injects an explicit red or amber "DEPRECATED" pill badge adjacent to the page heading and within the sidebar tree.
  2. boost: 0.25: By default, search engines rank documents equally based on keyword frequency. Adding a fractional boost value (between 0.1 and 0.5) downranks legacy endpoints in Mintlify's full-text and semantic search. When developers query "create user", Mintlify's search algorithm prioritizes the v2/endpoints/users page over v1/endpoints/users.
  3. Parameter-Level Deprecation: If individual fields inside an otherwise active endpoint are being retired, mark them natively using the deprecated boolean attribute on Mintlify's <ParamField> and <ResponseField> components:
<ParamField path="server_rack_id" type="string" deprecated>
  Identifier for the hardware rack. Deprecated in favor of virtual zone routing.
</ParamField>

4. Git Branching Strategy & Lifecycle Management

Managing multi-version documentation requires aligning your technical writing cadence with core software engineering release pipelines.

feature/v2-api-migration ────► [PR Preview Validation] ───► Merge into 'main'
                                                                 │
                                                                 ▼
                                                  Mintlify Production Deployment
                                                  • v2 = default ("Latest")
                                                  • v1 = tag ("Deprecated")

Single-Branch Production Architecture

Because Mintlify attaches each production deployment to a specific Git branch (the default branch, usually main), technical writing teams should avoid creating long-lived release-v1 and release-v2 branches in Git. Doing so fragments search indices, disrupts the unified version switcher, and requires separate hosting plans.

Instead, execute lifecycle transitions through pull request (PR) branches targeting main:

Version Lifecycle StageDirectory LocationVersion Tag in docs.jsonSearch BoostDeprecation Banner Status
Alpha / Beta/v2/"Beta"0.75Dismissible Info Banner: Preview release
Active / GA/v2/"Latest" (default: true)1.0None
Maintenance / Deprecated/v1/"Deprecated"0.25Persistent Warning Banner via Snippet
Sunset / End-of-Life (EOL)Archive / DeletedRemoved from Switcher0.0 (Redirected)Replaced with 308 Permanent Redirects

Pull Request Preview Validation

When authoring a new version:

  1. Cut a dedicated feature branch: feature/v2-migration.
  2. Populate the /v2/ folder, OpenAPI specifications, and the migration guide.
  3. Update docs.json to include "v2" alongside "v1".
  4. Open a GitHub pull request. Mintlify's GitHub integration automatically deploys a PR Preview environment.
  5. DevRel engineers and API architects test the interactive Version Switcher, verify that v1 links remain stable, and validate that code sample playgrounds execute expected requests.
  6. Upon merging to main, Mintlify automatically performs an atomic release to production.

5. Post-Sunset Strategy: Link Preservation and 308 Redirects

When an API version reaches complete End-of-Life (EOL), maintaining thousands of stale lines in your repository becomes unmanageable. However, deleting /v1/ outright breaks external client integrations, bookmarked documentation, and external developer blog tutorials.

Before removing the /v1/ directory from Git, configure permanent redirects in docs.json:

{
  "name": "CloudScale Engine API",
  "redirects": [
    {
      "source": "/v1/api-reference/servers",
      "destination": "/v2/endpoints/clusters"
    },
    {
      "source": "/v1/:slug*",
      "destination": "/v2/:slug*"
    }
  ]
}

6. The 365Finds Institutional Evaluation

365Finds recommends Mintlify's native versioning framework for fast-iterating API platforms with specific architectural caveats:


References