Checkpoint: APIs
Introduction
Ten lessons ago, an API was "some URLs that return JSON." Look at what it is now: a contract between strangers that a newcomer can guess (API Design & REST), that never returns everything at once (Pagination), that survives a double-click on Pay (Idempotency), in bytes you chose deliberately (Data Formats), that changes without breaking a single old client (Schema Evolution), that lets the client shape the response (GraphQL) or streams typed calls between your own services (gRPC & Streaming), behind one governed front door (API Gateways), that knows who's calling (AuthN vs AuthZ) — and that can even borrow permission from another company without ever seeing a password (OAuth2 & SSO).
That's not a list of features. It's a language — the complete grammar your servers use to speak to the world, and every piece of it was a decision someone made on purpose.
So this checkpoint hands you the decisions. Below is PrintPress, a photo-print marketplace that needs its entire API surface designed: a mobile app, partner integrations, internal services, payments, and a "import from Google Photos" button. Ten calls to make — one per lesson. No recall questions, no definitions. Just the thing you'd actually do at a whiteboard, with the architecture assembling itself as you commit.

See It: Ship the API
Read each brief, make the call, and watch the canvas — every decision you commit draws its piece of PrintPress and sets requests moving through it. Two things to notice while you work. First, the contrasts inside one product: partners get JSON and REST, but your own services speak protobuf over gRPC, and your own mobile app gets a GraphQL front door — the same company answers the same question differently because the context flips it. Second, wrong answers don't just score a zero — they play out. Pick offset pagination and watch the duplicate rows flash as writes land. Skip the idempotency key and watch the retry double-charge. Put the user rate-limit before authentication and watch an anonymous flood sail through, uncounted.
Grade when you're done. Every slot explains itself and names the lesson to go back to — and if you land all ten, you've earned the title.

What You Can Now Do
Walking out of this section, you can — concretely, at a whiteboard or in a design review:
- Design an endpoint a stranger can guess: plural-noun resources, the right verb with its safety/idempotency contract, and the precise status code — 201 with a Location, 204 for a silent success, 400-vs-422, 401-vs-403, and never, ever a 200 wrapping an error.
- Page any list safely: say why offsets lie under writes (positions move; values don't), reach for a cursor with a unique tie-breaker, and push back when someone asks for
total_counton every page. - Make money-moving calls retry-safe: mint an idempotency key per intent, claim it atomically, store the outcome, replay the repeat — and explain the check-then-act race that makes "just check first" wrong.
- Choose a wire format with reasons: JSON for strangers, protobuf for your own high-volume RPC, Avro where streams outlive producers — and cite the string-heavy caveat that deflates the "binary is always smaller" myth.
- Change a schema without breaking anyone: add optional-with-default as the workhorse, name which reader breaks before you ship, treat renames as delete-plus-add, and version as the last resort, not the first.
- Pick the client-facing shape: REST for strangers and CDN-cacheable reads, GraphQL as the BFF when many diverse clients need differently-shaped data — plus the N+1 and query-cost costs you're signing up for.
- Wire the inside differently from the outside: gRPC with propagated deadlines for service-to-service, streaming where the data actually flows, and the browser-gap answer for why the edge still speaks HTTP.
- Order a gateway pipeline and defend it: cheap and identity-free first, per-user limits only after authentication, and the two failure stories (silent flood, CPU-farming) for the two wrong orders.
- Explain auth end-to-end: authN then authZ, sessions when you need instant revocation, short-lived JWTs plus refresh tokens when you need lookup-free scale — and why the payload being readable isn't a bug.
- Integrate with anyone's account safely: run the OAuth dance, say which channel carries the code and which carries the tokens, demand PKCE, and catch the id_token-as-access-token bug in review.
Key Takeaways
- An API is a promise made to people you'll never meet. Every §6 decision — verbs, cursors, keys, formats, versions — exists to keep that promise cheap to make and safe to keep.
- Context flips answers. JSON and protobuf, REST and GraphQL, sessions and JWTs all won a slot in the same product. The skill isn't knowing the "best" tool — it's naming the context that picks it.
- The retry is the natural enemy of money, and the write is the natural enemy of the offset. Idempotency keys and cursors are the two guards you'll reach for weekly, forever.
- Order is design. The gateway pipeline, the deploy sequence for schema changes, the OAuth redirect dance — in each one, the sequence is where the security and correctness live.
- Identity stacks: who are you (authN) → what may you do (authZ) → what may you do on someone else's behalf (OAuth). Three questions, three mechanisms, one column of the map.
Next, the course leaves request-and-response entirely. A feed that updates itself, a server that pushes, work that happens later, services that talk through queues — §7: Real-time & Async Communication starts with the simplest possible question: what if the client just… keeps asking?