API design mistakes
we keep seeing in audits
After forty codebase audits, the same API mistakes keep showing up. Here are the five that cost the most to fix later.
Mistakes are cheaper than you think, until they are not
API design errors rarely explode on day one. They compound quietly as other systems start depending on the awkward choices, and by the time the pain is real, the API has consumers who cannot all be updated at once.
These are the five we flag in every audit report because they are common, expensive and avoidable at design time.
The recurring five
First: verbs in URLs. /getUser and /deleteOrder are RPC wearing a REST costume; the day someone adds caching or a gateway, the mismatch bites. Second: leaking internal IDs into public contracts, so a database migration becomes a breaking change for every consumer.
Third: pagination as an afterthought. An endpoint returning 'all matching records' works beautifully until record ten thousand, then it works beautifully never again. Fourth: errors that return HTTP 200 with a success flag inside, breaking every monitoring tool that trusts status codes. Fifth: versioning bolted on later, usually as /v2/ paths that freeze the old bugs in place forever because legacy clients never migrate.
An API is a contract. Every shortcut you take becomes a clause someone else has to live with.
None of these are exotic. All five were in the last three audits we ran, in different stacks, on different continents.
What good looks like
The audits that pass cleanly share the same habits:
- Nouns and resources in URLs, behaviour in the HTTP method
- Pagination and filtering from day one, even on small collections
- Errors in RFC 9457 problem format, status code honest
- A deprecation policy written down before the first consumer exists
None of this is harder than doing it wrong. It is just decided earlier, when changing your mind is still free.
If you inherited one of these
Do not rewrite it in place. Wrap it: put a thin adapter layer in front, fix the contract at the boundary, and migrate consumers gradually. Rewrites of live APIs have a failure rate that makes technical debt look friendly.
This is routine work for our API and integrations service, including the unlovely cases like SOAP endpoints and vendors who answer email monthly.
Rachel reviews every API design that leaves the building. The list below is why she is not invited to some vendor calls anymore.
Inheriting an API you did not design?
We map, wrap and migrate legacy integrations without stopping the traffic.