API Design

Learn to design APIs that are understandable, consistent, evolvable, secure, observable, performant and difficult to misuse. Never memorize an endpoint convention without knowing what the client needs, what the contract guarantees, and how it can change without breaking anyone.

Your path through API Design

0 of 44 Foundation lessons done
0 of 94 lessons done overall
Start: What an API Contract Actually Is →

Then follow the stages in order

Each stage builds on the ones before it. Labs and simulators sit right after the lessons they exercise. Open a stage to see its lessons. Full roadmap with goals →

  1. Level 1 · Think in contracts, not endpoints0 of 18 lessons done
    1. What an API Contract Actually IsFoundation≈ 10 min
    2. Start With Requirements, Not EndpointsFoundation≈ 5 min
    3. Consumer-First DesignFoundation≈ 5 min
    4. API Granularity and the Chatty APIFoundation≈ 5 min
    5. Public vs Internal APIsFoundation≈ 5 min
    6. API Ownership and the CatalogFoundation≈ 5 min
    7. Design Principles Without CommandmentsFoundation≈ 5 min
    8. API Anti-Patterns Field GuideFoundation≈ 5 min
    9. From Domain to ResourcesFoundation≈ 10 min
    10. Resource or Action?Foundation≈ 10 min
    11. The "Everything Is CRUD" TrapFoundation≈ 10 min
    12. HTTP Methods Are PromisesFoundation≈ 10 min
    13. GET: The Promise of SafetyFoundation≈ 10 min
    14. POST: More Than CreateFoundation≈ 10 min
    15. Status Codes Clients Can Branch OnFoundation≈ 15 min
    16. Request Contracts: Required, Optional, Null and AbsentFoundation≈ 10 min
    17. Response Contracts Are Not Database RowsFoundation≈ 10 min
    18. One Vocabulary: Naming and ConsistencyFoundation≈ 10 min
  2. Level 2 · Design the failure and query surface0 of 13 lessons done
    1. The Error Model: Structure Over ApologyFoundation≈ 10 min
    2. An Error Taxonomy Clients Can Branch OnFoundation≈ 10 min
    3. Validation Errors: Feedback, Not VerdictsFoundation≈ 10 min
    4. Retryability: Telling Clients What To Do NextFoundation≈ 10 min
    5. Partial Failure: When 3 of 5 SucceedFoundation≈ 10 min
    6. Over-Fetching and Under-FetchingFoundation≈ 10 min
    7. Pagination: Choosing How Lists EndFoundation≈ 15 min
    8. Offset Pagination: Simple, Jumpable, and Lying Under WritesFoundation≈ 15 min
    9. Cursor Pagination: An Opaque Bookmark, Not a PositionFoundation≈ 15 min
    10. Filtering: An Allowlist With an Index BillFoundation≈ 10 min
    11. Sorting: Determinism or DriftFoundation≈ 10 min
    12. Search Is a Different Contract Than FilteringFoundation≈ 10 min
    13. Unbounded Collections: The Anti-Pattern With a FuseFoundation≈ 10 min
  3. Level 3 · Survive retries and concurrent writers0 of 13 lessons done
    1. PUT vs PATCHFoundation≈ 10 min
    2. DELETE: What Does Gone Mean?Foundation≈ 10 min
    3. Conditional Requests: ETags, 304 and 412Foundation≈ 10 min
    4. Idempotency: Surviving the RetryFoundation≈ 10 min
    5. Idempotency Keys: The MechanismFoundation≈ 10 min
    6. Idempotency vs DeduplicationFoundation≈ 5 min
    7. Optimistic Concurrency: Versions and If-MatchFoundation≈ 10 min
    8. The Lost Update, Step by StepFoundation≈ 10 min
    9. Consistency as a Contract ClauseFoundation≈ 10 min
    10. There Is No Transaction Across APIsFoundation≈ 10 min
    11. Retries and Timeouts as Contract GuidanceFoundation≈ 10 min
    12. Resources Have State MachinesFoundation≈ 5 min
    13. Designing State TransitionsFoundation≈ 10 min
  4. Level 4 · Choose a style with open eyes0 of 9 lessons done
    1. Which API Style Should I Use?Intermediate≈ 10 min
    2. REST as a Practical StyleIntermediate≈ 10 min
    3. The "REST Purity" Anti-PatternIntermediate≈ 5 min
    4. RPC: Operation-Oriented ContractsIntermediate≈ 5 min
    5. gRPC: Schema, Codegen and StreamsIntermediate≈ 10 min
    6. GraphQL: Client-Shaped Queries Over One SchemaIntermediate≈ 5 min
    7. What GraphQL CostsIntermediate≈ 10 min
    8. Backend for FrontendIntermediate≈ 5 min
    9. Batch APIs and Partial FailureIntermediate≈ 10 min
  5. Level 5 · Escape request/response when it stops fitting0 of 14 lessons done
    1. Long-Running Operations: 202 and the Job ResourceIntermediate≈ 15 min
    2. The Async Job PatternIntermediate≈ 10 min
    3. How the Client Learns the Job FinishedIntermediate≈ 10 min
    4. WebSocket Message ContractsIntermediate≈ 10 min
    5. Server-Sent EventsIntermediate≈ 10 min
    6. Streaming APIs: Partial Data as a ContractIntermediate≈ 10 min
    7. Slow Clients and BackpressureIntermediate≈ 10 min
    8. Webhooks: The Inverted ContractIntermediate≈ 10 min
    9. Webhook Delivery: States, Retries, RedriveIntermediate≈ 10 min
    10. Consumer-Side IdempotencyIntermediate≈ 10 min
    11. Webhook Ordering: Assume NoneIntermediate≈ 10 min
    12. The Webhook Security ContractIntermediate≈ 10 min
    13. Large Requests and Documented LimitsIntermediate≈ 10 min
    14. File Upload APIs: Authorize, Upload Directly, ConfirmIntermediate≈ 10 min
  6. Level 6 · Evolve without breaking anyone0 of 6 lessons done
    1. Versioning: What a Version Even PromisesIntermediate≈ 10 min
    2. Backward Compatibility: The Real RulesIntermediate≈ 10 min
    3. Enum Evolution: The New Value That Broke Old ClientsIntermediate≈ 15 min
    4. Removing Fields Without Removing ConsumersIntermediate≈ 10 min
    5. Deprecation as a Process, Not a LabelIntermediate≈ 10 min
    6. Consumer-Driven Evolution: Telemetry Before BreakageIntermediate≈ 10 min
  7. Level 7 · Make the contract secure, fast and observable0 of 13 lessons done
    1. Authentication in the ContractAdvanced≈ 10 min
    2. Authorization Design in the ContractAdvanced≈ 10 min
    3. Scopes: Least Privilege as Contract SurfaceAdvanced≈ 10 min
    4. API Keys: Identity for ApplicationsAdvanced≈ 10 min
    5. The Rate-Limit ContractAdvanced≈ 10 min
    6. Quotas vs Rate LimitsAdvanced≈ 10 min
    7. Caching as a Contract ClauseAdvanced≈ 10 min
    8. API Performance: The Levers You Actually OwnAdvanced≈ 10 min
    9. Payload Size: 20KB, 200KB, 5MBAdvanced≈ 10 min
    10. Compression: Cheaper Bytes, Not FewerAdvanced≈ 10 min
    11. Request IDs: The Contract's Correlation ClauseAdvanced≈ 10 min
    12. API Metrics: Rate, Errors, Duration, SizesAdvanced≈ 10 min
    13. API Logging Without LeakingAdvanced≈ 10 min
  8. Level 8 · Run an API as a product0 of 5 lessons done
    1. Schema-First vs Code-FirstAdvanced≈ 10 min
    2. OpenAPI: Describing the Contract, Not Designing ItAdvanced≈ 10 min
    3. Documentation Is Part of the ContractAdvanced≈ 10 min
    4. SDK Design: The Contract's User InterfaceAdvanced≈ 10 min
    5. Testing the Contract, Not Just the CodeAdvanced≈ 10 min
  9. Level 9 · Migrate, compose and govern at scale0 of 3 lessons done
    1. API Migration: Running the Change End to EndAdvanced≈ 10 min
    2. Composed APIs: Aggregating Other ServicesAdvanced≈ 10 min
    3. The Gateway as Policy BoundaryAdvanced≈ 10 min
