API Evangelist API Evangelist
Guidance
API Learnings
APIs
API Governance
API Solutions
API Discovery
API Building Blocks
API Evangelist LLC

Compliance

Meeting legal and regulatory requirements through API design and operations

Compliance is where the law meets API operations, and it’s one of the places APIs quietly prove their worth. Every organization of any size operates under a web of legal and regulatory requirements — PCI-DSS for payments, HIPAA for health data, GDPR and CCPA for privacy, PSD2 for banking, FHIR for healthcare interoperability, SOC 2 and FedRAMP for trust and government work. Compliance is the discipline of meeting those requirements and being able to prove you’ve met them. And what I’ve watched over fifteen years is that APIs, done well, turn compliance from a periodic, painful, manual audit scramble into something closer to a continuous, observable, automatable property of how you operate. That’s the throughline: compliance is an operational concern, and API operations are increasingly where compliance is actually delivered.

The relationship between governance and compliance is the first thing to get straight, because they’re constantly conflated. Governance is the internal discipline — the standards, policies, and practices you impose on yourself to run your APIs well. Compliance is proving adherence to external requirements imposed by regulators and law. They’re deeply related: good governance is what makes compliance achievable, because the same machine-readable artifacts, design rules, audit trails, and lifecycle discipline you build for governance are exactly what you need to demonstrate compliance to an outside party. If governance is keeping your own house in order, compliance is being able to show the inspector that it’s in order. APIs are the mechanism that lets you do both with the same infrastructure rather than maintaining a separate, bolted-on compliance apparatus.

Regulation has increasingly become a driver of API adoption, not just a constraint on it, and this is one of the most important operational realities. I started writing about API-driven regulation as early as 2011, proposing that APIs could be a self-service regulatory framework — a way for industry to demonstrate compliance through standardized data formats and APIs, and for regulators to verify it. By 2015 I was tracking how government was shifting from merely defining standards to actively mandating APIs. PSD2 in European banking is the clearest case: the regulation effectively required banks to expose APIs, mandated strong authentication, and prohibited the screen-scraping that had been the insecure norm. Open banking, the CFPB’s consumer financial data rules, and FHIR in healthcare all follow the same pattern — regulation that doesn’t just permit APIs but requires them, because the API is the most effective mechanism for delivering the access, transparency, and auditability the regulation demands. When I look at the industries most in need of regulation — payments, healthcare, advertising — the common thread is that API regulation is really a lever for standardization and observability.

PSD2 taught me the most about the operational complexity of compliance, and I worked through it using what I called an API Transit map — a subway-map analogy for navigating a regulatory landscape. A regulation like PSD2 doesn’t map to a single API concern; it touches definition, design, deployment, management, security, monitoring, testing, terms of service, and privacy all at once, and it has to be tracked across many jurisdictions and many individual banks. The subway map was a way to overlay the regulation onto the implementation reality — to make compliance navigable across all the lines and stops it actually runs through. The operational insight was that compliance isn’t a checkbox; it’s a layer that cuts across your entire API lifecycle, and you need a way to see it as such. Machine-readable artifacts — OpenAPI, JSON Schema, APIs.json — are what let you track compliance across that whole surface rather than reconstructing it by hand every audit cycle.

GDPR made the operational stakes concrete for everyone, not just regulated industries. When GDPR arrived, it forced organizations to ask hard questions about their own data — and most discovered they couldn’t answer them. You can’t comply with a right-to-be-forgotten request or a data-inventory requirement if you don’t know where your data is, and the database-centric, undocumented sprawl most organizations were sitting on made that nearly impossible. I wrote that GDPR was forcing us to ask questions about our data that we should have been asking all along, and that API governance was the path to being able to answer them. Privacy-by-design, data inventory, the ability to expose and control data flows through a managed API layer — these are operational capabilities, and GDPR turned them from nice-to-haves into legal obligations. The same was true of HIPAA, where the patient’s right to access their personal health information under 164.502 became, in practice, a case for patient-directed APIs — the API as the literal mechanism for delivering a legal right.

The most exciting development, and where compliance and operations fuse most tightly, is compliance as code — building compliance enforcement directly into the API lifecycle and the CI/CD pipeline. The same Spectral and governance rules that enforce design standards can enforce compliance requirements: that every API handling personal data declares the right security schemes, that sensitive fields are flagged, that required terms and privacy metadata are present. You can roll these rules out by domain, by team, by severity, prioritizing the security and compliance rules first, and enforce them automatically on every change rather than discovering violations in an annual audit. Cloudflare’s use of OpenAPI to standardize the redaction of audit log data at the gateway layer is a perfect example — compliance behavior (redacting sensitive data from audit logs) expressed as machine-readable configuration, applied consistently and automatically. This is the shift from compliance theater — the binder of policies nobody follows — to continuous, enforced, provable compliance baked into operations.

Audit trails and observability are the operational backbone of compliance, because compliance ultimately requires proof. You can’t demonstrate that you’ve controlled access to regulated data unless you logged who accessed what and when. The logging, monitoring, and audit infrastructure that API operations produce is compliance infrastructure — it’s how you reconstruct what happened, prove adherence, and respond to a regulator’s questions. I’ve argued that even algorithms that affect people’s lives should be opened up with APIs for auditing, so that regulators and researchers can validate the assertions made about them. The same instinct applies across compliance: the API management layer, with its keys, logs, and observability, is where you can actually see and prove what’s happening with regulated data and operations. Compliance without observability is just hope; APIs make it auditable.

Cross-border and regional compliance is the operational dimension that keeps growing. Data residency, sovereignty, and jurisdictional restrictions mean that where your data lives and flows is itself a compliance question, and APIs — with regional deployment, geographic routing, and OAuth-scoped access controls — are how you manage that complexity. AWS built a real strategic advantage out of helping customers navigate cloud compliance, mapping which services are in scope for which certifications and regulations, because compliance navigation at scale is genuinely hard and genuinely valuable. The operational reality is that a global API operation is also a multi-jurisdictional compliance operation, and the API layer is where you implement the controls that keep data flows legal across borders.

The honest framing is that compliance, like so much else, is both a burden and an opportunity, and APIs determine which one it becomes. Done as an afterthought, compliance is a recurring tax — a scramble to assemble evidence, a drag on velocity, a source of risk. Built into API operations through governance rules, machine-readable artifacts, audit trails, and continuous enforcement, compliance becomes a property of the system rather than a periodic event, and demonstrable compliance becomes a competitive advantage that earns enterprise and government trust. The terms of service and privacy policies become machine-readable artifacts rather than buried legalese. The regulation becomes navigable rather than overwhelming. And the same operational discipline that makes your APIs well-governed makes them compliant, because in the end compliance is just governance with an external auditor and a legal consequence attached. The organizations that internalize that — that treat compliance as an operational design concern from day one rather than a legal problem to be solved at the end — are the ones that turn the heaviest regulatory requirements into a reason to operate their APIs well.

References