Start with the contract: status codes, response schema, content types, and required versus optional fields. Then validate every input (missing, wrong type, out of range, oversized), test authentication and authorization including access to another user's resource, check error response consistency, idempotency on duplicate submissions, pagination and sorting, rate limiting, and behavior when a dependency fails or times out.
Why interviewers ask this
API testing is where most modern QA effort actually lands, and the interviewer wants to know whether you go past a 200 on the happy path. The strongest signals are authorization testing across users, which catches the most serious real bugs, plus idempotency and error contract consistency. Candidates who only describe valid and invalid payloads are showing a shallow model of the surface.
How to structure your answer
- Explore the contract first: codes, schema, types.
- Systematically attack every input field.
- Test authentication and authorization as separate things.
- Cover idempotency, pagination, and rate limiting.
- Test what happens when a dependency fails.
Example answer
First I map the contract, because with no docs I need to know the shape before I can judge it. Happy path call, then look at the status code, the headers, the response body, and whether fields are consistently named and typed. Then I attack the inputs one at a time: omit each required field, send a string where a number belongs, send a negative, send a value past whatever length looks reasonable, send extra fields it did not ask for and see whether it rejects them or quietly ignores them. Then the part I care most about, which is authorization as distinct from authentication. Being logged in is not permission. So I take a valid token from one user and request another user's resource by ID, because that class of bug is common and genuinely severe. After that: does a repeated POST create two records, does pagination behave at page zero and past the end, are error bodies consistent in shape, is there rate limiting, and what happens when a downstream service is slow. I will point a proxy at it and tamper with responses to see whether it degrades or throws a 500.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- How would you verify a response schema automatically rather than by eye?
- What is the difference between a 401 and a 403 here, and would you check it?
- How would you test an endpoint that only accepts requests from another service?
Related qa engineer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions