Guide

API versioning best practices for internal APIs

Last checked 2026-11-256 min read

API versioning best practices come down to one rule: version only when you must break something, and make sure every team on the old version hears about it. Most changes are additive and need no new version. When a breaking change cannot be avoided, use one versioning scheme across the company, run the old and new versions side by side, mark the old one deprecated with a sunset date, and tell the teams that call it. Inside a company that last step is the one that fails, because nobody keeps the list of who calls what. Graphwake keeps that list: consumer teams subscribe to the endpoints they call, and a breaking change or a deprecation in your OpenAPI spec reaches only those teams.

ExamplePull request #1284 · orders-api
#team-checkoutGraphwake in Slack

Breaking change in PR #1284

GET /orders/{id} · orders-api

Owned by payments-team

  • total was removed
  • currency is now required

Author: dana-k

orders-api3 breaking changes
  • checkoutSlack #team-checkout
  • mobile-appSlack #mobile-alerts
  • reportingEmail
  • searchquiet, not subscribed
In Graphwake: impact79/100High
A breaking change reaches only the three teams that subscribed to the endpoints it touches. search stays quiet. The impact score is in Graphwake, not in the message.
On this page
  1. Version only when you must break something
  2. Pick one scheme and keep it
  3. Evolve one version before you ship another
  4. Run old and new side by side, with a date
  5. The step that fails: telling the teams on the old version
  6. Where Graphwake fits
  7. A short checklist
  8. Questions

Version only when you must break something

A new version costs both sides. The provider runs two versions and fixes bugs twice; every consumer has to move. So the first practice is to avoid needing one. Adding an endpoint, an optional request field or a new response field breaks no existing client, and can ship in the version you already have.

A new version is worth its cost only for a change that can make an existing client fail:

  • Removing an endpoint or a response field.
  • Adding a required parameter or a required request field.
  • Changing a field’s type.
  • Narrowing the values a field accepts, for example a shorter enum.

The full list, with before and after examples, is in OpenAPI breaking changes.

Pick one scheme and keep it

SchemeExampleGoodWatch out
URL path/v2/ordersVisible in logs, docs and routing rulesA new version moves every endpoint, even the ones that did not change
HeaderApi-Version: 2URLs stay the same across versionsEasy to miss in a browser and in many access logs
Query parameter/orders?version=2Easy to try by handEasy to drop by accident, and some caches ignore it
DateApi-Version: 2026-11-01Each client pins the date it was built againstNeeds a clear changelog for every date

For internal APIs the scheme matters less than consistency. Pick one for the whole company, write it into your API guidelines, and put the version in the OpenAPI spec so a tool can compare two versions. A team that guesses the scheme from the last API it called will guess wrong once.

Evolve one version before you ship another

  • Add next to, do not change in place. A new field beside the old one lets callers move at their own pace. Remove the old field later, as a planned breaking change.
  • Never reuse a name with a new meaning. A total that switches from dollars to cents is the same number in the spec and a different value for every caller.
  • Ask clients to ignore fields they do not know. Then new response fields stay harmless.
  • Keep each version’s spec in the repository. Two committed specs can be compared on every pull request, so a breaking change shows up while it is still a review comment.

Run old and new side by side, with a date

When version 2 ships, version 1 keeps working until a date everyone knows. Mark it deprecated in the spec, give it a sunset date, and send the same signal at runtime: the Deprecation header (RFC 9745) says a resource is deprecated, and the Sunset header (RFC 8594) says when it is expected to stop answering.

yaml
paths:
  /v1/orders/{id}:
    get:
      deprecated: true
      x-sunset: "2027-03-31"
      description: >-
        Deprecated. Use GET /v2/orders/{id} instead.
Version 1 marked deprecated in the OpenAPI spec, with a sunset date.

The retirement itself, from naming an owner to removing the endpoint, is in the endpoint retirement checklist.

The step that fails: telling the teams on the old version

A version gives consumers time to move. It does not tell them to. A public API can lean on a changelog and an email list. Between teams in one company the harder problem is that the provider often does not know who calls version 1, so the notice goes to a channel that the right team does not read. The date passes, version 1 is switched off, and a team that never heard about it finds out in production.

What works is short and targeted: find the teams that call the old version, tell only them, in the channel they already read, with the date and what to change. How to notify consumers of API changes has a notice template.

ExampleService graph · orders-api
GET/orders/{id}2 consumer teams
Service
orders-api
Owner
payments-team

Consumers

  • checkout · 4 peopleSlack #team-checkout
  • mobile-app · 6 peopleSlack #mobile-alerts

Suggested by Discovery

  • storefront · uses a neighbouring endpointmaybe · 72
GET/orders/{id}/invoiceBlind spot

No team subscribes to this endpoint. A breaking change here reaches no subscribed team.

Who owns an endpoint, who consumes it, and where nobody is listening. A suggested team is added only when someone confirms it.
See who your next breaking change reaches.Paste a spec URL or add one CI step. 7-day free trial. Cancel before day 7 and you pay nothing.
Start free trial

Where Graphwake fits

  • Consumers keep the list

    Consumer teams subscribe to the endpoints they call, so the list of who is on the old version stays current without anyone on the API team keeping it.

  • Breaking changes reach only them

    A breaking change in the spec reaches the subscribed teams in Slack, Microsoft Teams or email, already in the pull request when the spec comes through the CI step.

  • Deprecation and sunset reminders

    When an endpoint is marked deprecated in the spec, the teams that use it hear about it, with reminders 30, 7 and 1 day before its sunset date.

  • Who still calls it

    On Pro and Enterprise, after the sunset date the owner sees which teams still call it, from optional Usage Discovery.

Each change set also gets an impact score from 0 to 100 with public rules, so a version bump that reaches six teams looks different from one that reaches none.

A short checklist

  1. Is the change additive? Ship it without a new version.
  2. Is it breaking? See whether you can add the new shape next to the old one instead.
  3. If you need a new version, use the company’s one scheme.
  4. Mark the old version deprecated, with a sunset date, in the spec and in its responses.
  5. Tell the teams that call it, with the date and the replacement.
  6. Before the sunset date, check who still calls it, and talk to those teams.
  7. Switch the old version off only when its traffic is gone.

Questions

What are API versioning best practices?

Version only for breaking changes, prefer additive changes that need no new version, use one versioning scheme across the company, run old and new versions side by side until a sunset date, and tell every team that calls the old version, with the date and what to change.

When should you version an API?

When a change can make an existing client fail: a removed endpoint or response field, a new required input, a changed type or narrowed values. New endpoints, optional fields and new response fields do not need a new version.

Which API versioning strategy is best: URL, header or query parameter?

Each works. URL versions are the easiest to see in logs and docs; header and date versions keep URLs stable; query parameters are the easiest to drop by accident. For internal APIs, using the same scheme everywhere matters more than which one you pick.

Do internal APIs need versioning?

Less often than public ones, because you can talk to every consumer. That only works if you know who they are. Many internal teams skip versions for additive changes and use a short deprecation period, with a date, for breaking ones.

How do you tell consumers about a new API version?

Send a short notice to the teams that call the old version, in the channel they read, with the sunset date and the replacement. Graphwake does this from your OpenAPI spec: consumer teams subscribe to endpoints, and breaking changes and deprecations reach only those teams.

Pick an endpoint. See who it reaches. 7-day free trial. Cancel before day 7 and you pay nothing.

Start free trial

Sources and last verified

Sources checked on 2026-11-01.