Skip to content

Versions and lifecycle

How-to guideThe steps for one task.

An API version is an API of its own, in a family. orders is v1 of the family orders; New version on its Versions tab creates orders-v2 as a copy in the draft, with the same operations, policies and shared flows, in the created state until you publish it.

Where the new version is served

Choice Base path Selection
Own base path (default) /orders/v2 (the version segment replaced or appended) By path
Same base path, header-selected /orders By a request header, for example Api-Version: v2; calls without it reach the default version

The router prefers the operation with the extra header condition, so the default version keeps serving everything else. The cost is about 20 ns on such paths.

States

State Served Callers see
Created No Nothing yet; the version exists in design
Published Yes Normal answers
Deprecated Yes Deprecation (since when), Sunset (when it will be retired) and Link: <successor>; rel="successor-version" on every answer
Retired No 410 APX-PL-0024 with the same headers, before any other policy

Each move can deploy now, creating a new revision of that API only. Moves back are allowed except from retired, which is final.

Deprecating well

  1. Publish the successor and make sure it is deployed.
  2. Deprecate the old version naming the successor, a sunset date and a note for callers.
  3. Watch who still calls on the Versions tab: the applications calling the old version with their last call, from the analytics rollups.
  4. When the list is empty, or the sunset date has passed, retire it.

A deprecated version takes no new product subscriptions; subscriptions made after the deprecation cover newer versions only.

In YAML

apiVersion: apinx/v1
kind: API
name: orders
family: orders
version: v1
lifecycle:
  state: deprecated
  since: 2026-09-25T00:00:00Z
  sunset: 2027-01-31T00:00:00Z
  successor: orders-v2
  note: Move to v2; the response shape is unchanged.

Version and lifecycle fields are changed through their own operations in the console and the Admin API, never by editing an API's settings, so a mistaken edit cannot retire a version.