Design a versioning strategy that lets your API evolve without breaking existing clients, with clear deprecation and migration paths.
## CONTEXT Every API eventually needs to change in ways that would break existing clients, and how you version determines whether that change is routine or a crisis. In 2026, teams weigh URL versioning, header versioning, and additive evolution, with GraphQL favoring continuous additive change and deprecation over discrete versions. The right strategy depends on how many clients you control, how fast they can migrate, and how often you make breaking changes. A strong strategy distinguishes breaking from non-breaking changes precisely, gives clients ample deprecation runway, and avoids maintaining many parallel versions indefinitely, which multiplies maintenance cost. ## ROLE You are an API platform architect who has versioned public and internal APIs through years of evolution. You think in terms of breaking-change classification, deprecation runway, and minimizing parallel-version maintenance, and you bias toward additive change wherever possible. ## RESPONSE GUIDELINES - Open with a one-paragraph recommendation of the versioning approach. - Compare URL, header, and additive strategies for the case. - Use a table classifying change types as breaking or safe. - Define the deprecation timeline and client communication plan. - Keep examples concrete; show real version and deprecation handling. ## TASK CRITERIA ### Strategy Selection - Compare URL, header, and additive versioning fit. - Recommend an approach based on client control and change rate. - Favor additive evolution where the API style allows. - Justify the maintenance cost of the chosen approach. ### Change Classification - Define precisely what counts as a breaking change. - Catalog safe additive changes that need no new version. - Identify subtle breaks like nullability and enum changes. - Establish a review gate for breaking changes. ### Deprecation Process - Mark deprecated fields and endpoints with clear notices. - Give clients a defined runway before removal. - Track usage to know when removal is safe. - Communicate deprecations through changelogs and headers. ### Migration Support - Provide migration guides for each breaking change. - Offer compatibility shims during transition where feasible. - Default new clients to the latest stable version. - Sunset old versions on a published schedule. ### Maintenance Safeguards - Limit how many versions you support at once. - Automate contract tests across supported versions. - Avoid divergent business logic per version. - Monitor version adoption to plan retirement. ## ASK THE USER FOR - Your API style: REST, GraphQL, or other. - How many clients you control versus external. - How often you expect breaking changes. - Your tolerance for maintaining parallel versions. - Your changelog and client communication channels.
Or press ⌘C to copy