Join our Newsletter — 33% off our NHI Course

How should security teams govern old APIs that still work but are no longer officially used?

Security teams should treat abandoned APIs as live attack surface until they are proven unused and safely retired. The first priorities are inventory, ownership, authentication review, and traffic monitoring. Any endpoint that still accepts requests should be assessed for data exposure, overbroad permissions, and dependency impact before decommissioning or tighter controls are applied.

Why old APIs stay risky even after the business stops using them

“No longer officially used” does not mean “safe to ignore.” If an endpoint still answers requests, it can still expose data, accept authentication, or sit inside a dependency chain that other systems quietly rely on. That makes legacy APIs a governance problem as much as a technical one: teams need to know what exists, who owns it, what it can still reach, and whether anything meaningful depends on it.

The most important distinction is between an API that is merely inactive in business terms and one that is actually unreachable or disabled. Many organisations discover that old endpoints remain functional because consumers were never fully migrated, integrations were never documented, or a partner and batch job still calls the path. In that state, the endpoint remains part of the attack surface and should be handled as production exposure until retirement is proven, not assumed.

A useful first step is to anchor review on OWASP API Security Top 10 because abandoned endpoints often fail in predictable ways: broken authorisation, excessive data exposure, and weak rate or object controls. That is also where inventory work matters most, since the question is rarely whether an endpoint exists, but whether its current behaviour still matches the original trust model.

Legacy APIs also deserve the same discipline applied to NIST Cybersecurity Framework 2.0, especially the govern, identify, protect, detect, respond, and recover functions. In practice, that means defining ownership, confirming whether the endpoint is still within policy, monitoring for residual use, and deciding whether retirement is safe only after the business and technical dependencies have been mapped.

What should be checked before an old API is retired or locked down

Old APIs should be governed as live assets until the evidence says otherwise. Start with a complete endpoint inventory, then verify ownership, last-known consumers, authentication method, authorisation scope, and whether the API returns sensitive objects or administrative functions. If those questions cannot be answered confidently, the endpoint is not ready for deletion, even if the application team believes it is obsolete.

Traffic evidence is the other control that matters. Logs, gateway telemetry, and upstream dependency records should confirm whether the endpoint is receiving legitimate calls, what patterns are normal, and whether access is coming from known systems or unexpected sources. If the endpoint is still active, teams should examine whether the authentication material, scopes, and permissions are broader than the minimum required for the surviving use case.

For lifecycle and offboarding discipline, NHIMG’s Ultimate Guide to NHIs, Lifecycle Processes for Managing NHIs is a useful reference point because old APIs often persist due to weak discovery, poor ownership, and delayed decommissioning. A complementary view is the broader Ultimate Guide to NHIs, which ties lifecycle control to rotation, visibility, and governance across long-lived machine-facing access paths.

In cases where the endpoint is tied to API keys or other long-lived secrets, the transition plan should include credential review before shutdown. That is especially relevant when teams are unsure whether the API is truly unused, because an old endpoint can become a quiet persistence path if its credentials remain valid after the business has moved on.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST CSF 2.0 GV.OV — Oversight Legacy API governance depends on ownership, policy review, and approved retirement decisions.
ID.AM — Asset Management You need a current inventory of endpoints to know whether an API is truly retired.
DE.CM — Continuous Monitoring Residual traffic and unexpected consumers are the main signals that an 'unused' API is still live.
Recommendation — Assign clear ownership and review obsolete APIs through formal governance before decommissioning. Inventory every exposed API and verify its operational status before changing trust assumptions. Monitor API traffic and alert on any continued access to endpoints marked for retirement.
CIS Controls v8 6.1 — Establish and Maintain an Inventory of Accounts Legacy APIs often persist because service access and ownership are not accurately tracked.
6.3 — Disable Dormant Accounts Unused APIs and their credentials should be disabled once inactivity is proven.
Recommendation — Maintain an authoritative inventory of API consumers, owners, and access paths. Disable dormant API credentials and remove access paths after validating no legitimate dependency remains.
OWASP Non-Human Identity Top 10 NHI-01 — Secrets and Credential Management Old APIs frequently remain risky because their keys, tokens, or secrets stay valid.
Recommendation — Rotate or revoke API secrets as part of the retirement plan for abandoned endpoints.

Practitioner Guidance

What to prioritise: Treat ownership and evidence of use as the deciding factors. If no one can name the owner or prove the last legitimate consumer, the safe default is to keep the endpoint under control, not to assume it is harmless.

What to verify: Confirm that disabling the API will not break batch processes, partner integrations, internal tooling, or fallback workflows. Also verify that authentication and authorisation are still aligned to the smallest surviving use case, because stale permissions are often the real reason an obsolete endpoint remains dangerous.

Common mistake: Removing an endpoint from documentation while leaving it live in the gateway, load balancer, or backend service. The control point changes, but the exposure does not.

Practitioner takeaway: An old API is not retired when the team stops talking about it, it is retired when you can prove it is unused, no longer reachable by any dependency, and no longer carrying meaningful access or data risk.