API testing interview questions, 2026
Increasingly common, especially for SDET roles.
API testing questions are now standard for SDET and senior QA roles in India. The questions probe whether you assert on more than just status codes: response headers, body shape, body values, side effects, idempotency, error handling. Tools mentioned in answers: Postman, REST Assured, pytest with requests, Pact for contract testing.
Q1You send the same POST twice in 2 seconds and the system creates two orders. What test would have caught it?
What the interviewer is really listening forLooking for: understanding that POST isn't idempotent + the canonical idempotency test.
Sketch answer (adapt, do not memorise)A duplicate-request test. POST is not idempotent unless the endpoint enforces it, typically via an Idempotency-Key header. The canonical test sends the same POST twice with the same Idempotency-Key and asserts only one resource is created.
Q2List 6 things you assert on a single API endpoint.
What the interviewer is really listening forLooking for: layered thinking, status, headers, body shape, body values, side effects, performance.
Sketch answer (adapt, do not memorise)Status code, response headers (Content-Type, Cache-Control, Set-Cookie + flags), body shape (every documented key present, correct types), body values (specific values, not just shape), side effects (DB row created, email queued), and performance (under target SLA at p95).
More interview prep
- QA fundamentals →3 questions
- Requirement analysis →2 questions
- Test design techniques →2 questions
- Defects and bug reporting →2 questions
- Selenium and browser automation →3 questions
- Test framework and CI →2 questions