Join our Newsletter — 33% off our NHI Course

How should organisations govern shadow APIs and deprecated endpoints?

They should treat them as unmanaged access paths that require ownership, inventory, and retirement, not as harmless leftovers. If an endpoint is still reachable, it is still part of the attack surface, regardless of whether the business considers it obsolete. Governance should assign accountability and remove access, routing, and credentials when the API is no longer needed.

What shadow APIs and deprecated endpoints really are

Shadow APIs and deprecated endpoints are not merely stale documentation or forgotten code paths. They are live or partially live interfaces that may still accept requests, expose data, trigger functions, or authenticate callers even after the organisation has stopped treating them as supported. Governance starts with recognising that lifecycle status and actual reachability are not the same thing.

That distinction matters because API retirement is often gradual: traffic may persist through old clients, partner integrations, mobile apps, scripts, or internal automations long after the intended cutover. A deprecated endpoint that still resolves, or a shadow API that was never formally registered, creates a control gap between what teams believe exists and what an attacker can still enumerate and use.

For that reason, the right governance question is not “is this API still in the roadmap?” but “is this access path still reachable, and who owns its removal?” When ownership is unclear, the endpoint tends to become an unmanaged exception, which is exactly the condition that allows access paths to linger in production.

How organisations should govern them across the lifecycle

Governance should treat every shadow API and deprecated endpoint as an asset with an owner, an inventory record, and a retirement plan. That means classifying the endpoint, identifying the business service it supports, mapping who can call it, and defining the date or trigger on which it will be decommissioned. If no owner can be named, the endpoint is already outside good governance.

Inventory is the practical starting point because you cannot retire what you cannot see. Teams should reconcile API gateways, reverse proxies, code repositories, runtime logs, service catalogs, and external discovery results so the organisation knows which endpoints are documented, which are deprecated, and which are simply unknown. OWASP API Security Top 10 is a useful reference point because it centres the risks of broken authorisation, exposed endpoints, and other API-specific failures.

Retirement should then be executed as a controlled change, not a casual cleanup task. The endpoint should be removed from routing, disabled at the gateway, blocked from new authentication paths, and monitored for residual traffic before any final shutdown. If clients still depend on it, the answer is usually not to leave it exposed indefinitely, but to publish a migration path, set an end-of-life date, and enforce it.

What good governance looks like in practice

Good governance makes deprecated access impossible to ignore. That usually means documenting deprecation windows, assigning explicit service ownership, tracking consumer dependencies, and requiring evidence that old routes were actually removed rather than simply abandoned. It also means retiring credentials, tokens, keys, certificates, and integration secrets tied to the endpoint, because an unreachable interface is not the same as a harmless one if the underlying trust material remains valid.

At the technical layer, organisations should align this work with NIST Cybersecurity Framework 2.0 by identifying the asset, protecting the access path, detecting residual use, and recovering cleanly after shutdown. The framework is broad, but that breadth is useful here because API retirement cuts across asset management, access control, logging, and response.

Where APIs expose sensitive data or privileged functions, the governance bar should be higher still. Keep the retirement record, the consumer inventory, the removal ticket, and the verification evidence so you can prove that the old endpoint is no longer part of the attack surface. That evidence becomes especially important when a deprecated endpoint is removed from documentation but not yet from network reachability.

Risk and Threat Considerations

Shadow APIs and deprecated endpoints are attractive because they often sit outside normal review cycles while still being reachable from trusted networks or known client paths. Attackers look for exactly this kind of discrepancy: functionality that operations assume is gone, but which still accepts requests, exposes data, or performs actions.

Failure mechanism: The organisation retires the feature in process but not in runtime, leaving routing, authentication material, or backend handlers active long after the business thinks the API is dead. That gap can enable enumeration, unauthorised access, data exposure, or abuse of legacy business logic.

Impact: The practical outcome is expanded attack surface, harder incident containment, and a false sense of security around decommissioned functionality. A deprecated endpoint can become the easiest path for data theft or privilege misuse precisely because defenders stop watching it.

Standards & Framework Alignment

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

OWASP API Security Top 10 addresses the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP API Security Top 10 API9 — Improper Inventory Management Shadow APIs require discovery and inventory to govern unknown or unmanaged endpoints.
API5 — Broken Function Level Authorization Deprecated endpoints can still expose privileged functions if old access paths remain reachable.
Recommendation — Inventory every API endpoint and remove unknown or stale routes from production exposure. Revalidate function-level access before and after deprecation to prevent leftover privilege exposure.
NIST CSF 2.0 ID.AM-01 — Physical devices and systems are inventoried Endpoint governance depends on maintaining an accurate inventory of active interfaces and assets.
PR.AA-05 — Access permissions and authorizations are managed, incorporating the principles of least privilege and separation of duties Retiring an endpoint requires removing remaining access paths and privileges tied to it.
PR.PS-05 — Deployment of software and systems is managed API retirement is a controlled lifecycle change that must be managed and verified.
Recommendation — Maintain a complete inventory of live, deprecated, and shadow API surfaces. Revoke access paths and privileges when an API is no longer needed. Manage endpoint deprecation as a controlled deployment change with verification.

Practitioner Guidance

What to prioritise: Treat any undocumented or deprecated endpoint as a live production access path until you can prove otherwise. Prioritise ownership assignment, traffic discovery, and dependency mapping before debating whether the endpoint is “really” obsolete.

What to verify: Confirm three things before closure, the endpoint no longer receives legitimate traffic, all routes and aliases are removed, and any credentials or certificates that can still reach it have been revoked or rotated. If any one of those remains true, the retirement is incomplete.

Practitioner takeaway: Governance succeeds when retirement is enforced as a technical and operational shutdown, not recorded as a paperwork decision after the endpoint has already been forgotten.