Designing APIs That Don't Need a Rewrite in a Year
On This Page
We've inherited enough poorly-aging APIs to notice a pattern: it's rarely a single catastrophic decision that forces a rewrite, but a handful of shortcuts made under early deadline pressure that compound over time.
Version from day one
Adding versioning after your first breaking change is far more painful than building it in from the start. Even a simple /v1/ prefix gives you room to evolve without breaking existing consumers.
Design around resources, not endpoints for specific screens
APIs built to match a specific UI screen tend to require new endpoints for every new screen. Resource-oriented design supports more use cases without proliferating endpoints.
- Model resources and relationships, not front-end screens
- Support filtering, sorting and pagination consistently everywhere
- Return consistent error shapes across every endpoint
Document as you build, not after
APIs without current documentation accumulate undocumented behavior that becomes a de facto contract nobody agreed to. Tools like OpenAPI make this cheap enough to skip only through habit, not necessity.
Frequently Asked Questions
REST remains simpler to build, cache and reason about for most applications; GraphQL earns its complexity when front ends need flexible, nested data fetching across many resource types.
Enough to agree on resource models and versioning strategy - this doesn't need to be exhaustive, just enough to avoid the most common early mistakes.
Related articles
When to Build a Custom Web App vs Buy Software
Custom software isn't always the right call. Here's the framework we walk clients through before recommending a build.
Read articleA Website Performance Checklist That Actually Works
Skip the generic advice - here's the specific, ordered checklist we run on every performance audit.
Read articleComments
Glad it was useful, Jamie - happy to go deeper on that if you want to book a call.
Ready to put this into practice?
Book a free consultation and we'll help you apply it to your project.
Get Free Consultation
Really useful breakdown - the point about version from day one matches exactly what we ran into last quarter.