SoftwareTestPilot
API TestingPublished: 9 min read

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.

SoftwareTestPilot
QA Editorial Team
Share:XLinkedInWhatsApp
API Test Case Template (Excel Download + Filled Example): API Testing article cover, SoftwareTestPilot.com
API Test Case Template (Excel Download + Filled Example): API Testing article cover, SoftwareTestPilot.com

Download the API test case template

Here is the free template. It opens in Microsoft Excel, Google Sheets and LibreOffice.

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).

ColumnWhat to writeExample
TC IDUnique, never reusedAPI_TC_006
ModuleArea of the APIProducts
TitleWhat the case proves, in a few wordsMissing price fails validation
PriorityP1 = must pass to releaseP1
MethodHTTP methodPOST
EndpointPath after the base URL, with query string/products
HeadersOnly headers that matter; secrets as variablesAuthorization: Bearer {{token}}
Request bodyExact JSON sent{"name":"Template Pen"}
PreconditionsState or earlier case neededAPI_TC_005 passed (logged in)
Expected statusOne status code422
Expected responseNamed fields, values, headersdetails contains "price is required"
Actual status / responseWhat really came back422, Validation failed
ResultPass, Fail, Blocked or Not runPass
Tester, Date, Defect ID, NotesWho ran it, when, linked bugBUG-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 IDRequestExpectedActual (real run)
API_TC_001GET /health200, ok = true200 {"ok":true,...,"version":"v1"}
API_TC_002GET /products?page=1&limit=2200, 2 items, paging fields200, 2 items, total 6
API_TC_003GET /products/999999404 with message404 products 999999 not found
API_TC_004POST /products, no token401, code token_missing401 token_missing
API_TC_005POST /auth/login200, Bearer token200, tokenType Bearer, expiresInSec 900
API_TC_006POST /products, no price422, "price is required"422 ["price is required"]
API_TC_007POST /products, name + price201, new id201 {"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)

  1. List the endpoints. Take them from the API docs or the OpenAPI file. One block of rows per endpoint and method.
  2. Write the happy path first. One valid request per endpoint with the expected 2xx status and the fields that must be in the body.
  3. 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.
  4. Add boundaries. Empty strings, zero, negative numbers, very long text, page = 0, limit above the maximum.
  5. 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

WeakBetterWhy
Expected: "API should work"Expected: 201; body has id (number), name = "Template Pen"Anyone can decide pass or fail
Endpoint: "products API"POST /productsMethod and path are repeatable
Body: "valid data"{"name":"Template Pen","price":5}Exact data, exact result
Headers: real token pastedAuthorization: Bearer {{token}}No secret leaks from a shared file
One row checks 200, 401 and 422Three rowsA 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:

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
  1. Delete an existing product with a valid token: expect a 2xx status.
  2. GET the same id afterwards: expect 404.
  3. Delete without a token: expect 401.
  4. 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

  1. 1One row should test one request with one expected outcome.
  2. 2Always record method, full endpoint, headers and request body so anyone can repeat the call.
  3. 3Expected status code and expected body checks are separate things; write both.
  4. 4Keep tokens and passwords as variables like {{token}}, never paste real secrets into the sheet.
  5. 5Cover negative cases (401, 404, 422) as carefully as the happy path.
  6. 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

  1. 1
  2. 2
    MDN: HTTP response status codes— developer.mozilla.org
  3. 3