Use this API testing checklist to verify requests, inspect responses, diagnose failures, and test authentication without exposing credentials. It is designed for repeat use during development, releases, integrations, and production incidents.
Overview
Testing an API request is more than confirming that a URL returns data. A reliable check validates the complete exchange: the endpoint, HTTP method, query parameters, headers, request body, authentication, response status, response headers, response format, and timing. Looking at only one part can lead to misleading conclusions. For example, a request may return a successful status while containing an error object, or it may fail because of an expired token even though the URL and JSON body are correct.
Start by writing down the request before changing anything. Record the environment, method, full URL without secrets, parameters, required headers, body shape, expected status code, and expected response fields. This simple worksheet gives you a baseline for comparing a working request with a failed one.
- Environment: local, test, staging, or production.
- Method: GET, POST, PUT, PATCH, DELETE, or another method supported by the API.
- Endpoint: scheme, host, path, and API version.
- Parameters: query-string values and path variables, including their names and encoding.
- Headers: especially
Content-Type,Accept, authorization, request IDs, and conditional-request headers. - Body: valid JSON or another format required by the endpoint.
- Expected result: status code, response shape, side effect, and acceptable response time.
Use a trusted API client, command-line utility, browser-based developer tool, or automated test suite according to the sensitivity of the request. Online developer tools can be useful for inspecting JSON, decoding non-secret Base64 values, or previewing request data, but never paste live passwords, private keys, session cookies, or production tokens into a third-party utility.
Checklist by scenario
1. Testing a new API request
- Confirm the base URL and endpoint path. Check spelling, capitalization where relevant, API version, and trailing slashes.
- Confirm the HTTP method. A read operation that requires GET may reject a POST, while a create operation may require POST rather than PUT.
- Test path parameters separately from query parameters. Make sure identifiers are placed in the correct part of the URL and URL-encoded when necessary.
- Set
Acceptto the response format you can process. For a JSON request body, setContent-Type: application/jsonunless the API specifies another media type. - Validate the body before sending it. Check commas, quotes, brackets, data types, required fields, and field names. A JSON formatter or validator can quickly reveal syntax errors.
- Send the smallest valid request first. Add optional fields only after the required request succeeds.
- Save the request definition, but replace secrets with environment variables or placeholders before sharing it.
2. Diagnosing a failed response
Compare the failed request with the API documentation and, if available, a known-good request. Change one variable at a time so you can identify the cause rather than creating several possible causes at once.
| Status | Typical meaning | What to check |
|---|---|---|
| 2xx | The server accepted or completed the request. | Confirm the response body, side effect, and business-level error fields. A successful HTTP status does not guarantee the result matches your application’s expectations. |
| 3xx | The request involves redirection or cache validation. | Inspect the Location header, redirect behavior, scheme changes, and whether your client follows redirects. |
| 400 | The request is malformed or invalid. | Check JSON syntax, required fields, parameter names, data types, and validation messages. |
| 401 | Authentication is missing or not accepted. | Check the authorization scheme, token placement, expiry, audience, issuer, and environment. |
| 403 | The server understood the request but will not authorize it. | Check permissions, scopes, roles, resource ownership, and whether the credential is allowed to use the endpoint. |
| 404 | The resource or route was not found. | Check the host, path, API version, identifier, and whether the resource exists in the selected environment. |
| 405 | The method is not supported for the route. | Review the endpoint’s allowed methods and confirm that a proxy or client has not changed the method. |
| 409 | The request conflicts with current resource state. | Look for duplicate creation, version conflicts, locked resources, or an invalid state transition. |
| 429 | The client has exceeded a limit. | Inspect rate-limit headers, retry guidance, request bursts, pagination, and backoff behavior. |
| 5xx | The server or an upstream dependency encountered an error. | Record the time, request ID, endpoint, and reproducible input. Retry only when the operation is safe to repeat. |
3. Testing authentication
Authentication testing should verify both valid and invalid credentials. Begin with a dedicated test account and the least privilege needed for the request. Confirm that the credential is sent in the format the API expects, such as a bearer token in the Authorization header, an API key in a specified header, or a signed request.
- Test a valid credential and confirm the expected access.
- Test a missing credential and record whether the API returns the documented failure behavior.
- Test an expired, revoked, malformed, or wrong-environment credential where safe.
- Test insufficient permissions against a protected resource.
- Confirm that secrets are redacted from logs, screenshots, exported collections, and error reports.
- Check token audience, issuer, scope, and clock assumptions when using signed tokens.
A JWT decoder can help inspect the readable header and payload structure during local debugging, but decoding does not validate a token’s signature or make it safe to share. Treat every token as a secret unless you have confirmed that it contains no sensitive information and is not usable for authentication.
4. Testing from a browser application
If an API works in a command-line client but fails in a browser, inspect the browser’s network panel and console. The issue may be a cross-origin request policy, a failed preflight request, missing allowed headers, or credentials handling. Check the browser’s actual request rather than assuming it matches the request created in another tool.
For a preflighted request, inspect the OPTIONS exchange and compare the requested method and headers with the server’s allowed methods and headers. Do not treat disabling browser security controls as a fix; resolve the server, proxy, or deployment configuration instead.
5. Testing rate limits and retries
Use a controlled test environment or a very small request volume. Verify how the API communicates limits, whether it supplies a retry interval, and which failures are safe to retry. GET requests are often easier to repeat safely, while a POST that creates a resource may need an idempotency mechanism or a duplicate-protection strategy. Test exponential backoff with a cap, and avoid synchronized retry loops that increase load during an incident.
What to double-check
Request construction
Check for invisible differences between tools: a missing slash, an automatically added header, a different URL encoding rule, a newline in a token, or a body sent as form data instead of JSON. Compare the raw request when possible. Confirm that numeric, Boolean, null, and string values have the types the API expects.
Response interpretation
Read the response headers as well as the body. Content type, cache directives, correlation IDs, pagination links, retry hints, and server timing information can explain behavior that is not visible in the payload. Validate the response against the contract your application uses, including required fields, nullable fields, arrays, nested objects, and error formats.
Environment and DNS
Make sure the client is calling the intended host. A local, staging, or production hostname can look similar while using different data and credentials. If a custom API hostname was recently changed, review DNS resolution, TLS coverage, proxy routing, and the endpoint’s health independently. Keep domain and DNS changes separate from application changes when troubleshooting so the scope remains clear.
Observability and reproduction
Capture a sanitized reproduction containing the timestamp, environment, method, path, status, safe headers, request ID, and relevant response body. Avoid recording authorization values or personal data. If the request creates or changes data, identify whether it ran successfully before a client timeout; a timeout does not always mean the server did nothing.
Common mistakes
- Testing only the happy path: Include missing fields, invalid types, unauthorized access, duplicate requests, empty results, and upstream failures.
- Confusing authentication with authorization: A valid identity may still lack permission for a resource or operation.
- Copying secrets into tickets: Redact tokens, cookies, keys, passwords, and sensitive payload values before sharing diagnostics.
- Changing several variables at once: Isolate method, URL, headers, parameters, and body changes so the result is attributable.
- Assuming a status code tells the whole story: Validate the payload, side effect, response headers, and application-level errors.
- Retrying every failure: Repeated retries can worsen rate limits or duplicate state-changing operations.
- Ignoring client differences: A browser, API client, command-line tool, and server-side library may handle redirects, cookies, compression, and CORS differently.
- Using production data for experimentation: Prefer synthetic records and restricted credentials, especially for destructive or high-volume tests.
When to revisit
Keep this checklist with the integration’s test plan and use it whenever the underlying inputs change. Revisit it before a release, after an API version change, when authentication or permissions are redesigned, after moving between environments, and whenever a proxy, CDN, DNS record, SSL configuration, or hosting platform changes. It is also useful before seasonal planning cycles when request volume, traffic patterns, or third-party dependencies may change.
During a production incident, start with a single sanitized reproduction and compare it with the last known-good request. After the incident, turn the finding into a regression test: preserve the failing input, expected status, safe response assertions, and retry or authentication behavior. Review the checklist when your API testing tools change as well; exported collections, environment variables, masking rules, and automation defaults can alter how requests are sent.
For related website infrastructure work, pair API checks with a website performance and technical SEO checklist, and review the JSON, Base64, JWT, and Markdown developer tools guide for safe inspection workflows. Before changing an API hostname, see the domain and DNS setup guide.
Action step: Copy the request worksheet, remove all secrets, run the smallest valid request, record the complete response, and then test one failure condition at a time. That sequence gives you a dependable baseline for the next integration, release, or debugging session.