Architecture
Healthcare API Architecture for Partners, Patients, and Regulators
Healthcare APIs carry obligations ordinary APIs do not: patient access rights, payer and provider mandates, consent, and audit. We design API layers that meet those obligations while staying usable for the developers who build on them.
At a glance
- Standards & integrations
- EHR FHIR APIs (Epic, Oracle Health, MEDITECH, athenahealth)SMART on FHIR app launchFHIR Bulk Data ($export)Da Vinci implementation guides (PDex, CRD, DTR, PAS)CARIN Blue ButtonTEFCA and QHIN-facing services
- Typical deliverables
API product map with audiences, owners, and obligations
OpenAPI specifications and FHIR profiles with examples
SMART scope model and authorization server configuration
Gateway policies for quotas, throttling, and validation
Healthcare API architecture: overview
An API strategy in healthcare has to serve several audiences at once. Internal product teams want fast, task-shaped endpoints. Partners and app developers want standards they already know. Regulators, through ONC certification criteria and CMS interoperability rules, expect specific FHIR-based capabilities. Trying to satisfy all three with one undifferentiated API layer usually produces something that serves none of them well.
We separate the concerns. Standards-facing APIs follow FHIR R4 and the relevant implementation guides, such as US Core, CARIN Blue Button, or Da Vinci, so external developers and certification testing see what they expect. Internal APIs can be shaped around product workflows and composed from domain services, with a backend-for-frontend layer where mobile and web clients need different payloads. A gateway sits in front of both, enforcing authentication, rate limits, and audit consistently.
Authorization is where healthcare APIs differ most from consumer ones. SMART on FHIR defines how apps request scopes such as patient/Observation.rs, how patient context is launched, and how tokens are issued. Consent and sensitive-data rules may further restrict what an authorized app can see. We design those layers explicitly, including what happens when a patient revokes access, so the API enforces policy instead of trusting each client to behave.
Engineering challenges in healthcare API architecture
01FHIR as a wrapper on a non-FHIR model
Teams bolt a FHIR facade on a legacy schema, and searches that seem simple, such as Observation by code and date, become slow or incorrect because the underlying model was never designed for them.
02Overbroad scopes and tokens
Apps receive user-level access to everything when they need read access to one resource type. A leaked token then exposes far more than the feature required.
03Breaking changes for partners
A field rename or changed search behavior breaks an integration a partner built two years ago. Without versioning and deprecation policy, every change becomes a negotiation.
04Bulk access that harms clinical traffic
Population-level exports run on the same infrastructure as clinician-facing reads. A large Bulk FHIR job slows the patient chart for everyone.
05Regulatory API deadlines
CMS and ONC rules set specific API capabilities and dates. Teams discover late that their architecture cannot support required implementation guides or patient-level authorization.
Technical capabilities
What our healthcare API architecture work covers
API layering and product boundaries
We separate standards-facing FHIR APIs, internal domain APIs, and backend-for-frontend layers, with clear ownership for each. This keeps regulatory surface area stable while product teams iterate.
FHIR profile and IG alignment
We map your data to US Core and other applicable implementation guides, write CapabilityStatements that reflect reality, and validate responses against profiles in CI.
SMART on FHIR authorization
We design authorization servers or integrate existing ones to support SMART App Launch, standalone patient launch, and backend services authorization with signed JWT client assertions. Scopes are granular and tied to resource types and actions.
Gateway policy and rate limiting
API gateways enforce token validation, per-client quotas, spike arrest, and request size limits. Separate quota classes protect clinician-facing traffic from bulk and partner workloads.
Versioning and deprecation
We define how versions are expressed, how long old versions live, and how partners are notified. Contract tests run against published examples so a breaking change cannot ship unnoticed.
Bulk data and asynchronous patterns
FHIR Bulk Data export runs on isolated workers with output to secure object storage and expiring signed URLs. Long-running operations use the async request pattern rather than holding connections open.
Developer experience
Sandboxes with synthetic data, interactive documentation, example requests, and clear error responses using OperationOutcome reduce integration support load.
Software architecture
Reference architecture for healthcare API architecture
A gateway-fronted API platform where standards-facing and internal APIs share security and audit but evolve on different schedules.
- Clients
- Patient apps
- Partner systems
- Internal web and mobile
- Payer and provider exchanges
- Gateway and auth
- API gateway
- SMART authorization server
- Consent decision point
- Rate limiting
- API products
- FHIR R4 API
- Bulk Data export
- Domain REST APIs
- Backend-for-frontend
- Domain and data
- Domain services
- FHIR repository
- Terminology service
- Audit store
Technology stack for healthcare API architecture
- FHIR servers
- HAPI FHIRMicrosoft FHIR ServerSmile CDRManaged cloud FHIR services
- Gateways
- KongApigeeAzure API ManagementAmazon API Gateway
- Identity
- KeycloakOktaMicrosoft Entra IDSMART on FHIR libraries
- Design and testing
- OpenAPI 3.1FHIR ValidatorInferno test kitPactPostman
- Alternative styles
- GraphQL (internal use)gRPC (service-to-service)AsyncAPI
Security & compliance
Security and compliance considerations for healthcare API architecture
What regulations require
- ONC's certification criterion at 45 CFR 170.315(g)(10) requires certified health IT to offer standardized FHIR APIs for patient and population services, including SMART authorization and Bulk Data export.
- The CMS Interoperability and Patient Access final rule (CMS-9115-F) requires impacted payers to provide a FHIR-based Patient Access API, and the CMS Interoperability and Prior Authorization final rule (CMS-0057-F) adds Provider Access, Payer-to-Payer, and Prior Authorization APIs with compliance dates mostly beginning in January 2027.
- The 21st Century Cures Act and ONC's information blocking regulations (45 CFR Part 171) restrict practices that interfere with access, exchange, or use of electronic health information, subject to defined exceptions such as security and privacy.
- 45 CFR 164.312(d) requires procedures to verify that a person or entity seeking access to ePHI is the one claimed, which applies to API clients and the users they act for.
Recommended engineering practices
- Follow the OWASP API Security Top 10, with particular attention to broken object-level authorization on resource IDs.
- Use short-lived access tokens, refresh token rotation, and asymmetric client authentication for backend services.
- Enforce patient compartment and consent checks server-side on every request, not only at token issuance.
- Log every API access with client, user, patient, resource, and purpose to an append-only audit store, without logging response bodies.
- Run automated authorization tests that attempt cross-patient and cross-tenant access on every build.
Regulatory summaries are educational, not legal advice. HIPAA compliance is an organizational program; software can support safeguards but cannot by itself make an organization compliant. Systems that handle PHI need their own risk analysis, vendor evaluation, and Business Associate Agreements before deployment.
Integration capabilities
Integrations we engineer for healthcare API architecture
- EHR FHIR APIs (Epic, Oracle Health, MEDITECH, athenahealth)
- SMART on FHIR app launch
- FHIR Bulk Data ($export)
- Da Vinci implementation guides (PDex, CRD, DTR, PAS)
- CARIN Blue Button
- TEFCA and QHIN-facing services
- Terminology services (VSAC, LOINC, SNOMED CT)
- Identity proofing providers
Engineering methodology
How we approach healthcare API architecture
- 1
Identify audiences and obligations
We list API consumers, regulatory requirements, and partner commitments, and map which apply to which API products.
- 2
Design the contracts first
OpenAPI definitions, FHIR profiles, and CapabilityStatements are drafted and reviewed with consumers before implementation.
- 3
Build security and gateway foundations
Authorization server, scope model, consent checks, gateway policies, and audit logging are implemented before endpoints multiply.
- 4
Implement and validate
Endpoints are built against profiles, validated in CI, and tested with conformance tools such as Inferno where certification applies.
- 5
Publish and govern
Documentation, sandboxes, versioning policy, and a change review process are published so the API can evolve without surprising partners.
Business use cases
Where healthcare API architecture delivers value
Payer API mandates
A health plan builds Patient Access and Provider Access APIs aligned with CARIN and Da Vinci guides, with member consent and attribution enforced at the API layer.
Digital health partner platform
A remote monitoring company exposes FHIR Observation endpoints so health system partners can pull readings into their EHR workflows.
Mobile backend-for-frontend
A patient app gets a task-shaped API that composes scheduling, messaging, and results calls, keeping the mobile client simple and the domain APIs stable.
Certification preparation
A health IT developer restructures its FHIR layer and authorization server to pass (g)(10) conformance testing.
Technical comparison
| Criterion | FHIR REST | Custom REST | GraphQL |
|---|---|---|---|
| External partner familiarity | High; industry standard | Requires custom documentation | Moderate |
| Regulatory alignment | Required for ONC and CMS APIs | Not sufficient for mandates | Not sufficient for mandates |
| Fit for product-specific workflows | Can be verbose | Shaped to the task | Flexible queries per screen |
| Authorization granularity | SMART scopes per resource type | Custom design | Needs field-level resolvers |
| Caching and gateways | Standard HTTP semantics | Standard HTTP semantics | Harder; mostly POST |
| Risk of over-fetching PHI | Moderate; use _elements and _summary | Low if designed tightly | High without query cost limits |
Typical deliverables
What a healthcare API architecture engagement produces
- API product map with audiences, owners, and obligations
- OpenAPI specifications and FHIR profiles with examples
- SMART scope model and authorization server configuration
- Gateway policies for quotas, throttling, and validation
- Versioning and deprecation policy
- Conformance and authorization test suites
- Developer documentation and synthetic-data sandbox
Cost and timeline factors
What shapes healthcare API architecture cost and timeline
- Number of API products and implementation guides in scope
- Whether an authorization server exists or must be built
- Quality and structure of the underlying data model
- Certification or regulatory testing requirements
- Partner onboarding and developer support expectations
- Bulk data volume and isolation needs
Typical timeline
Designing contracts and the security model typically takes a few weeks. A first production FHIR API with SMART authorization usually lands within a quarter, and a full regulatory API program spans multiple quarters.
Read the cost guideHealthcare API architecture FAQs
Should every healthcare API be a FHIR API?
No. Externally facing and regulated APIs should follow FHIR and the relevant implementation guides, because partners and certification testing expect them. Internal APIs that serve a specific product workflow can use task-shaped REST or GraphQL behind the gateway. The key is consistent security, audit, and consent enforcement across both, so the internal path is not a weaker back door.
What is SMART on FHIR and why does it matter for API design?
SMART on FHIR is an HL7 specification built on OAuth 2.0 and OpenID Connect that defines how apps launch, request scopes, and obtain tokens for FHIR APIs. It matters because it standardizes patient and user context, scope syntax, and backend service authorization. Designing around it early avoids custom auth flows that partners and certification testing will not accept.
How do you protect clinical performance from bulk data exports?
Run Bulk Data exports on isolated workers and read replicas, write output to object storage, and deliver files through expiring signed URLs. Apply separate gateway quotas to bulk clients, schedule large exports in off-peak windows when possible, and monitor the impact on primary database latency so clinician-facing reads keep their headroom.
Which CMS rules affect payer API architecture?
The CMS Interoperability and Patient Access final rule (CMS-9115-F) requires impacted payers to offer a Patient Access API and provider directory API. The Interoperability and Prior Authorization final rule (CMS-0057-F) adds Provider Access, Payer-to-Payer, and Prior Authorization APIs, with most API compliance dates beginning in January 2027. Each depends on FHIR R4 and specified implementation guides.
Related engineering topics
- Healthcare API DevelopmentDesign and build of FHIR and REST APIs for healthcare products and organizations, with SMART authorization, versioning, consent, and developer documentation.Read more
- FHIR Integration ServicesFHIR R4 client and server engineering with US Core, Bulk Data, SMART authorization, and Subscriptions, built to pass conformance testing.Read more
- SMART on FHIR DevelopmentSMART App Launch and Backend Services engineering: EHR-embedded and standalone apps with PKCE, scoped tokens, and context that survives the EHR frame.Read more
- Healthcare API IntegrationIntegration with clinical, payer, pharmacy, lab, and identity APIs: FHIR, X12-backed clearinghouse APIs, e-prescribing networks, and vendor REST APIs.Read more
- Security ArchitectureZero trust, identity-centric access, STRIDE threat modeling, encryption, and audit design that support HIPAA safeguards without relying on a network perimeter.Read more
- Event-Driven ArchitectureBrokers, event contracts, ordering, and idempotency for HL7 v2 and FHIR event streams, so out-of-order and duplicate clinical messages are handled by design.Read more
Discuss your healthcare engineering project
Tell us about the system, the integrations it depends on, and the constraints you are working within. A senior engineer will review it and reply with questions, not a sales script.