API Test Case Template (Excel Download + Filled Example)
Free API test case template in Excel with 18 columns, dropdowns and 7 filled rows from a real API. Learn what each column means and how to write good API test cases.

Download the API test case template
Here is the free template. It opens in Microsoft Excel, Google Sheets and LibreOffice.
- Download API test case template (Excel, .xlsx): three sheets: Read me, a blank Test Cases sheet with 50 numbered rows, and a filled example.
- Download the filled example as CSV: handy for importing into a test management tool.
What is built in: frozen header row, filters on every column, dropdowns for Priority (P1-P3), Method (GET, POST, PUT, PATCH, DELETE) and Result (Pass, Fail, Blocked, Not run), and green/red colouring for Pass and Fail. No macros, no sign-up.
What each column means
An API test case differs from a UI test case: instead of clicks you describe one HTTP request, and instead of "screen shows X" you check a status code and fields in the response. That is why the template has request columns (method, endpoint, headers, body) and response columns (expected status, expected response).
| Column | What to write | Example |
|---|---|---|
| TC ID | Unique, never reused | API_TC_006 |
| Module | Area of the API | Products |
| Title | What the case proves, in a few words | Missing price fails validation |
| Priority | P1 = must pass to release | P1 |
| Method | HTTP method | POST |
| Endpoint | Path after the base URL, with query string | /products |
| Headers | Only headers that matter; secrets as variables | Authorization: Bearer {{token}} |
| Request body | Exact JSON sent | {"name":"Template Pen"} |
| Preconditions | State or earlier case needed | API_TC_005 passed (logged in) |
| Expected status | One status code | 422 |
| Expected response | Named fields, values, headers | details contains "price is required" |
| Actual status / response | What really came back | 422, Validation failed |
| Result | Pass, Fail, Blocked or Not run | Pass |
| Tester, Date, Defect ID, Notes | Who ran it, when, linked bug | BUG-214 |
If you also need the general rules for writing any test case (atomic, independent, traceable), see the test case template and writing guide.
Filled example: 7 test cases from a real API
The "Example - Practice API" sheet tests a small products API. We sent every request below to the free practice API behind the SoftwareTestPilot API Playground on 6 November 2026 and copied the real responses into the sheet. Ids you get may differ.
| TC ID | Request | Expected | Actual (real run) |
|---|---|---|---|
| API_TC_001 | GET /health | 200, ok = true | 200 {"ok":true,...,"version":"v1"} |
| API_TC_002 | GET /products?page=1&limit=2 | 200, 2 items, paging fields | 200, 2 items, total 6 |
| API_TC_003 | GET /products/999999 | 404 with message | 404 products 999999 not found |
| API_TC_004 | POST /products, no token | 401, code token_missing | 401 token_missing |
| API_TC_005 | POST /auth/login | 200, Bearer token | 200, tokenType Bearer, expiresInSec 900 |
| API_TC_006 | POST /products, no price | 422, "price is required" | 422 ["price is required"] |
| API_TC_007 | POST /products, name + price | 201, new id | 201 {"name":"Template Pen","price":5,"id":7} |
Notice the mix: three happy paths, one "not found", one authentication error and one validation error. That ratio is deliberate; most real API bugs hide in the error paths.
How to write API test cases with this template (5 steps)
- List the endpoints. Take them from the API docs or the OpenAPI file. One block of rows per endpoint and method.
- Write the happy path first. One valid request per endpoint with the expected 2xx status and the fields that must be in the body.
- Add the error rows. For each endpoint ask: no token (401), wrong role (403), unknown id (404), missing or invalid field (400 or 422), duplicate (409). The 401 vs 403 guide explains which one to expect.
- Add boundaries. Empty strings, zero, negative numbers, very long text, page = 0, limit above the maximum.
- Run, record, link. Fill Actual status and response, choose a Result, and add a Defect ID to every Fail.
For the full list of test types to cover (functional, contract, security, performance and more), see types of API testing.
Good vs weak API test case rows
| Weak | Better | Why |
|---|---|---|
| Expected: "API should work" | Expected: 201; body has id (number), name = "Template Pen" | Anyone can decide pass or fail |
| Endpoint: "products API" | POST /products | Method and path are repeatable |
| Body: "valid data" | {"name":"Template Pen","price":5} | Exact data, exact result |
| Headers: real token pasted | Authorization: Bearer {{token}} | No secret leaks from a shared file |
| One row checks 200, 401 and 422 | Three rows | A failure points to one cause |
When Excel is enough, and when to move on
A spreadsheet is a good fit when you are learning, the API is small, or a client asks for a test case document. It becomes painful when you have hundreds of cases, many testers editing at once, or you need history of every run.
Two natural next steps:
- Postman collections: each row becomes a saved request with test scripts. Start with the Postman API testing tutorial.
- Code: stable P1 rows become automated tests that run in CI. The Playwright API testing guide automates four of the cases above.
Keep the TC IDs when you move. Naming a Postman request or code test "API_TC_006" keeps the link back to the sheet.
Practice exercise
Open the blank Test Cases sheet and write four rows for DELETE /products/{id} on the practice API in the API Playground. Then run them and fill in the actual results.
Suggested answer
- Delete an existing product with a valid token: expect a 2xx status.
- GET the same id afterwards: expect 404.
- Delete without a token: expect 401.
- Delete an id that does not exist: expect 404.
Compare your actual results with these expectations. If a status differs, write down exactly what came back; that is how real defects get reported.
Next step
Download the template, fill five rows for any public API, then try them for real with how to test a REST API online. Want feedback on your test cases? Share a few rows (with secrets removed) in the QA Community.
Spreadsheet tip: the dropdowns use Excel's data validation; Microsoft's guide shows how to add your own values.
Key takeaways
- 1One row should test one request with one expected outcome.
- 2Always record method, full endpoint, headers and request body so anyone can repeat the call.
- 3Expected status code and expected body checks are separate things; write both.
- 4Keep tokens and passwords as variables like {{token}}, never paste real secrets into the sheet.
- 5Cover negative cases (401, 404, 422) as carefully as the happy path.
- 6Move stable rows into automated tests once the API stops changing.
Common mistakes to avoid
- Writing 'Verify API works' as the expected result instead of a status code and named fields.
- Putting several requests with different expected statuses into one test case.
- Leaving out the request body, so nobody can repeat the test.
- Pasting live tokens into a shared spreadsheet.
- Only testing 200 responses and skipping authentication and validation errors.
References
- 1RFC 9110: HTTP Semantics (status codes)— rfc-editor.org
- 2MDN: HTTP response status codes— developer.mozilla.org
- 3Microsoft Support: Apply data validation to cells— support.microsoft.com
