0%
API Design Interviews: REST, gRPC, GraphQL, Pagination, Idempotency, Versioning and Webhooks
Core Decisions
The API Design Round
An API design round asks you to define the contract between a service and the programs that call it. The prompt is short: design the API for a ride sharing app, design a public payments API, design the interface for a file storage service, design the API a mobile client uses to book a table. You have roughly forty five minutes and a shared document or whiteboard. At the end, the interviewer wants to see a set of resources, a list of operations with their requests and responses, and a clear story for what happens when things go wrong.
The round is narrower than a full system design interview but deeper in one place. You are not expected to choose databases or shard anything. You are expected to think very carefully about the boundary: what a caller can ask for, what they get back, what each status means, and how the contract will survive the next three years of product changes. The people who run these rounds have usually been burned by a bad public API. They know that a database can be migrated in a quarter, but a published endpoint that thousands of clients depend on can live for a decade.
Two formats you will meet
The API design round appears in two shapes. The first is a standalone round, sometimes called API design, interface design or product architecture. Companies that sell an API as their product, such as payments, communications or developer platforms, use it heavily, as do teams that own large internal platforms. In a standalone round the contract is the whole answer. You will be asked to go deep on resource names, field types, pagination, idempotency, errors, versioning and auth.
The second shape is the API step inside a regular system design interview. There, after scoping the problem, you spend five to eight minutes writing the main operations before moving to storage and scale. The expectations are lighter: a handful of endpoints with sensible names, inputs and outputs, and maybe one sentence on pagination or idempotency where it matters. Everything this course teaches still applies, but compressed.
It is worth asking at the start which format you are in. A quick question such as should I focus on the external contract in depth, or treat the API as one part of a wider design, takes five seconds and tells you how to spend the next forty minutes. Interviewers almost always answer it directly.
What you produce by the end
A strong standalone answer leaves a document that another engineer could implement from. It usually contains a short list of consumers and use cases, a resource model with identifiers and relationships, the chosen style with a one line reason, a table of endpoints, example request and response bodies for the two or three most important calls, and short notes on errors, pagination, idempotency, authentication, rate limits and versioning. Here is the shape of one endpoint written the way interviewers like to see it:
The value of writing the endpoint this way is that it shows the method, the path, the version, the headers that carry behaviour and the exact status code, all in five lines. Interviewers can then point at any piece of it and ask a follow up question, which is exactly what you want.
How it differs from a coding or system design round
In a coding round there is a correct output and tests decide. In a system design round the main risk is a design that cannot scale or that loses data. In an API round the main risk is a contract that is confusing, inconsistent, unsafe to retry or impossible to change without breaking callers. Those are quieter failures. Nothing crashes on the whiteboard. The interviewer instead asks questions like what does a client do when this call times out, or how would you add a second currency next year, and watches whether your contract has an answer.
That difference shapes the way you should talk. In system design you often reason about numbers. In API design you reason about callers: who they are, what they already know, what they will get wrong, and what they can never be asked to change. A sentence such as a partner integrating this will retry on timeout, so creating a charge must be safe to repeat, is the kind of reasoning that earns credit.
Who interviews you and what they have seen
API rounds are often run by engineers who own a public or widely used internal API. They have handled support tickets caused by an ambiguous field, migrated thousands of clients off a broken version and argued about whether a status should be 409 or 422. They are not looking for a perfect design. They are looking for evidence that you would avoid the mistakes that cost them months. When an interviewer asks a narrow question, such as why is amount a string here, it usually comes from one of those scars, and a thoughtful answer matters more than any single choice.
The prompts you are likely to see
Most prompts fall into a few families. Commerce prompts ask for orders, carts, payments, refunds or subscriptions. Booking prompts ask for availability, holds and reservations for tables, rooms, rides or appointments. Content prompts ask for posts, comments, feeds, uploads and sharing. Platform prompts ask for something developers integrate with directly: a messaging API, a notifications API, a feature flag service or a URL shortener. Each family stresses a different part of the contract. Commerce stresses idempotency and money representation, booking stresses concurrency and expiry, content stresses pagination and permissions, and platform prompts stress versioning, auth and rate limits. The last three lessons of this course work through one prompt from three of these families end to end.
What this course covers
The course follows the order of the framework introduced in this lesson. The next lesson teaches resource modeling: nouns, sub resources, identifiers and URLs. Then come the core decisions that every API faces: the choice between REST, gRPC and GraphQL, pagination and filtering, idempotency and retries, errors and validation, versioning and evolution, auth and rate limits, and webhooks and asynchronous work. The final three lessons are full walkthroughs of a payments API, a file storage API and a booking API, using the framework from start to finish so you can see the whole forty five minutes in one place.
A first look at the six steps
The rest of this lesson introduces a six step framework that every later lesson builds on: clarify use cases and consumers, model resources, choose the style and protocol, define endpoints and schemas, handle cross cutting concerns, and evolve and wrap up. You will see it in full in the third section. For now the important idea is that the steps run from the outside in. You start with the people and programs who call the API, then the things they talk about, then the shape of the conversation, and only then the details of each call. Candidates who start from the details, writing a POST in the first minute, almost always have to go back and rewrite.
What the interviewer is not testing
It helps to know what is out of scope so you do not waste time on it. You are rarely asked to design the storage behind the API, size servers or pick a cloud provider. You are not expected to remember the exact wording of the HTTP specification or every header name. You are not expected to write server code. If a storage or infrastructure question does come up, answer it briefly in terms of what it means for the contract, for example a slow report generation job means the export endpoint should be asynchronous, and bring the conversation back to the boundary.
You are also not expected to produce something original for its own sake. Interviewers prefer a boring, consistent API that follows well known conventions over a clever one that surprises callers. Familiar patterns, such as plural resource names, ISO 8601 timestamps and cursor based lists, are a strength, because callers already know them. Novelty should appear only where the prompt genuinely needs it, and when it does, you should say why the usual pattern does not fit.
A quick self check before you start
Before your first practice round, try to answer three questions about any API you use often, such as the one behind a payment provider or a messaging service. Who are its consumers? Which call would be most dangerous to retry blindly? How would it add a new field without breaking existing clients? If you can answer all three for an API you know, you already think the way the round rewards. If you cannot, the next lessons will build that habit step by step.
In the first minute, ask whether the interviewer wants the external contract in depth or the API as one step of a wider design. The answer decides whether you spend five minutes or forty on endpoints, and interviewers almost always answer it.
After the round, the interviewer writes an evaluation. The form varies by company, but nearly every API rubric asks for evidence on the same handful of signals. Each rating must be backed by something you said or wrote, so a signal you never made visible effectively scores zero, however well you understand it. Knowing the signals tells you where to spend the forty five minutes.
Signal one: consumer focus
The first signal is whether you designed for real callers. Strong candidates name the consumers early: a mobile app on an unreliable network, a third party developer who integrates once and upgrades rarely, an internal service making thousands of calls a second, a web dashboard that needs many small pieces of data on one screen. They then let those consumers drive decisions. The mobile app wants few round trips and small payloads. The partner wants stable field names, clear errors and safe retries. The internal service wants strict types and low overhead.
Weak candidates never mention a caller. They design endpoints that mirror their database tables, which forces every client to know how the backend is organised. An interviewer reading that design asks who this is for, and the candidate has no answer. Consumer focus is cheap to show: one minute of questions at the start and one sentence linking each big decision back to a caller.
Signal two: resource modeling and consistency
The second signal is the quality of the model. Are the resources real nouns from the domain, such as orders, bookings and payments, or a list of verbs dressed up as URLs? Are identifiers stable and opaque? Are relationships expressed in a way that callers can navigate? Is the naming consistent across the whole API, so that once a caller has learned one endpoint they can guess the next? Consistency is a big part of this signal. An API where one list uses page and another uses offset, or where one timestamp is in seconds and another is an ISO string, tells the interviewer that the designer did not think of the API as a single product.
Signal three: correctness under failure
The third signal is what happens off the happy path. Networks drop requests, clients retry, two users try to book the last seat at the same moment, and a long operation is still running when the caller gives up. Strong candidates bring these cases up before being asked. They make create calls safe to retry, they say which status codes mean try again and which mean fix your request, they protect updates against lost writes, and they describe how a client learns the result of a slow job. This signal carries a lot of weight because these are the cases that cause real incidents and real money to be lost.
Signal four: evolvability
The fourth signal is whether the contract can grow without breaking callers. Interviewers test it with questions such as how would you add a second currency, how would you rename this field, or what happens to old mobile apps when you ship a new version. Strong answers show habits that keep options open: responses that are objects rather than bare arrays so fields can be added, enums that clients are told may grow, identifiers that do not leak meaning, a stated versioning approach and a deprecation plan. Lesson seven covers the mechanics. In this lesson the point is that interviewers listen for it in every step, not only at the end.
Signal five: communication and judgment
The last signal is how you work. Can the interviewer follow your reasoning? Do you state trade-offs instead of presenting one option as obviously right? Do you write things down in a form they can point at? Do you adjust when challenged, or defend a weak choice? An API round is a conversation about a shared document, so behaviour that keeps the document clear and the conversation calm counts directly. Saying I am choosing cursor pagination because the feed changes constantly and offset would skip items, and the cost is that clients cannot jump to page fifty, is worth more than the choice itself.
How the bar changes with level
The same prompt is used at every level, but the expectations differ. A mid level candidate is expected to produce a clean, consistent set of endpoints with sensible schemas and status codes, and to handle the main failure cases when prompted. A senior candidate is expected to drive the round, raise failure and retry cases unprompted, choose a style for a stated reason and keep the contract consistent across many endpoints. A staff candidate is expected to think about the API as a long lived product: how many teams and partners depend on it, how it will be versioned and deprecated, how it fits with other APIs in the company, and what operational guarantees such as rate limits and service levels the contract implies.
The practical consequence is that the back half of the round, where cross cutting concerns and evolution are discussed, is where senior and staff candidates earn most of their credit. A candidate who spends forty minutes polishing endpoint names and runs out of time before discussing retries has shown a mid level signal regardless of how good the names are.
What does not score
Some things feel productive but earn little. Listing every field of every resource rarely helps; show the important ones and say the rest follow the same pattern. Arguing about tooling, such as which framework generates the OpenAPI file, is not the point. Long speeches about REST philosophy without a concrete decision attached do not count either. The interviewer is looking for decisions and the reasons behind them, attached to this prompt and these callers. When you notice you are talking about something general, bring it back to the design in front of you.
Evidence you can plan for
Because each signal needs a visible moment, you can plan those moments. Name at least two consumers in the first three minutes. Write the resource list before any endpoint. State the style choice with a one sentence reason. Write one full request and response body. Raise at least one retry or concurrency case yourself. Say how one field could change without breaking clients. Check in with the interviewer at least three times. A candidate who does all of these has given evidence on every signal, which is the single most reliable way to avoid a weak rating on any of them.
How interviewers write the evaluation
It helps to picture the form the interviewer fills in after you leave. For each signal they write a rating and two or three sentences of evidence, often quoting you. Candidate named the mobile client and partner integrations up front and chose cursor pagination for the activity feed because inserts would shift offsets. Candidate did not consider retries on the create charge call until prompted, then proposed an idempotency key. Notes like these are what the hiring committee reads. They rarely see your document, and they never see your intentions. That is why visible, quotable moments matter: a choice you made silently is invisible to everyone who decides.
The form usually ends with an overall recommendation and a level. Interviewers find it much easier to write a strong recommendation when the evidence for each signal is concrete. Vague notes such as seemed to know REST well tend to produce cautious ratings, because the committee cannot tell what the candidate actually did.
Red flags that outweigh good work
A few behaviours pull a rating down even when the rest of the round is strong. Ignoring a requirement agreed in the first five minutes, such as designing a synchronous endpoint for a job the interviewer said takes ten minutes, suggests you were not listening. Inventing behaviour that contradicts HTTP semantics, such as a GET that changes state, makes the interviewer doubt the fundamentals. Becoming defensive when challenged suggests you would be hard to review in real work. And spending most of the round on one narrow detail, such as the exact format of an id, shows poor navigation. Each of these is easy to avoid once you know it is being watched.
Signals in a combined round
When the API is one step inside a system design interview, the same signals exist but are weighted differently. Consumer focus and resource modeling carry most of the API part of the rating, because there is no time for a deep discussion of retries or versioning. One well placed sentence still helps: noting that the post creation call takes an idempotency key because mobile clients retry shows correctness thinking in seven words. Interviewers in combined rounds often mention afterwards that the candidate's API step was the moment they knew the person had built real services.
Mid level candidates are judged mostly on clean, consistent endpoints. Senior candidates must raise retries, concurrency and errors unprompted. Staff candidates must treat the API as a long lived product: versioning, deprecation, many dependent teams and the guarantees the contract implies.
A framework is a default order for the round. It makes sure nothing important is forgotten under pressure, and it gives the interviewer a structure they can follow. This course uses six steps, and every later lesson refers back to them. Each step produces an output that the next step depends on, which is why the order matters more than the names.
Step one: clarify use cases and consumers
Start by finding out who calls the API and what they need to do. Ask who the consumers are: public developers, partners, your own mobile and web apps, other internal services. Ask what the three to five most important use cases are, phrased as things a caller does: search available tables, hold a table, confirm a booking, cancel it. Ask about the properties that matter: is this read heavy, are writes money sensitive, do callers need real time updates, how many requests a second at peak, how long must the API stay stable. Finally, agree on what is out of scope.
The output is a short written list: consumers, core use cases and two or three key properties. Every later decision should trace back to it. If you later choose cursor pagination, the reason is on that list. If you add an idempotency key, the reason is that payments are money sensitive and clients retry.
Step two: model resources
Turn the use cases into nouns. A booking service might have restaurants, tables, availability slots, holds and bookings. For each resource, note its identifier, its key fields, its relationships and its lifecycle states. Decide which resources are top level and which belong under a parent. Spot the operations that are not plain create, read, update or delete, such as confirming a hold or cancelling a booking, and decide whether they are state changes on a resource or custom actions.
The output is a resource list with ids, relationships and states. It is the most important artefact of the round, because a good model makes the endpoints almost write themselves, while a confused one cannot be rescued by clever endpoints. Lesson two covers this step in detail.
Step three: choose the style and protocol
Decide whether the API is REST over HTTP with JSON, gRPC with protocol buffers, GraphQL, or a mix. The choice follows from the consumers. Public developers usually get REST because every language and tool speaks it. High volume internal service to service calls often use gRPC for strict schemas, code generation and streaming. A product with many screens that each need different slices of related data may expose GraphQL to its own clients. Say the choice in one or two sentences with the reason, and move on. Lesson three covers the trade-offs.
Step four: define endpoints and schemas
Now write the operations. For REST, that is a method and a path per use case, with the main request and response bodies, status codes and important headers. For gRPC it is service and method definitions with message types. For GraphQL it is the types, queries and mutations. Do not write every field of every call. Write the two or three operations that carry the most risk in full, and list the rest compactly. A compact table is often clearer than prose:
The output is this list plus full examples for the riskiest calls. With the model from step two, this step is usually fast.
Step five: cross cutting concerns
This is where the contract becomes robust. Walk through the concerns that apply to every endpoint: how errors are reported and which codes are retryable, how lists are paginated, filtered and sorted, which calls take idempotency keys, how concurrent updates are protected, how callers authenticate and what they are allowed to do, what rate limits and quotas apply, and how slow work and events reach callers, through polling, webhooks or streams. You will not go deep on all of them. Pick the ones this prompt stresses most, usually two or three, and give the rest one sentence each. Lessons four to nine each cover one of these concerns.
Step six: evolve and wrap up
Finish by showing that the contract can survive change. Say how the API is versioned, which kinds of change are additive and safe, how a breaking change would be rolled out and deprecated, and which part of today's design you would revisit as the product grows. Then summarise: the consumers, the resource model, the style, the key endpoints and the main safety rules, checked against the use cases from step one. A ninety second summary that maps each use case to an endpoint is a strong way to end.
The framework is a default, not a script
Not every prompt needs every step at the same depth. If the interviewer says assume REST and JSON, skip step three and say so. If the prompt is an internal metrics ingestion API, the interesting work is in step five, around batching, limits and partial failure, so spend your time there. Interviewers notice when a candidate ticks boxes mechanically, for example by discussing GraphQL for a webhook receiver. Use the framework to make sure you do not forget anything, and then spend your time where this problem's difficulty actually is.
How the steps map to the signals
The mapping explains why the order works. Step one produces most of the consumer focus evidence. Steps two and four produce the modeling and consistency evidence. Step three shows judgment. Step five is where correctness under failure is earned. Step six is where evolvability is earned. Communication runs through all of them, concentrated at the checkpoints between steps. A candidate who skips a step usually leaves one signal without evidence, which is why skipping is risky even when a step feels obvious.
A tiny worked pass through the framework
Here is the framework applied in miniature to a prompt such as design an API for a to do list app. Step one: the consumers are the company's own web and mobile apps, plus a public integration API for automation tools later; the core use cases are create a list, add, complete and reorder items, and share a list; the key properties are low latency on mobile and safe retries on flaky networks. Step two: resources are lists, items and shares, with items under lists, opaque ids, and an item status of open or done. Step three: REST with JSON, because the public integration is a goal and every automation tool speaks HTTP. Step four: a compact table of endpoints with full bodies for adding an item and sharing a list. Step five: cursor pagination on items, idempotency keys on create, ETags on item updates so two devices do not overwrite each other, and OAuth scopes for the public API. Step six: additive changes only, a v1 prefix and a plan for adding due dates and reminders. Even this short pass touches every signal, which is the point of the framework.
Writing the headings first
A simple habit makes the framework hard to forget: write the six headings in the shared document before you start. Consumers, resources, style, endpoints, rules, evolution. The empty headings remind you where you are, show the interviewer your plan in five seconds and give both of you a map to refer to. If the interviewer wants to jump ahead, for example to ask about pagination while you are on resources, you can note the question under the rules heading and come back to it, instead of losing your place.
Going back is allowed
The order is a default, not a one way street. You will often discover in step four or five that the model needs another resource, for example that holds need their own resource because they expire independently of bookings. When that happens, say so, go back and update the resource list, then continue. Interviewers read this as good engineering, because real designs are iterative. What they do not want to see is the model and the endpoints drifting apart, with endpoints for resources that were never modelled.
If the endpoints in step four feel hard to write, the problem is almost always in step two. Go back and fix the resource model: once the nouns, ids and states are right, most endpoints follow directly from them.
Knowing the steps is half the job. The other half is fitting them into the time and running the conversation so the interviewer sees each signal. Most failed API rounds are not failures of knowledge. They are rounds where the candidate spent twenty minutes on naming and never reached retries, or where they wrote a long document in silence and the interviewer could not follow it.
A default time plan
For a forty five minute standalone round, a plan that works for most prompts is: about five minutes on consumers and use cases, five on the resource model, a couple of minutes on style, around fifteen on endpoints and schemas, about ten on cross cutting concerns and five on evolution and the summary. Keep a minute or two in reserve. In practice the boundaries blur, because you will mention idempotency while writing an endpoint, and that is fine.
The plan front loads the short scoping steps and protects the back half. That is deliberate. The evidence that separates senior from mid level candidates comes from cross cutting concerns and evolution, so a plan that leaves ten minutes for them is a plan that leaves room for the senior signal. Glance at the clock at the end of each step. If you are more than five minutes behind at the end of step four, say so and compress: list the remaining endpoints in one line each and move on.
Write in a form the interviewer can point at
Use the shared document as the centre of the conversation. Write short headings for each step: consumers, resources, style, endpoints, rules, evolution. Under each heading, write the decision in a line or two. When you write an endpoint, write the method, path and status, then one example body. Interviewers think by pointing, so give them things to point at. A wall of prose is hard to question. A list of five endpoints, each on one line, invites precise questions such as why is cancel a POST and not a DELETE.
Use code blocks for bodies. JSON is easiest to read for REST, and a short protobuf or GraphQL snippet works for the other styles. Keep examples realistic: real looking ids, real field names, a plausible amount and currency. Here is a response body that gives an interviewer plenty to discuss:
Every field here invites a question the candidate should be ready for: why a string id with a prefix, why ISO timestamps in UTC, which statuses exist, and whether the restaurant is embedded or referenced.
Checkpoints between steps
At the end of each step, summarise in a sentence and ask a short question. Here are the consumers and use cases I will design for, does that match what you had in mind? These are the resources, I am treating cancel as a state change on a booking, shall I go on to endpoints? Each checkpoint takes under thirty seconds. It catches misunderstandings early, gives the interviewer a natural moment to steer you towards what they want to see, and is itself evidence of good communication.
Checkpoints are also where you can recover time. If the interviewer says the model looks fine, skip the remaining detail and move on. If they say they are most interested in how you handle concurrent bookings, you now know where to spend step five.
Handling pushback
At some point the interviewer will challenge a choice. That is a good sign; it means they are looking for evidence. Treat the challenge as information. If they are right, say so and revise the contract on the document. If you disagree, give your reason and the trade-off, and offer the alternative. Revising openly is usually rated higher than defending a weak first draft, because it shows how you would behave in a real design review.
A short exchange shows the pattern:
Interview Dialogue
Notice that the candidate does not argue. They name the failure, change the contract and handle the follow up edge case. Lesson five covers idempotency keys in depth.
When you get stuck
If you do not know something, say what you would need to decide it and make a reasonable assumption. I am not sure how many partners will call this, so I will assume a few hundred with strict upgrade cycles, which pushes me towards conservative versioning. That keeps the round moving and shows judgment. Silence longer than ten or fifteen seconds is worse than an imperfect assumption said out loud.
Running the API step inside system design
When the API is one step of a larger interview, compress everything. Spend thirty seconds naming the consumers, list four to six operations with methods, paths and the key fields, mention pagination on the main list and an idempotency key on the main write, and move on within about eight minutes. The interviewer will ask for more if they want it. The mistakes to avoid are the same as in a standalone round, but the biggest one is spending too long, because the rest of the system design interview needs the time.
Ending well
Reserve the last few minutes for a summary. Walk the use cases from step one and point at the endpoint that serves each. Mention the safety rules: which calls are idempotent, how errors are reported, how lists are paged, how callers authenticate. Name one thing you would revisit with more time, such as moving long running exports to an asynchronous job. A clean summary leaves the interviewer with a clear picture to write up, and the last few minutes are often what they remember best.
Adapting to a sixty minute round
Some companies run sixty minute API rounds or leave you a full hour of design time. The plan stretches without changing shape. Keep the first two steps about the same length, since they rarely need more than ten minutes, and give the extra time to step five and to a second full example. The interviewer will often use the extra time to add a twist: now partners also need to receive updates, or now this has to work across two regions. Treat a twist like a new requirement. Note it under the consumers heading, ask one or two questions, and adjust the model and rules rather than bolting on an endpoint.
Questions to ask in the first minutes
Good clarifying questions are short and change decisions. Who calls this API, and do we control those clients? Which two or three operations matter most? Is anything here money sensitive or hard to undo? How fresh must data be, and do callers need to be told about changes? Roughly how many calls per second at peak, and from how many callers? How long must this contract remain stable, months or years? If the interviewer gives vague answers, propose an assumption and ask them to confirm it. Writing the answers down under the consumers heading means you can point back to them later when you justify a choice.
Check the time at each checkpoint. If you are more than five minutes behind after endpoints, say so, list the remaining operations in one line each and move to cross cutting concerns, where most of the senior credit is.
Interviewers who run many API rounds see the same mistakes again and again. The good news is that almost all of them are habits rather than gaps in knowledge, and habits can be fixed with deliberate practice. This section lists the most common mistakes, what they look like on the document, and the fix, then gives a practice plan for the rest of the course.
Mistake one: verbs instead of resources
The most visible mistake is URLs that read like function names: /createOrder, /getUserBookings, /cancelBookingById. They show that the designer is thinking in remote procedure calls while using HTTP. The result is an API with no consistent shape, where every new feature adds a new verb and callers cannot guess anything. The fix is to model nouns first and use methods for the standard actions: POST /orders, GET /users/u_1/bookings, and a clear choice for cancellation, either a state change through PATCH or a custom action such as POST /bookings/bk_1/cancel. Lesson two covers when each is right. If you choose RPC style on purpose, for example with gRPC, that is a different design and fine, but say so.
Mistake two: the happy path only
Many candidates write a neat set of endpoints that all return 200 and never mention what happens when something fails. The interviewer then has to ask about every failure, and each answer is improvised. The fix is to bring failure in yourself. For each risky endpoint, say what the main error cases are and which status they return, whether a retry is safe, and how concurrent updates are handled. A short error shape stated once for the whole API covers a lot of ground:
Lesson six goes into error design. For now, the habit to build is simple: never finish an endpoint without saying how it fails.
Mistake three: unbounded lists
GET /orders that returns every order the user has ever placed works in a demo and fails in production. It also signals that the candidate has not thought about scale from the caller's side. Every list endpoint needs a page size limit and a way to fetch the next page, and the choice of offset or cursor should be made deliberately. Lesson four covers the options. In the interview, the minimum is one sentence: lists are cursor paginated with a default of twenty items and a maximum of one hundred.
Mistake four: leaking internals
Endpoints that expose database ids as sequential integers, field names copied from columns, or error messages that include stack traces leak the implementation into the contract. Once a caller depends on those details, the backend can never change them. Sequential ids also let anyone count your orders or guess other users' resources. The fix is opaque identifiers, domain oriented field names and errors written for the caller. A useful test is to ask whether you could swap the database without changing a single response.
Mistake five: no story for change
Candidates often design as if the API will never change. When asked how they would add a field or remove one, they have no plan. The fix is to state a versioning approach early, design responses as objects so they can grow, tell clients to ignore unknown fields and to expect new enum values, and describe how a breaking change would be announced and retired. Even one minute on this in step six is enough to show the habit. Lesson seven has the mechanics.
Mistake six: style by fashion
Choosing GraphQL because it is modern, or gRPC because it is fast, without linking the choice to the consumers, is a judgment red flag. So is refusing to consider anything but REST when the prompt is clearly high volume internal traffic. The fix is to make the style choice in step three for a stated reason tied to the consumers, and to mention the main cost of the choice. Interviewers do not mind which style you pick nearly as much as they mind not hearing why.
A practice plan for this course
Practise the framework on a fresh prompt at least once a week while you work through the lessons. Use a timer and a blank document. For each practice round, write the six headings first, then fill them in order. At the end, check each heading: is there a consumer list, a resource model with ids and states, a stated style with a reason, at least one full request and response, at least two cross cutting rules applied to specific endpoints, and a versioning note? Any missing item is the first thing to fix next time.
Rotate through prompt families so you do not overfit: one commerce prompt, one booking prompt, one content prompt and one platform prompt. Good starting prompts are an order and refund API for an online store, a calendar appointment API, a comments API for a video site and an SMS sending API for developers. As you finish later lessons, deepen the matching part of your practice: after the pagination lesson, write the list endpoints of every prompt with cursors; after the idempotency lesson, add keys to every money moving call.
Practise out loud
API rounds are spoken. Practise explaining each decision aloud as you write it, ideally to a friend who can interrupt with a challenge. If you practise alone, record yourself and listen for long silences, for decisions without reasons and for places where you never checked in. The aim is for the reasoning to come out naturally as you write, so that in the real round the interviewer hears why as often as what.
Reviewing a practice round
After each round, spend five minutes reviewing against the five signals. Did you name consumers and use them? Is the model consistent? Did you raise at least one failure case before being asked? Did you say how the contract could change? Did you check in at least three times? Write down the single biggest gap and make it the focus of the next round. Steady improvement on one gap at a time beats trying to fix everything at once.
Mistake seven: drowning in detail
Some candidates swing the other way and write every field of every resource, debating whether a field should be called created_at or creation_time while the clock runs. Detail is useful only where it carries a decision. Write full bodies for the two or three riskiest operations and describe the rest by pattern: other resources follow the same id, timestamp and status conventions. The interviewer will ask for more where they want it.
A checklist for the last five minutes
Before the round ends, run through a short checklist in your head. Have I mapped each core use case to an endpoint? Have I said how lists are paginated? Have I said which calls are safe to retry and how? Have I described the error shape and two important error codes? Have I said how callers authenticate? Have I said how the contract will change? Any gap can be closed with one sentence each in the summary, and closing them turns a decent round into a complete one.
Mistake eight: forgetting who owns the client
A quieter mistake is designing as if you can update every client the moment the API changes. That is true for a web app you deploy yourself and false for a mobile app, where some users never upgrade, and for partners, who may take months to change an integration. Candidates who forget this propose renaming fields or changing response shapes casually. The fix is to ask in step one whether the company controls the clients, and to carry the answer into every later decision. If old mobile versions will keep calling for a year, every change must be additive for at least that long, and the design should include a way to see which versions are still calling.
Learning from APIs you already use
Real public APIs are free study material. Read the reference documentation of two or three well regarded APIs and look for the patterns this course teaches: how they name resources, how they page lists, which calls accept idempotency keys, what their error bodies look like and how they announce versions. Notice the places where they differ and ask yourself why. The aim is not to copy any one of them in the interview, but to build a feel for conventions that callers find familiar.
The single most common reason for a weak rating is an API that only describes success. For every risky endpoint, say the main error statuses, whether a retry is safe and how concurrent updates are handled before you move on.