Interfaces

API design is a promise

An API is not just a route. It is a promise about names, errors, timing, compatibility, and what future teams can safely assume.

~5 minCoding
scroll
01 · the shape

Clients remember everything

Once a field ships, someone builds around it. Once an error shape leaks, someone parses it. The API becomes a contract even if nobody wrote the contract down.

curl · response shape

The useful signal is usually already there.

change looks calm

A tiny patch rarely touches only one thing. Push it and watch the review surface appear.

02 · the move

Design the boring cases too

Document pagination, idempotency, errors, retries, nullability, and versioning before the first client ships. Happy paths are the easy part.

errors.json

Stable error codes are kinder than prose scraping.

03 · the check

Treat compatibility as a feature

Add contract tests for response shapes and error codes. Breaking clients is a production incident even when your server is green.

change confidence lab
guessy
safe0
fragile: this change still depends on hope and a lucky deploy

Flip the switches and watch the story turn into a tiny operating model.

0canonical error envelope
0versioning choices: evolve or fork
0undocumented breaking fields
04 · the takeaway

Good APIs reduce future meetings

A clear API lets teams move independently because the boundary says what will stay true.

source trail