API Testing Interview Questions for Freshers (2026): 30 Q&A with Postman Examples

Create your free QA Jobs accountDaily verified QA jobs · 10-second signup · No card needed

Short answer: API testing interviews for freshers check four things – HTTP basics (methods, status codes, headers, JSON), how you test one endpoint (positive, negative, boundary, auth), how you use Postman (collections, environments, variables, test scripts) and whether you can explain one real bug you found in an API. Prepare the 30 questions below and do the 60-minute practice task at the end, and you will be ready for most manual + API testing rounds.

Many manual testing job posts in India now say “API testing with Postman” next to manual testing and SQL. This guide is for freshers and manual testers with 0–3 years who want to clear that part of the interview. If you already write Java code for APIs, read our REST Assured API testing interview questions after this one.

HTTP and API basics (Q1–Q10)

1. What is an API, and what is API testing?

An API (application programming interface) is a contract that lets one program ask another program for data or an action – for example, a mobile app asking a server for a user’s orders. API testing checks that contract directly, without the UI: you send requests and verify the status code, response body, headers, data saved in the database, error handling, security and response time.

2. Why test the API if the UI is already tested?

The API is where the business rules run. Bugs found there are cheaper to fix, tests are faster and less flaky than UI tests, and you can test cases the UI blocks – such as sending a negative amount or another user’s ID directly. Mobile apps, web apps and partners often share the same API, so one API bug can break all of them.

3. What is the difference between REST and SOAP?

REST is an architectural style that uses HTTP methods on resources (URLs) and usually sends JSON. SOAP is a protocol that always uses XML envelopes and a WSDL contract. Most new web and mobile APIs are REST; SOAP still appears in banking, insurance and older enterprise systems.

4. Explain the common HTTP methods.

  • GET – read data, should not change anything
  • POST – create a resource or trigger an action
  • PUT – replace a resource completely
  • PATCH – update part of a resource
  • DELETE – remove a resource

5. What is the difference between PUT and PATCH?

PUT sends the full new version of the resource; fields you leave out may be cleared. PATCH sends only the fields that change. A good test: PUT a user with only an email field and check whether the name and phone were wiped – then report whether that matches the API documentation.

6. What does idempotent mean? Which methods are idempotent?

An idempotent request has the same effect on the server whether you send it once or many times. By the HTTP standard (RFC 9110), GET, PUT and DELETE are idempotent; POST is not. That is why “click Pay twice” and “network retry” tests matter for POST endpoints – two identical POSTs must not create two orders unless the business allows it.

7. Which status codes should every tester know?

CodeMeaningTypical test
200 OKRequest succeededGET existing user
201 CreatedNew resource createdPOST new user
204 No ContentSuccess, empty bodyDELETE user
400 Bad RequestInvalid inputMissing mandatory field
401 UnauthorizedNot authenticatedNo token / expired token
403 ForbiddenAuthenticated but not allowedNormal user calls admin API
404 Not FoundResource does not existGET /users/999999
409 ConflictClashes with current stateRegister an email that exists
429 Too Many RequestsRate limit hit100 OTP requests in a minute
500 Internal Server ErrorServer bugAny input that crashes the code – always a defect

8. What is the difference between 401 and 403?

401 means the server does not know who you are (no token, wrong token, expired token). 403 means it knows who you are but you are not allowed to do this. This is one of the most asked fresher questions – give one example of each.

9. What is the difference between path parameters, query parameters, headers and body?

Path parameter identifies the resource: /users/42. Query parameters filter or sort: /users?city=Pune&page=2. Headers carry metadata such as Authorization, Content-Type and Accept. The body carries the data you send, usually JSON, in POST, PUT and PATCH.

10. What authentication types have you seen in APIs?

API key (sent in a header or query), Basic auth (username and password, Base64-encoded – only safe over HTTPS), Bearer token such as a JWT, and OAuth 2.0 where you first get an access token and then call the API with it. As a tester you check: missing token, wrong token, expired token, a token for another user, and that tokens never appear in URLs or logs.

Test design for APIs (Q11–Q18)

11. What do you verify in an API response?

  1. Status code
  2. Response body values (correct data, not just “some” data)
  3. Schema – field names, types, mandatory fields, no extra sensitive fields
  4. Headers such as Content-Type
  5. Response time against the agreed limit
  6. Side effects – the record is really saved, updated or deleted (check with a GET or SQL)

