API security testing, explained in plain English.
APIs carry your data between apps, websites and partners, so attackers go straight for them. This guide explains the main API risks, what a proper API security test checks, and what you should receive at the end.

- The most common serious API flaw is broken authorisation: one user reaching another user’s data by changing an ID.
- You cannot test what you cannot see: start with a complete list of your APIs, including old versions and forgotten ones.
- Scanners find missing settings and known flaws, but access control and business logic need human testers.
- The OWASP API Security Top 10 is the standard reference for the most common API risks.
- Test with accounts for every role, and retest after you fix.
Why APIs need their own testing
An API is the door that apps, websites and partners use to reach your data. A web page shows a user only what the interface allows, but an API will answer anyone who sends it a valid request, so every rule has to be enforced on the server. Attackers know this, and they send requests directly, skipping the screen entirely. A test that only clicks through the app will miss most API problems.
The main API risks
The OWASP API Security Top 10 lists the most common ones. In plain terms:
| Risk | What it means |
|---|---|
| Broken object-level authorisation | Changing an ID in a request returns another customer’s record |
| Broken authentication | Weak logins, tokens that never expire, or tokens that can be guessed or forged |
| Broken property-level authorisation | The API returns or accepts fields the user should not see or change, such as “isAdmin” |
| Unrestricted resource consumption | No limits on requests or sizes, so one user can overload the service or run up costs |
| Broken function-level authorisation | A normal user can call admin functions |
| Unrestricted access to sensitive business flows | Automated abuse of sign-up, booking, voucher or purchase flows |
| Server-side request forgery | An endpoint that fetches a URL can be pointed at internal systems |
| Security misconfiguration | Verbose errors, open cross-origin settings, missing TLS, default settings |
| Improper inventory management | Old, test or undocumented API versions left running |
| Unsafe consumption of APIs | Trusting data from third-party APIs without checking it |
What a good API test covers
- Discovery: build a full list of endpoints from documentation, traffic and the app itself, then look for ones nobody listed.
- Authentication: how users and services prove who they are, and how tokens are issued, expire and are revoked.
- Authorisation on every endpoint: using accounts for each role, check that users can reach only their own data and only the functions their role allows.
- Input handling: injection, unexpected data types, very large inputs and mass assignment, where extra fields in a request change things they should not.
- Limits and abuse: rate limiting, size limits and protection of sensitive flows such as login, password reset and payments.
- Data exposure: whether responses include more data than the client needs.
- Configuration: TLS, cross-origin settings, error messages and old versions still reachable.
Tools and human testers
Automated tools are useful for finding endpoints, spotting missing settings and fuzzing inputs. They struggle with the worst API flaws, because those depend on who should be allowed to see what, and on how your business works. A scanner does not know that customer A must never see customer B’s invoice. That check needs a person with two test accounts. Our guide to vulnerability assessment vs penetration testing explains the difference.
How to prepare
- Share the API definition (for example an OpenAPI or Postman file) if you have one, but also tell testers about anything not in it.
- Provide accounts for every role, ideally two of each, plus any API keys or service credentials in scope.
- Choose the environment: a staging copy that matches production is safest, but it must be realistic.
- Agree scope and contacts in writing, including rate limits testers should respect.
What you should receive
- An executive summary leaders can read in a few minutes.
- Each finding with proof: the request, the response, and the impact in plain terms.
- A severity rating and a specific fix for each finding.
- A retest confirming each issue is closed.
After the test
Fix authorisation issues first, because they expose data directly. Then add checks to your build process so the same flaw is caught earlier next time, and keep your API inventory current. If your API sits behind a web app, see our web application penetration testing checklist, and for timing see how often to run a penetration test. To arrange a test, see our penetration testing service.