API Versioning Strategy
Design and implement an API versioning strategy for backward compatibility
Design an API versioning strategy for: **API type:** [TYPE — e.g., "REST API with 50+ endpoints"] **Consumers:** [CONSUMERS — e.g., "mobile app, web app, third-party integrations"] **Change frequency:** [FREQUENCY — e.g., "breaking changes every 3-6 months"] Compare and recommend between: 1. **URL versioning** (/v1/users, /v2/users) 2. **Header versioning** (Accept: application/vnd.api+json;version=2) 3. **Query parameter** (?version=2) Then generate: 1. **Version routing** — middleware that routes to correct handler version 2. **Deprecation policy** — sunset headers, deprecation timeline, migration guides 3. **Backward compatibility** — additive changes that don't need a new version 4. **Version negotiation** — how clients specify preferred version 5. **Documentation** — OpenAPI spec with multiple version support 6. **Migration tooling** — automated client-side migration helpers Include the routing middleware and deprecation header implementation.
How to Use This Prompt
- 1Copy the prompt template above
- 2Paste into Claude, ChatGPT, or Cursor
- 3Replace [bracketed placeholders] with your specific project details
- 4Iterate on the AI output to refine and customize the results
More API Design Prompts
Related api design templates from the vault
Pagination Design Pattern Chooser
Use this prompt to pagination design pattern chooser with AI assistance
API Rate Limiting with Token Bucket and Quotas
Design and implement a multi-tier rate limiting system with token bucket algorithm, per-user quotas, and clear error responses
REST API Naming Convention Guide
Use this prompt to rest api naming convention guide with AI assistance
Rate Limiter with Sliding Window
PROImplement a production-grade rate limiter with sliding window algorithm
You Might Also Like
Prompts from other categories that share similar tags
REST API Endpoint Generator
Generate a complete CRUD API endpoint with validation and error handling
Request Validation Middleware
Use this prompt to request validation middleware with AI assistance
Tenant-Aware Middleware Chain
Use this prompt to tenant-aware middleware chain with AI assistance
Temporal Table Implementation
Use this prompt to temporal table implementation with AI assistance
Keep Exploring the Vault