12. Write test cases for a “Create user” POST API.

  • Valid body → 201, returned ID, GET by that ID shows the same data
  • Each mandatory field missing → 400 with a clear message naming the field
  • Wrong data types (number as string, invalid email, future date of birth) → 400
  • Boundary lengths – name at minimum, maximum and maximum + 1 characters
  • Duplicate email → 409 or documented error
  • No token → 401; token of a user without permission → 403
  • Extra unknown fields → ignored or rejected as documented, never saved silently into wrong columns
  • Special characters and Unicode names (e.g. Marathi or Tamil names) → saved and returned correctly
  • Same request sent twice quickly → no duplicate user

13. What negative tests do you run on an API?

Invalid and missing inputs, wrong HTTP method (DELETE on a read-only endpoint should give 405), invalid JSON, very large payloads, wrong Content-Type, IDs that do not exist, and IDs that belong to another user. The last one is important: if user A can read user B’s order by changing the ID in the URL, that is a serious security bug (broken object-level authorisation).

14. How do you test pagination?

Check the first page, a middle page, the last page and one page beyond the last; page size at default, minimum and maximum; no record repeated or skipped between pages; total count matches the database; and invalid values such as page=0, page=-1 or size=100000.

15. What is schema validation?

Checking that the response structure matches the contract – required fields present, correct types, allowed values – usually using a JSON Schema or the OpenAPI (Swagger) specification. It catches silent breaking changes, such as a developer renaming userId to user_id, which would break the mobile app.

16. How do you use Swagger / OpenAPI documentation in testing?

It is your requirement document for the API: endpoints, methods, parameters, request and response examples, and error codes. Write test cases from it, report every place where the real API behaves differently from the document, and import the spec into Postman to generate a starting collection.

17. How do you check data in the database after an API call?

After a POST or PUT, run a SQL query on the record (for example, SELECT name, email, status FROM users WHERE id = 42;) and compare every field with the request. After DELETE, check whether the row is removed or only soft-deleted (status flag), as documented. Our database testing interview questions cover the SQL side.

18. What is API performance testing, and do freshers need it?

It checks response time and error rate under load, usually with JMeter or k6. Freshers are rarely expected to run load tests, but you should note the response time Postman shows and raise a bug when a simple GET takes several seconds.

Postman questions (Q19–Q26)

19. What are collections and environments in Postman?

A collection is a saved, organised group of requests (with folders, scripts and documentation) that you can run together and share. An environment is a set of variables – such as baseUrl and token – so the same collection can run on dev, QA and staging by switching the environment.

20. What variable scopes does Postman have?

Global, collection, environment, data (from a CSV/JSON file in a run) and local. When the same name exists in several scopes, the narrower scope wins. In interviews, the practical answer is enough: “I keep URLs and tokens in environment variables and never hard-code them in requests.”

21. How do you write tests in Postman?

In the request’s Tests (post-response script) tab, using the pm object:

pm.test("Status is 201", function () {
  pm.response.to.have.status(201);
});

pm.test("Title is saved", function () {
  const body = pm.response.json();
  pm.expect(body.title).to.eql("API test by fresher");
  pm.expect(body).to.have.property("id");
});

pm.test("Response time under 800 ms", function () {
  pm.expect(pm.response.responseTime).to.be.below(800);
});

22. How do you pass data from one request to the next (chaining)?

Save a value from the first response into a variable, then use it in the next request with double curly braces:

// Tests tab of "Login"
const token = pm.response.json().token;
pm.environment.set("token", token);

// Next request → Authorization header
Authorization: Bearer {{token}}

23. What is a pre-request script?

Code that runs before a request is sent – for example, generating a unique email so the “Create user” test does not fail on the second run: pm.environment.set("email", "user" + Date.now() + "@test.com");

24. How do you run the same request with many data sets?

Use the Collection Runner with a CSV or JSON data file. Each row becomes one iteration, and column names are available as variables such as {{email}}. This is how you cover 20 boundary values without writing 20 requests.

25. What is Newman?

Newman is Postman’s command-line collection runner. It lets you run an exported collection in a CI pipeline such as Jenkins or GitHub Actions:

npm install -g newman
newman run users.postman_collection.json -e qa.postman_environment.json -r cli,junit

26. Postman or REST Assured – which should a fresher learn?

Start with Postman: it needs no coding to begin, it is listed in most manual + API job posts, and it teaches you HTTP properly. Add REST Assured (Java) or Playwright’s API testing later if you move into automation. Our Postman API testing tutorial for beginners shows the setup step by step.

Scenario questions (Q27–Q30)

27. The API returns 200 but the UI shows wrong data. How do you find where the bug is?

