Web development
API design basics for small teams
You do not need a perfect architecture. You need an API that is predictable and hard to misuse.
Abdus Samad · · 5 min read
A small team is better served by an API that is boring and consistent than one that is clever. A few rules go a long way.
- Name resources as nouns and keep the naming consistent.
- Use the right HTTP methods and status codes.
- Return errors in one predictable shape, with a useful message.
- Validate every input on the server, always.
- Version from the start, even if you only ever have v1.
- Paginate list endpoints before you need to.
- Write down what each endpoint does, even briefly.
Predictable beats clever.