How to Design an API That Is Clear to Clients
A practical way to talk through an API design in a senior Product Manager interview. Focus on the contract, the user of the API, and the choices that make th...
In senior Product Manager interviews, API design questions often test whether you can define a clean contract, not just describe a system. You need to show that you can think from the client’s point of view, handle edge cases, and keep the design usable as the product changes. The main problem this solves is ambiguity: a vague API answer makes it hard for interviewers to see how you think.
Why this matters in interviews
- Interviewers are testing whether you can define scope before jumping to solutions.
- They want to see if you can name inputs, outputs, and failure cases.
- They look for judgment around versioning, retries, and backward compatibility.
- They want to know if you can make the API usable for another team.
A strong answer sounds like a clear contract: what the API does, what it takes in, what it returns, and how it behaves when things go wrong.
The simple approach
- Start with the client and the job the API needs to do.
- Define the core resource or action before debating storage or infrastructure.
- List the required fields, optional fields, and error cases.
- Add rules for retries, pagination, auth, and versioning only where needed.
- Finish with a small example that shows how a caller would use it.
Step-by-step
- Write the API goal in one sentence.
- Check: The sentence names the caller, the action, and the outcome.
- List the main inputs, outputs, and errors.
- Check: A developer could see what happens on success and failure.
- Draft the contract for the main flow.
- Check: The endpoint, method, and response shape are visible.
- Add rules for retries, pagination, auth, and versioning.
- Check: The design is stable under repeated calls and future changes.
- Create a short spec artifact with examples.
- Check: The artifact includes one request, one response, and one error case.
- Review the design from the caller’s point of view.
- Check: A new team could build against it without guessing.
Example (weak vs strong)
Weak answer:
- “I’d make it RESTful and scalable.
- It should support all the main use cases.
- Then I’d optimize the backend.”
Strong answer:
- “The API lets a partner app create and fetch orders.
- It needs a POST to create, a GET to retrieve, and clear validation errors.
- I’d include an idempotency key for retries and version the contract before adding new fields.
- Here’s the request shape and one failure response.”
The strong answer is better because it defines a usable contract first. It also shows how the API behaves in real client scenarios, not just in theory.
Mistakes to avoid
- Starting with infrastructure instead of the contract.
- Skipping failure cases and retry behavior.
- Forgetting backward compatibility when changing fields.
- Mixing too many concerns into one endpoint.
- Describing the API without examples.
- Leaving ownership unclear for validation and errors.
Try this now (10 minutes)
- Pick one common product action.
- Write the goal, inputs, outputs, and errors.
- Add one rule each for retries and versioning.
- Draft one request and one response example.
- Read it as if another team will build from it.
Output: A one-page API design sketch with examples and error handling.
Quick self-check
- Is the caller and goal clear in one sentence?
- Are inputs, outputs, and errors all listed?
- Did you include at least one example?
- Did you address retries or versioning if they matter?
- Could another team implement from the answer?
Focus
- Query: api design interview client contract versioning retries
- What to focus on: Focus on how the API is framed as a contract, then check which edge cases are named.