Open the browser DevTools Network tab, find the API call, and compare its response with the database. If the database is wrong, the bug is in the save logic; if the API response is wrong but the database is right, it is in the API; if the API is right but the screen is wrong, it is a front-end bug. Attach the request, response and query result to the bug.

28. A payment API sometimes creates two orders. What do you test?

Send the same POST twice quickly and with the same idempotency key or reference (if the API supports one), simulate a timeout and retry, and check the database for duplicate rows by reference number. The expected result: one order, and the second call returns the first order or a clear duplicate error. Our banking domain testing questions have more money-flow scenarios.

29. How would you test a “Send OTP” API?

Valid and invalid phone formats, OTP never returned in the API response, expiry time, a new OTP invalidating the old one, maximum wrong attempts and lock-out, rate limiting (429) when requested repeatedly, and that the OTP is not visible in logs.

30. Tell me about an API bug you found.

Use a short STAR answer: the endpoint, what you sent, what came back versus what the documentation said, and the impact. Example structure: “In the update-profile PATCH API, sending only the phone number cleared the user’s email. I proved it with Postman and a SQL check, logged it as major because users could lose login access, and it was fixed before release.” If you have no work experience yet, use a bug from your practice project.

60-minute practice task (do this before the interview)

  1. Create a Postman collection against the free fake API JSONPlaceholder with an environment variable baseUrl.
  2. Add GET /posts/1, GET /posts?userId=1, POST /posts, PUT /posts/1, PATCH /posts/1 and DELETE /posts/1.
  3. Write at least two pm.test checks per request (status code + one body field).
  4. Add GET /posts/99999 and assert 404.
  5. Run the whole collection in the Collection Runner, export it, and push it to GitHub with a short README.

Note: JSONPlaceholder fakes writes (POST returns an ID but nothing is stored), which is itself a good talking point – explain how you would verify a real save with a follow-up GET or SQL. Put the GitHub link on your resume; it shows practical API skills better than a certificate.

Where API testing shows up in real job posts

On our daily lists, Postman and API testing appear most often in “manual + API” roles, banking and fintech projects, and remote roles – for example this Manual Tester / API Test Engineer remote role (3–4 years). Freshers usually see API testing listed as “good to have”, so it is a strong way to stand out. Fresh QA jobs go live every morning at 9:00 AM IST on Daily QA Jobs.

Already have 2–3 years of experience? See QA jobs for 2–3 years experience – what recruiters check and how to get shortlisted.

FAQ

Is API testing manual or automation testing?

Both. Sending requests and checking responses by hand in Postman is manual API testing; adding Postman test scripts, running them with Newman, or writing REST Assured code is automation. Most fresher roles expect the manual side plus simple Postman scripts.

Do I need coding to learn API testing?

Not to start. You need HTTP basics and JSON. For Postman test scripts you need a little JavaScript – reading values from an object and simple comparisons.

How many API questions are asked in a fresher QA interview?

It depends on the role. For “manual + API” roles, expect a few concept questions (methods, status codes, 401 vs 403, PUT vs PATCH), one “write test cases for this endpoint” task and sometimes a live Postman demo.

Which API should I practise on?

Free public fake APIs such as JSONPlaceholder are fine for Postman practice. For a full practice project with forms, logins and reports, use the free QAJobs HRM practice project after creating a free account.

Get manual + API testing jobs every morning – free. Create a free QA Jobs India account for today’s free jobs with direct HR emails, the free Manual Testing course and a practice project.

Create free account →

Already a member? Company Interview Kits and the Courses pack are on Billing to prepare for your next round.

Sources: RFC 9110 – HTTP Semantics (methods, idempotency, status codes) · Postman Learning Center (variables, scripts, Collection Runner, Newman) · JSONPlaceholder guide.

SIGN UP ONCE
Once you sign up, you get all this
Sign up now
  • 100+ fresh QA jobs daily + Direct HR email IDsLive every morning at 9 AM — apply straight to HR
  • Weekly Mega Job Fair800+ QA jobs from India & around the world, every week
  • Certified QA coursesUp to 3 courses included · all 17 for ₹500
  • AI ATS Resume BuilderFree resume points included
  • Full LinkedQA feedEvery post, fully unblurred
  • Complete QA Material libraryInterview Q&A, cheat sheets, templates & roadmaps

Instant activation right after payment · One login for jobs, courses, resume & LinkedQA

Explore more · Free · Updated daily

QA Jobs Hub

Every QA job opening, company profile and career guide on QA Jobs India — India & Global, in one place.

Open QA Jobs Hub
✓ You're subscribed — job alerts arrive daily at 9 AM
Scroll to Top