Prompt

How do I document multiple versions of the same API?

Technology / Documentation tools1 observationLast seen Oct 4, 2026

Latest observation

Oct 4, 2026OpenAI APIWeb search: off

To document multiple versions of the same API, treat each version as a distinct contract while keeping the shared parts reusable.

Recommended approach

1. Document each version separately

Create a separate section, page, or OpenAPI file for each version, for example:

  • /docs/v1
  • /docs/v2

or

  • openapi-v1.yaml
  • openapi-v2.yaml

This makes it clear which endpoints, request/response shapes, and behaviors apply to which version.

2. Highlight what changed

For each version, document:

  • added endpoints
  • removed endpoints
  • changed fields
  • changed authentication or error behavior
  • deprecated features

A short “What’s new / changed” section is very helpful.

3. Keep common parts shared

If you use OpenAPI or similar tooling, reuse common components where possible:

  • schemas
  • error models
  • auth definitions
  • pagination formats

Only version the parts that actually differ.

4. Label versions clearly

Make versioning obvious in:

  • the URL path: /v1/orders
  • a header: API-Version: 2
  • the docs title: Orders API v2

Also note the supported and deprecated versions.

5. Include migration guidance

If v1 and v2 coexist, add a migration guide:

  • old field → new field
  • old endpoint → new endpoint
  • behavioral changes
  • timeline for deprecation

6. Make the docs easy to compare

A side-by-side or changelog-style table works well:

Featurev1v2
customerNamestringsplit into firstName and lastName
/orders/{id}yesyes
/paymentsnoyes

If you use OpenAPI

Common patterns are:

  • one spec per version
  • one spec with versioned paths and tags
  • separate docs grouped by version in your portal

Example:

  • openapi-v1.yaml
  • openapi-v2.yaml

Good practice

Avoid mixing incompatible versions into a single endpoint description unless the differences are minor. If the behavior or schema changes significantly, document them as separate versions.

If you want, I can also show:

  • a sample OpenAPI setup for v1/v2
  • a documentation structure template
  • how to do this in Swagger UI, Redoc, or GitBook

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.