When to Version Documentation Separately From the API Spec
Keep reference docs tied to your API spec version, but share conceptual guides across versions.

API specifications and documentation should version separately when they change for different reasons. The boundary is accuracy. Content whose accuracy depends on an API contract must stay tied to that contract, while content that explains workflows or concepts can remain shared.
Why the API spec and its surrounding documentation are different artifacts
An API spec is a machine-readable contract. Whether expressed in OpenAPI, AsyncAPI, or gRPC/Protobuf, it governs endpoints, request and response schemas, and authentication. It defines what the API does, rather than explaining everything a developer needs to accomplish with it. A reference can describe a valid request without explaining why that request belongs in a particular workflow. Those are different jobs at different moments in an integration.
Fern's documentation guide distinguishes the automated work a spec enables from the context human authors supply. Specs support SDK generation, testing, and reference publishing, while conceptual guides, tutorials, architectural decisions, migration instructions, and troubleshooting require human authorship. Neither artifact substitutes for the other completely. A schema cannot supply every explanation, and an explanation cannot replace an exact contract. Because these artifacts establish different kinds of truth, they also have different reasons to change.
What actually triggers a spec version versus what triggers a docs update
A breaking contract change calls for a new version. Removing or renaming a field, parameter, or endpoint changes what consumers can call or send. Changing a field's type, format, or allowed values can invalidate assumptions built into an integration. Making an optional parameter required has the same effect. Tightened validation, changed status code semantics, and replaced or removed authentication mechanisms also alter the agreement between the API and its consumers.
A documentation update can have no such trigger. An onboarding tutorial may need to explain a use case better without changing any endpoint. A conceptual guide may remain accurate through several spec revisions, while a migration guide must explain the relationship between versions. Deprecation explanations and changelog prose describe change without themselves changing the contract. Documentation may also need correction for consumers on an older API version even while newer-version documentation is live.
Does a backward-compatible change mean the prose can stay as it is? Not necessarily, because additive does not mean invisible. Strict consumers may reject fields they do not know, and exhaustive enum handling may fail when a new value appears. These changes may need a note in the documentation even without a spec version bump. The asymmetry is important here, since a spec bump without corresponding documentation attention can create drift, whereas a docs update without a spec change is routine maintenance.
The two failure modes: drift in one direction, version explosion in the other
Drift begins when a changed contract outpaces its explanation. Authentication schemes become misrepresented, deprecated endpoints remain visible, and breaking changes arrive without warning in the docs. The guide notes that when people do this work by hand, published content can lag behind API changes. Treating spec and docs as one artifact can still allow that lag if their synchronization is assumed without an enforced dependency.
The cost extends beyond a failed request. Developers who keep finding contradictions may stop trusting the docs and reverse-engineer endpoints from error messages. Compliance audits can fail because the documented version does not reflect production, even when the API is secure. These failures make documentation accuracy an operational concern. Trust becomes harder to recover as discrepancies accumulate.
Yet duplicating the whole doc set for every spec change creates a different failure. Much of the content in adjacent versions is identical, so a correction must be applied separately across branches. An error introduced after a branch point may affect one version, several, or all of them, depending on when the product changed. As supported versions accumulate, that work grows without a corresponding gain for readers.
Both arise from applying one versioning policy uniformly to content with different dependencies. Whether through lag or neglected copies, a developer can reach the wrong documentation, copy a stale payload field, or follow an obsolete endpoint and hit a 404. The apparent instability belongs to the API in that developer's eyes. To fix this, teams must decide how to version each content type.
How Stripe separates spec versioning, SDK versioning, and prose documentation as distinct layers
Stripe treats spec versioning, SDK versioning, and prose documentation as distinct layers. Its API uses date-based versions in the format YYYY-MM-DD and, starting with the 2024-09-30.acacia release, YYYY-MM-DD.release_name. Major named releases have breaking changes, while the monthly releases under each name are always backward-compatible. Stripe maintains backward compatibility across all versions since 2011. That history depends on an explicit compatibility mechanism.
Rather than maintaining parallel codebases, Stripe builds responses against the latest schema and applies a chain of version-downgrade modules in reverse. Each module is small and isolated, describing exactly one backward-incompatible change. A consumer pinned to an older version receives a response conforming to that version, while older documentation remains live. The response, SDK, changelog, and prose need not share a release rhythm to remain consistent for that consumer.
Twilio illustrates a different but compatible choice. Its URI versioning path, /2010-04-01/, has remained live for over a decade, with new product surfaces introduced as new top-level paths without changing that version. “v1 forever” is viable when new functionality stays additive. GitHub, meanwhile, supports each API version for at least 24 months after a newer version ships, with 2022-11-28 supported until March 10, 2028. GitHub Docs uses shared source files with version-scoped conditionals, showing that keeping older documentation accurate does not require multiplying full branches.
What to keep in lockstep and what to allow to diverge: the decision framework
The decision rule begins with a question. Is this page's accuracy determined by the endpoint contract or by the user's workflow context? If the contract determines accuracy, the content versions with the spec. If workflow context determines accuracy, the content belongs in shared documentation maintained in place. This test turns the distinction between artifacts into a rule a team can apply to an actual page.
For content that depends on the contract, lockstep means keeping it accurate for each supported spec version. Endpoint reference must reflect its HTTP methods, URL paths, parameter specifications, data types, required or optional status, and valid value ranges. Request and response schemas need the same treatment, including error codes and their meanings. Authentication documentation must be version-specific when authentication behavior differs between versions. These details define what a consumer can safely do.
Executable examples belong on that side of the boundary. Code tied to particular request syntax or response shapes must match the contract it demonstrates. A stale example is indistinguishable from a broken API to someone following it. SDK installation instructions and language-specific usage tied to a version's contract must also match that contract. The SDK and API documentation must describe the correct combination.
Shared content has a different dependency to preserve. Conceptual guides, architectural explanations, and authentication concepts can remain unversioned when their accuracy does not change with the contract. Troubleshooting guidance about integration patterns can do the same, unlike guidance about specific schema behavior. Deprecation policy and lifecycle documentation describe the product's versioning process and belong at that level. Changelogs are additive records, while migration guides are explicitly cross-version artifacts whose usefulness depends on explaining both sides of a transition.
Separate versioning does not mean exemption from review. New enum values or new required response fields in strict schemas may warrant prose notes even when no spec version is bumped. A framework that overlooks these additive changes confuses formal compatibility with consumer expectations. The conditional-content model puts the broader rule into code by keeping shared explanations in one source and showing the contract-specific differences for each version.
Enforcement: how CI gates, spec-diff tooling, and deprecation windows make the framework stick
The framework needs a reliable trigger outside the policy document. In CI, spec-diff tooling can compare each pull request's OpenAPI spec with the published one and fail the build when a breaking change lacks a new major version. The test asks whether the contract changed incompatibly. It does not answer whether every affected explanation has received attention.
Reference generation fills the part of that gap that a machine can check. Human-authored guides, tutorials, and migration content still need a separate review trigger because their dependencies extend beyond the fields a spec can publish. A spec merge that changes authentication behavior should automatically flag the authentication concepts page for review, even if that page remains shared. Review of shared content after contract changes may lead to an in-place correction.
Consumer-driven contract tests record what key clients expect and can block breaking server changes, including changes whose effects need a closer look than a formal schema comparison provides. Lifecycle communication also belongs partly in the API itself. Sunset and Deprecation headers surface retirement and deprecation state to automated consumers and tooling.
Support windows set how long that policy applies. Microsoft Graph marks a version as deprecated at least 24 months before retiring it, while Google Maps aims for about 12 months. Documentation for a deprecated version must stay accurate and available throughout its window, even after the next version appears. A release does not end the older reader's needs. Version selectors, deprecation banners, and migration links make that continuing obligation visible on the docs site.
Together, these controls distinguish deliberate divergence from unnoticed divergence. The decisive property is a reliable signal for when each kind of content needs attention.
Why AI agent consumers raise the cost of undisciplined divergence and make this framework more urgent
AI agents make the consequences of inconsistency less forgiving. A human developer may notice a renamed field and correct an integration, while an agent can encounter the mismatch in production without a person present to intervene. Agents parse responses programmatically and invoke tools at high frequency, so an uncorrected mismatch can recur quickly. Documentation retrieval creates another route to failure. A stale tutorial used as context can produce wrong API calls rather than a confused reader who pauses to investigate.
This makes documentation a form of living infrastructure. When guides, examples, and reference material feed agent workflows automatically, how they match the live contract must be clear and kept up to date. Static, siloed documentation becomes a reliability problem as well as a developer experience problem. Consumers must be able to find the right version and rely on the retrieved content to describe the API they will call. Contract-aligned reference and current shared guidance establish that precondition without forcing every explanation into the spec's release cycle.