Start with the consumers

What are you designing?

Public REST API

Which consumers will you never meet, and what must the contract promise them without a conversation?

The learning loop

Every lesson and lab returns to the same chain. An endpoint is not designed until you can answer every step for it.

Requirement→Consumers→Resource Model→Style→Contract→Validation→Authorization→Errors→Idempotency→Pagination→Versioning→Observability→Evolution→Trade-offs

Flagship experiences

Learn → model → design → compare → simulate → break → review → evolve → practice → interview.

Learning modules

94 lessons
API Fundamentals8

An API is a behavioral contract, not a list of endpoints. Requirements before endpoints, consumer tasks before resources, granularity, ownership — and why internal APIs still need contracts.

Resource & Capability Modeling7

From domain to resources, from resources to operations. Resource vs action, state machines with explicit transitions, backend-for-frontend, and composition — without REST dogma.

HTTP Semantics8

Methods as promises: safety, idempotency, and what retries, proxies and caches are allowed to assume. Status codes that mean something, conditional requests, and caching as part of the contract.

API Styles7

REST, RPC, gRPC and GraphQL as tools with prices, not religions. What each buys, what each costs operationally, and how consumer environment decides — never “which one is best”.

Request & Response Design7

Required vs optional vs null, response models that are not database rows, over- and under-fetching, batch endpoints, size limits, and file uploads that bypass the API for the bytes.

Error Models5

A stable error contract: machine-readable codes, a taxonomy clients can branch on, field-level validation feedback, explicit retryability, and honest partial-failure semantics.

Pagination, Filtering & Search7

Every list endpoint is a query API. Offset vs cursor under concurrent writes, stable ordering, filter allowlists, search as a different contract — and the index each promise requires.

Idempotency & Concurrency8

The network loses responses, so clients retry. Idempotency keys, dedup vs idempotency, optimistic concurrency with versions, lost-update prevention, and consistency the contract admits to.

Real-Time & Async Operations7

When request/response stops fitting: WebSocket message contracts, SSE, streaming, the async job pattern for long-running work, and how completion actually reaches the client.

Webhooks5

Your contract running against someone else’s server: delivery states, retries, duplicate events, ordering you must not assume, and the signature that makes any of it trustworthy.

API Security Boundary6

Where authentication and authorization live in the contract: token placement, resource-level permission design, scopes, API keys, rate limits and quotas as documented behavior.

Versioning & Evolution11

The longest-lived part of the contract. Additive change, enum evolution, deprecation as a process, consumer telemetry before removal, schema-first vs code-first, docs and SDKs.

Performance & Observability8

The API-shaped levers: payload size, compression, request count, caching. Request IDs, metrics without high-cardinality labels, logs that never contain tokens, and contract tests.

Not a REST tutorial

01
Contract
what the client may assume
02
Guarantees
retries, ordering, consistency
03
Evolution
change without breakage
04
Trade-offs
what every choice costs

Engineer Atlas never teaches "REST endpoints should use nouns" as a rule. It teaches what contract the client actually needs, which guarantees the API should provide, and how that contract can evolve without breaking consumers — then lets you break your own design to see whether the guarantees hold.