Interview preparation guide
API Interview Questions With Practical Design Exercises
Practice API design interview questions by explaining the model, working through a small problem and checking failure cases. These original exercises test reasoning rather than recall of a claimed employer question list.
Scope and assumptions
This guide uses HTTP semantics and a fictional JSON service. Resource names and error bodies are application decisions; status-code and method behavior should remain consistent with the documented contract.
Confirm the version, deployment model and permissions in the interview. The examples use fictional data and are deliberately small. A snippet demonstrates one idea; it is not a complete production system.
How do authentication and authorization differ?
Authentication establishes identity. Authorization decides whether that identity may perform a particular action on a resource. A signed-in user must still be prevented from accessing another user’s private record.
What does idempotent mean?
Repeating the same request has the same intended effect as making it once, within the operation’s semantics. It does not require every response byte or status to be identical. Discuss side effects and retry behavior explicitly.
How should validation errors be designed?
Return a consistent, useful explanation without exposing internal details. Validate types, limits and business rules server-side. Clients should not need to parse a stack trace to understand which input needs correction.
How do you preserve compatibility?
Define the contract, test consumers and distinguish additive changes from changes that alter meaning or required fields. A new endpoint name alone does not make a migration safe; plan overlap and retirement.
Worked exercise
Design read access to a fictional private application note. Define behavior for the owner, another user, an unknown ID and malformed input before choosing response text.
GET /application-notes/42
Authentication -> identify caller
Validation -> check supported ID form
Authorization -> verify caller can read note 42
Response -> return only permitted fields
Tests -> owner, other user, anonymous, missing note, invalid IDExpected result and explanation
The owner can receive the permitted note fields. Other callers must not receive private content. Choose consistent unauthorized and not-found behavior that fits the application’s existence-disclosure policy. Test the real handler and data access boundary, not just a client-side hidden button.
Before changing the example, predict the result. Then vary one input or constraint and explain why the behavior should change. Keep the distinction between a measured result and an assumption clear.
Debugging and follow-up
If an API returns the right status but still leaks data, inspect body fields, headers, logs and caches. For failed retries, check method semantics and state changes rather than assuming every network error means nothing happened.
- What evidence would distinguish your first explanation from an alternative?
- Which boundary, permission or failure case should be checked?
- How would you reproduce the issue without affecting live users?
Practice checklist
Explain one design decision aloud and support it with the worked example. Use the official documentation below to check version-specific behavior.
- I stated the relevant version and environment.
- I can explain the expected result and an edge case.
- I can separate correctness, performance and security concerns.
- I know which parts require a real runtime or service to verify.
Questions, answered
Are these questions used by a particular employer?
No. They are original practice questions. Employers can assess different tools, versions and levels of depth.
How should I verify the exercise?
Use an isolated local or sandbox environment with the stated prerequisites. Compare the expected result, then test an edge case. Do not run service commands against a shared or production system.
Sources and examples
ResumizeAI team. Examples are fictional teaching material, not customer results. Replace sample details with your own facts.
Your experience. A complete resume.
Build in Resumize with ATS-friendly templates, guided editing and a live preview. Start free, then upgrade when you need more.
Free account required. Free-plan PDF exports include a watermark.