API security is the practice of protecting application programming interfaces from abuse, broken access control, leaked data and attacks. It combines strong authentication, authorization on every request, input validation, rate limiting, encryption, an accurate API inventory and monitoring, following OWASP and NIST guidance.
Key takeaways
- Most API breaches come from broken authorization, not exotic flaws — check who can access each object and function on every request.
- Use standard authentication such as OAuth 2.0 and OpenID Connect, short-lived tokens, and TLS on every call.
- Keep an inventory of every API, retire old versions, and log and monitor API traffic for abuse.
Almost every app you use talks to other systems through an API: your shop talks to a payment provider, your phone app talks to a server, and your partners pull data from your platform. Each connection is useful — and each one is a door an attacker can try.
What is API security?
API security is the practice of protecting application programming interfaces so only the right callers can reach the right data and functions. It covers authentication, authorization, encryption, input validation, rate limiting and monitoring.
An API (application programming interface) is a set of rules that lets one piece of software ask another for data or an action. When you check a delivery status, log in with Google, or pay by card in an app, an API does the work behind the screen.
APIs are attractive targets because they often expose more than a web page does. A browser shows you your own orders; an API endpoint may accept any order ID you send it. That difference is why API flaws now cause a large share of serious breaches.
NIST describes the goal plainly in SP 800-228-upd1, Guidelines for API Protection for Cloud-Native Systems: identify risks across the API lifecycle, then apply basic and advanced controls before and during runtime. The guide was published in June 2025 and updated as of March 13, 2026.
Why does API security matter?
APIs carry the data attackers want most: customer records, payment details, health information and internal business data. One unprotected endpoint can expose far more records than one hacked account.
Three trends make the risk worse. First, modern apps are built from many small services that talk to each other constantly, so the number of APIs keeps growing. Second, partners and third-party services connect to your APIs from outside your network. Third, old API versions often stay live long after the team that built them has moved on.
For a small business, the impact is practical: leaked customer data, fraudulent orders, a drained account, or a partner who stops trusting you. Fixing API security early is far cheaper than explaining a breach later.
What is the OWASP API Security Top 10?
The OWASP API Security Top 10 (2023) is the most widely used list of API risks. It ranks ten failure types by prevalence and impact, based on OWASP's analysis of real API incidents.
Authorization failures dominate the list: three of the ten categories are authorization problems. The current edition, from 2023, replaced the 2019 version and remains the latest OWASP lists.
| Risk | What goes wrong | Typical fix |
|---|---|---|
| API1 Broken object level authorization (BOLA) | A user changes an ID and accesses someone else's record | Check ownership on every request |
| API2 Broken authentication | Weak, missing or guessable login and token handling | OAuth 2.0, short-lived tokens, MFA |
| API3 Broken object property level authorization | Extra fields are exposed or can be set by the caller | Allowlist fields; validate input and output |
| API4 Unrestricted resource consumption | No limits on rate, size or cost | Rate limits, quotas, payload limits |
| API5 Broken function level authorization | A normal user calls an admin function | Role checks on every function |
| API6 Unrestricted access to sensitive business flows | Checkout, login or booking flows are automated at scale | Bot detection, limits, anomaly checks |
| API7 Server-side request forgery (SSRF) | The API fetches an attacker-supplied URL | Allowlist URLs; block internal addresses |
| API8 Security misconfiguration | Insecure defaults, verbose errors, loose CORS | Hardened config; minimal error detail |
| API9 Improper inventory management | Old, shadow or undocumented APIs stay live | Full inventory; retire old versions |
| API10 Unsafe consumption of APIs | Third-party responses are trusted without checks | Validate all external data |
Read the full list on the OWASP API Security Project page. The rest of this article explains the risks that cause the most damage.
What is broken object level authorization (BOLA)?
BOLA is the number-one API risk. It happens when an API checks that a user is logged in, but never checks whether that user owns the record they asked for.
A typical example: your app calls /api/orders/1234 to show your order. An attacker changes the ID to 1235 and the API returns another customer's order, because it never verified ownership. The same flaw can allow editing or deleting other people's data.
The fix is simple to state and easy to miss: on every request, check that the authenticated user is allowed to access that specific object. Do it in the API itself, not only in the front end. Test it with a low-privilege account trying to reach another user's records.
How should APIs handle authentication?
Use proven standards instead of inventing your own login scheme. For user-facing APIs, OAuth 2.0 with OpenID Connect is the standard choice. For service-to-service calls, use mutual TLS or short-lived, verifiable tokens.
NIST SP 800-228 recommends authenticating both identities on every call: the calling service and the end user it acts for. Tokens should expire, rotate, and be checked on every request — not only at login.
Avoid these common mistakes: API keys stored in mobile apps or public code, tokens that never expire, passwords sent in URLs, and password-reset flows that can be guessed. An API key is an identifier, not proof of identity.
If your API accepts JSON Web Tokens, you can inspect one safely with our free JWT decoder to check its claims and expiry before you trust it.
Why do APIs need rate limiting and input validation?
Without limits, one caller can flood your API, slow it for everyone, or run up your bill with expensive downstream calls. Rate limits, quotas, timeouts and maximum payload sizes stop that abuse and make denial-of-service attacks far harder.
Input validation matters just as much. Every field a caller sends should be checked against the API schema: the right type, the right length, and only the fields the caller is allowed to set. Reject anything unexpected rather than ignoring it.
Output validation is the other half. An API should return only the fields the caller is allowed to see. Returning a full database record and letting the front end hide fields is a classic way to leak data.
What is API inventory management, and why does it matter?
API inventory means knowing every API you run: production, staging, test, partner and old versions. You cannot protect an API you do not know exists.
Shadow APIs appear when a team ships a new endpoint without telling security, or when a test server is left reachable on the internet. Old versions stay live because a partner still uses them, long after the team stopped patching them.
Keep a single inventory, generated from your API gateway and code rather than from memory. Give every API an owner, a version and a retirement date. When a version is retired, actually turn it off and watch for calls that still arrive.
What does an API gateway do?
An API gateway sits in front of your APIs and enforces shared rules in one place: authentication, rate limiting, logging, TLS and request validation. It does not replace authorization inside each service, but it removes a lot of duplicated work.
NIST SP 800-228 describes three common gateway deployment patterns, with enforcement as close as possible to each service. For a small team, a managed gateway or your cloud provider's gateway is usually the practical choice.
A gateway also gives you one place to log traffic. Log who called what, when, and whether it was allowed — then actually review those logs for unusual patterns, such as one account reading thousands of records at 3 a.m.
API security checklist for small teams
Work through this checklist in order. The first five items stop the most common breaches; the rest build lasting protection.
- Inventory every API, including test and partner endpoints, and assign an owner to each.
- Require TLS on every call, and check your setup with our free SSL checker.
- Use standard authentication and short-lived tokens; never put secrets in client-side code.
- Authorize every request for the specific user, object and action.
- Validate input and output against the schema, and allowlist the fields a caller may set or see.
- Set rate limits, quotas and payload limits for every endpoint.
- Block SSRF by allowlisting outbound URLs and blocking internal addresses.
- Harden configuration: minimal error detail, strict CORS, and security headers — check them with our free security headers checker.
- Log and monitor API calls, and alert on unusual volume or access patterns.
- Test regularly, including authorization tests with a low-privilege account and a review before each major release.
Common API security mistakes to avoid
The same mistakes appear in breach after breach. Avoiding them is most of the job.
- Trusting the client: hiding a button is not access control. The API must check every request.
- Returning full records: sending every database field and hoping the app hides the sensitive ones.
- Long-lived tokens: a token stolen once should stop working quickly, not work for a year.
- Verbose errors: stack traces and database errors that tell an attacker how your system works.
- No inventory: an old version or test server that nobody owns and nobody patches.
- Treating third-party data as safe: data from another API needs the same validation as data from a user.
For a wider starting point, our small business cybersecurity checklist covers API controls alongside backups, updates and device security.
The bottom line
API security is mostly discipline: know every API you run, authenticate every caller, authorize every request, validate every field, and limit every call. The OWASP Top 10 tells you what goes wrong; NIST SP 800-228 tells you how to build the controls.
Start with the checklist above, beginning with your inventory and your authorization checks. You can verify the basics in minutes with the free SSL checker.
Also run the free security headers checker to confirm your API responses are not leaking information through headers.
Frequently asked questions
What is API security in simple terms?
API security means making sure only the right people and systems can use your APIs, and only for the right data and actions. It covers login, permissions, encryption, limits on how often an API can be called, and watching for abuse.
What is the OWASP API Security Top 10?
It is OWASP's ranked list of the ten most critical API risks, updated in 2023. Broken object level authorization is number one, followed by broken authentication and broken object property level authorization. It is an awareness document, not a certification standard.
What is the difference between API security and web application security?
Web application security protects the pages and forms people see in a browser. API security protects the machine-to-machine interfaces behind them, which often expose far more data and functions and are called directly by attackers.
Is an API key enough to secure an API?
No. An API key identifies a caller but is not strong authentication, and it says nothing about what that caller may access. Use OAuth 2.0 or mutual TLS for authentication, and check authorization for the specific user, object and action on every request.
What is BOLA in API security?
BOLA, broken object level authorization, happens when an API lets a user change an ID in a request and read or change someone else's record. For example, changing order 1234 to order 1235 in a URL and seeing another customer's order.
How do I test API security?
Start with an inventory and the API schema, then test authorization for every endpoint with a low-privilege account, try unexpected inputs, check rate limits, and review error messages for leaked data. Automated API testing tools and a penetration test add depth.
Does HTTPS alone make an API secure?
No. HTTPS encrypts traffic in transit, which is essential, but it does not check who the caller is, what they may access, or whether the request is abusive. You need authentication, authorization, validation and limits as well.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against the OWASP API Security Top 10 (2023) and NIST SP 800-228-upd1, published June 2025 with updates as of March 13, 2026.
How we write and fact-check →