APIs & Integration
Every modern product is a set of systems talking to each other: a browser calling a backend, a mobile app syncing state, a payment provider calling back with a webhook, a microservice asking another for data. The API is the contract in each of those conversations, and contracts are expensive to change once other people depend on them.
This hub covers the whole lifecycle of an API — choosing a style, designing the contract, documenting and versioning it, putting a gateway in front of it, and making calls safe to retry. Server-side implementation details (frameworks, ORMs) live in Backend Development; asynchronous event pipelines live in Messaging & Event Streaming.
TL;DR
- Pick the style for the consumer. REST for public and resource-shaped APIs, GraphQL for flexible client-driven reads, gRPC for internal service-to-service calls, tRPC for full-stack TypeScript.
- Design the contract first, then implement it. A good contract outlives any implementation.
- Treat versioning as a promise. Know what counts as a breaking change before you ship v1.
- Make writes idempotent so clients can retry without double-charging anyone.
- Protect the edge with a gateway, authentication, and rate limits.
- Document with runnable examples. An API nobody can figure out might as well not exist.
Choosing an API Style
Still undecided between the two most common options? Read REST vs GraphQL.
Featured Topics
Design & Contracts
- API Design Best Practices — Consistent, evolvable, pleasant-to-use contracts
- API Architecture Patterns — Choosing styles and structuring API layers
- REST API Design — Resources, HTTP semantics, status codes, pagination
- GraphQL — Schema design, resolvers, and production performance
- GraphQL Federation — One graph composed from many services
- gRPC — Protocol Buffers, code generation, and streaming RPC
- tRPC — End-to-end type safety without a schema language
- REST vs GraphQL — A head-to-head comparison
Real-Time & Event Delivery
- WebSockets — Bidirectional real-time communication at scale
- Server-Sent Events — Simple server-to-browser streaming over HTTP
- Webhooks — Signed, retried HTTP callbacks between systems
Operating APIs
- API Gateway — Routing, auth, and observability at the edge
- API Versioning — Evolving without breaking clients
- API Documentation — OpenAPI, examples, and interactive references
- Rate Limiting — Algorithms and enforcement points
- Idempotency — Idempotency keys and safe retries
The Request Path
Each hop has a job. The gateway handles cross-cutting concerns once so every service doesn't reimplement them. The service owns validation and business rules. Idempotency checks sit right before side effects.
Common Mistakes
🚫 Leaking your database schema as your API — Tables change; contracts shouldn't have to. Design resources around consumer needs.
🚫 No versioning plan — Adding a required field or renaming one breaks every client. Decide your policy before v1.
🚫 Non-idempotent POSTs on flaky networks — A retry after a timeout creates a duplicate order. Accept an idempotency key.
🚫 Unsigned webhooks — Anyone who finds the URL can forge events. Verify HMAC signatures and timestamps.
🚫 Errors as 200 OK — Use status codes consistently and return a structured error body.
Learning Path
Beginner
Build a small REST API with correct status codes and pagination. Document it with OpenAPI.
Intermediate
Add authentication, rate limiting, and versioning. Build a GraphQL endpoint and solve its N+1 problem. Receive and verify a webhook.
Advanced
Run a gateway in front of several services, design idempotent payment-style flows, and compose a federated graph.
Related Topics
- Backend Development — Frameworks that implement these APIs
- Messaging & Event Streaming — Asynchronous alternatives to request/response
- API Security — Protecting endpoints from abuse
- API Testing — Contract and integration tests for APIs