API versioning identifies states of an interface contract as consumers see it. It is not the same as versioning implementation code: a security fix or internal restructuring can change the implementation without changing the API version. Decide on a scheme and how consumers will identify a version before the first breaking change, so they know what to expect. section 15.4.1 section 15.4.5
A banking API evolves
Suppose version 1.0 offers account operations. Adding a transaction-listing operation is backward compatible, so the API becomes 1.1; adding merchant details to its response makes it 1.2. Replacing /accounts/{accountNumber} with /accounts/{IBAN} breaks existing requests and calls for a major version change to 2.0. Removing a cards list that account responses always included is another breaking change. section 15.4.2
Choose an identifier that helps consumers interpret releases:
- Semantic API versions use MAJOR.MINOR: increment MAJOR for breaking changes and MINOR for backward-compatible changes. This treatment leaves out PATCH because implementation-only bug fixes do not change the API contract. section 15.4.2
- Date-based versions use a deployment date, such as YYYY-MM-DD or YYYY-MM. They show which release is newer but not what changed; consumers must consult documentation. Consider them for frequent or regular releases. section 15.4.2
An identifier is only part of a versioning policy. Set out when versions change, how breaking changes are handled, how many older versions remain supported, and for how long. The scheme also needs a consumer-facing representation: a path segment such as /v1 is one option. A team or organization will likely use a shared policy rather than decide independently for every API. section 15.1.2 section 15.4.5
Before publishing a breaking version, list the modifications and ask who uses the affected behavior, whether the benefit justifies migration, and whether both versions can be exposed. Parallel versions can give consumers time to update, but separate instances may be costly or incompatible with database changes. A single instance can adapt older requests and responses, although missing data or changed behavior may make some conversions impossible. Record the changes and update the API description and version number. section 15.5 section 15.5.3 section 15.1.3


























