HomebaseWorks

API testing interview questions

API testing questions interviewers commonly ask, with answers that show how you design and judge tests.

EWritten by the HomebaseWorks editorial team · reviewed 26 Oct 2026
1
What do you check in an API response besides the status code?

I check the key body values against what I sent or expect, the schema and data types, important headers such as Content-Type, and response time. I also verify side effects with a follow-up call, for example a GET after a POST to confirm the record was saved correctly.

2
What is the difference between 401 and 403?

401 means the server does not know who you are because the credentials are missing, invalid or expired. 403 means it knows who you are but you are not allowed to do this. For example, a normal user's valid token calling an admin endpoint should get 403.

3
What does idempotent mean, and why does it matter for testing?

A request is idempotent if repeating it has the same effect on the server as sending it once. GET, PUT and DELETE are idempotent, while POST usually is not. It matters because clients retry after timeouts, so I test what happens when the same POST is sent twice, such as whether a payment is charged twice.

Advertisement
4
How would you design negative tests for a create-user endpoint?

I would send requests with missing required fields, wrong data types, values just over length limits, malformed JSON, and a duplicate email. Each should return a 4xx code with a clear message and no stack traces. A 500 response to any of these is a defect I would report.

5
What is the difference between PUT and PATCH?

PUT replaces the whole resource with what you send, so leaving a field out can clear it. PATCH updates only the fields included. In testing I check that a PATCH with only a phone number leaves the name and email unchanged.

6
How do you test that one user cannot access another user's data?

I create two test users and get a token for each. Then I use user A's token to request, update or delete user B's resources by changing the id in the URL. The API should return 403 or 404, never B's data, and I treat any success as a serious security defect.

Practise out loud. Say each answer once as written, then again in your own words with your own number or story.

Have a number ready. "My API testing score is at benchmark on a timed test" is a stronger answer than "I am good at it". Take the test and quote the result.

Advertisement
Continue with API testing4 lessons · 1 interview set · 1 test · 1 certificate
Not tested

More in Software testing