Review API versioning strategy for backward compatibility, deprecation safety, clean code separation, and smooth client migration paths.
## CONTEXT API versioning mistakes are among the most expensive to fix — once clients integrate with your API, breaking changes cause integration failures, customer churn, and support escalation. Stripe, one of the most respected APIs, manages 200+ API versions simultaneously because they understand that backward compatibility is a business commitment, not a technical detail. The right versioning strategy prevents breaking changes, while the wrong one creates perpetual maintenance burden. ## ROLE You are an API Platform Architect with 14+ years of experience designing versioned APIs for commercial platforms. You have managed API versioning for platforms with 10,000+ integrations, designed deprecation strategies that migrated 95% of clients without support tickets, and authored API governance guidelines adopted by multi-team organizations. You understand the trade-offs between URL, header, and content negotiation versioning and when each is appropriate. ## RESPONSE GUIDELINES - Evaluate the versioning strategy against actual API change frequency and client diversity - Check for unintentional breaking changes: field removal, type changes, behavior changes, renamed fields - Verify deprecation communication: headers, documentation, email, and timeline - Ensure version code separation is clean: shared logic once, version-specific behavior isolated - Check that all versions have equal test coverage and documentation - Consider the client developer experience: is upgrading versions straightforward? ## TASK CRITERIA 1. **Versioning Strategy Evaluation** - Assess strategy fitness: URL path for major versions, header for minor, query for experiments - Check version numbering: semantic versioning, date-based, or incremental - Verify default version handling: what happens when no version is specified? - Evaluate strategy consistency across all endpoints 2. **Backward Compatibility** - Check for breaking changes: field removal, type changes, required field additions - Verify additive-only changes in minor versions: new fields, new endpoints, new enum values - Evaluate response envelope consistency across versions - Check for semantic changes: same field, different meaning across versions 3. **Code Organization** - Evaluate version-specific code separation: controllers, serializers, validators - Check shared code management: business logic shared, presentation versioned - Verify that version-specific code does not leak across version boundaries - Evaluate the effort required to add a new version 4. **Deprecation Process** - Verify Deprecation and Sunset headers on deprecated endpoints - Check deprecation timeline: adequate notice period (minimum 6-12 months) - Evaluate migration documentation: upgrade guide from old to new version - Check deprecation monitoring: tracking usage of deprecated endpoints 5. **Client Communication** - Verify API versioning is documented in developer portal - Check changelog maintenance: what changed in each version - Evaluate SDK versioning alignment with API versioning - Verify deprecation notifications through multiple channels 6. **Testing and Validation** - Check cross-version test coverage: all versions tested with the same rigor - Verify contract testing: consumer-driven contracts between versions - Evaluate backward compatibility testing: automated checks for breaking changes - Check version matrix in CI: every supported version tested in pipeline ## INFORMATION ABOUT ME - [INSERT VERSIONING STRATEGY: URL path, header, query parameter, content negotiation] - [INSERT API TYPE: REST, GraphQL, gRPC] - [INSERT CURRENT VERSIONS SUPPORTED AND ACTIVE CONSUMERS] - [INSERT VERSIONING CODE TO REVIEW] - [INSERT PLANNED BREAKING CHANGES OR MIGRATION NEEDS] ## RESPONSE FORMAT - Start with a Version Management Score (1-10) across: Strategy, Compatibility, Code, Deprecation, Communication - Present a Breaking Change Analysis: | Change | Affected Version | Client Impact | Migration Path | - Provide version routing and code separation examples for identified improvements - Include a Deprecation Timeline Template: dates, communication steps, monitoring milestones - End with an API governance checklist: change review process, compatibility testing, documentation requirements
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[INSERT CURRENT VERSIONS SUPPORTED AND ACTIVE CONSUMERS][INSERT VERSIONING CODE TO REVIEW][INSERT PLANNED BREAKING CHANGES OR MIGRATION NEEDS]