Skip to content
Blog / BAA explained: what it is and when you need one
7 min

BAA explained: what it is and when you need one

A practical guide to Business Associate Agreements for developers building healthcare apps, covering what they include, when they apply, and how to get them.

BAA explained: what it is and when you need one

If you've ever built a product that touches healthcare data, you've probably heard the term "BAA" thrown around, often by a legal team, sometimes by a prospective enterprise customer, and occasionally in a sales call that suddenly got very serious. But what exactly is a Business Associate Agreement, and when does your team actually need one?

This post breaks it down from a developer and technical lead perspective, so you can make informed decisions before the lawyers get involved.

What is a BAA?

A Business Associate Agreement (BAA) is a legally binding contract required under the Health Insurance Portability and Accountability Act (HIPAA) in the United States. It governs how a "business associate" (any vendor or third party that handles Protected Health Information (PHI) on behalf of a covered entity) can access, use, and safeguard that information.

In plain terms: if your software processes, stores, or transmits any data that could identify a patient or relate to their health, treatment, or payment, you likely need a BAA with every vendor in your stack that touches that data.

Covered entities under HIPAA include health plans, healthcare clearinghouses, and healthcare providers. Business associates include anyone who works on their behalf: cloud providers, software vendors, analytics platforms, and backend-as-a-service providers.

When do you need a BAA?

The short answer: whenever PHI is in scope and you're using a third-party service to handle it. Here are the most common scenarios:

  • You're building a patient portal or EHR integration. Any app that stores or transmits patient records, appointment data, diagnoses, or treatment history involves PHI.
  • You're working with a healthcare provider as a client. Even if your app is not itself medical software, if you're building for a clinic or hospital, their data requirements apply.
  • You're storing user-generated health data. Fitness apps, mental health platforms, and telehealth tools may collect health-adjacent data that qualifies as PHI.
  • You're building a claims or billing system. Financial data tied to health services is also PHI.
  • Your platform processes insurance information. Health plan identifiers, beneficiary numbers, and claims data are all covered.

If none of these apply (if you're building a general SaaS product with no health-related data), you likely don't need a BAA. But the moment healthcare-related data enters your system, the requirement applies.

What a BAA actually covers

A properly drafted BAA typically includes:

  • Permitted uses and disclosures of PHI by the business associate
  • Safeguards required to protect PHI, including administrative, physical, and technical controls
  • Breach notification obligations and timelines: notification requirements vary by role and statute. Business associates must notify the covered entity without unreasonable delay (and no later than 60 days), while covered entities have specific HITECH-mandated timelines for notifying affected individuals and the HHS.
  • Sub-contractor requirements: your business associates must also ensure any downstream vendors sign BAAs
  • Data return or destruction obligations upon contract termination
  • Liability and indemnification terms in the event of a breach

The BAA does not, on its own, make your system HIPAA compliant. It's a contractual mechanism that formalizes responsibilities; actual compliance requires implementing the underlying security controls in your application and infrastructure.

How teams approach BAA agreements in practice

  1. Audit your vendor stack early

The most common mistake is waiting until a customer asks for proof of HIPAA compliance to start reviewing vendor BAAs. Smart teams audit their infrastructure stack at the architecture stage: cloud provider, database, authentication, file storage, email and messaging, and analytics. Each of these may need a BAA.

  1. Use vendors that already support BAAs

Most major cloud providers offer BAAs as part of their enterprise or business plans. AWS, Google Cloud, and Microsoft Azure all offer them. For application-layer services, it varies; some offer them freely, others only on paid plans, and some don't offer them at all. This makes vendor selection a compliance decision, not just a technical one.

  1. Separate PHI from non-PHI workloads where possible

Teams often structure their architecture to minimize the surface area of PHI exposure. If only a subset of services touch protected data, fewer BAAs are required. This is both a legal and operational simplification that pays off at scale.

  1. Keep a BAA register

Maintaining a document that lists every vendor with PHI access, the BAA status with each, and the review dates is basic hygiene. For small teams, a spreadsheet works. For larger organizations, dedicated compliance management tooling may be worthwhile.

  1. Get BAAs in place before the sales conversation

If a prospective customer asks whether you have BAAs in place and you don't, the deal is over. Enterprise healthcare customers require documentation before onboarding, not as a post-sale formality.

Customer identity without the hassle

Add secure authentication in minutes, not weeks.

  • Built-in security and compliance
  • Multiple login methods
  • Custom authentication flows
  • Multi-factor authentication

Choosing a backend that supports compliance

When selecting backend infrastructure for a HIPAA-relevant application, look for vendors who:

  • Offer formal BAA agreements (not just a compliance FAQ page)
  • Document their security controls: encryption at rest and in transit, access controls, audit logging
  • Are transparent about sub-processors, meaning other vendors they use who may also touch your data
  • Provide SOC 2 Type II reports or equivalent third-party audit documentation

Appwrite for compliance-sensitive applications

Appwrite is an open-source developer infrastructure platform for building web, mobile, and AI apps. It includes both a backend server, providing authentication, databases, file storage, serverless functions, real-time subscriptions, and messaging, and a fully integrated hosting solution for deploying static and server-side rendered frontends. Appwrite can be fully self-hosted on any Docker-compatible infrastructure or used as a managed service through Appwrite Cloud.

For teams building in compliance-sensitive environments, Appwrite's self-hosting capability is particularly relevant to the BAA question. When PHI does not flow through external processors (such as third-party email or SMS providers, analytics services, or external monitoring tools), the primary BAA relationship can be limited to the underlying cloud provider where Appwrite runs, rather than a separate backend vendor with its own sub-processors and data handling policies. Teams should verify that every service in their stack that may touch PHI has a BAA in place.

Appwrite's built-in authentication handles session management, Argon2 password hashing, and OAuth integrations. Its database and file storage operate within your own deployment boundary. Its serverless functions execute within your infrastructure perimeter. For healthcare teams that need to demonstrate control over where PHI lives and who can access it, Appwrite's self-hosting model provides a practical, auditable path forward.

Build your HIPAA-compliant backend with full data control

BAAs are not a checkbox, they're a signal that your infrastructure was designed with data accountability in mind. When you self-host Appwrite within your own cloud account or on-premise infrastructure, and when PHI is not routed through external services such as third-party email or SMS providers, analytics platforms, backup vendors, or support tooling, PHI can remain within your controlled environment. In that configuration, the primary BAA relationship can be scoped to the underlying cloud provider rather than a separate backend vendor with its own sub-processors and data handling policies. The compliance conversation becomes simpler in proportion to how tightly you constrain which services touch PHI.

Frequently asked questions

  • What is a Business Associate Agreement (BAA)?

    A BAA is a legally binding contract required under HIPAA in the United States. It governs how a business associate (any vendor or third party that handles Protected Health Information on behalf of a covered entity) can access, use, and safeguard that information. It defines permitted uses, required safeguards, breach notification obligations, sub-contractor requirements, and data return or destruction terms.

  • When does a developer need a BAA?

    You typically need a BAA when PHI is in scope and you are using a third-party service to handle it. Common scenarios include patient portals or EHR integrations, building for a healthcare provider, storing user-generated health data, claims and billing systems, and processing insurance information. If no health-related data enters your system, you usually do not need a BAA.

  • Does a BAA make your system HIPAA compliant?

    No. A BAA is a contractual mechanism that formalizes responsibilities, but it does not on its own make a system compliant. Actual HIPAA compliance requires implementing the underlying security controls in your application and infrastructure, including encryption at rest and in transit, access controls, audit logging, and documented administrative, physical, and technical safeguards.

  • How does self-hosting Appwrite simplify the BAA conversation?

    When Appwrite is self-hosted within your own cloud account or on-premise infrastructure, and PHI does not flow through external processors (third-party email or SMS providers, analytics, monitoring, or backup vendors), the primary BAA relationship can be scoped to the underlying cloud provider rather than a separate backend vendor. This narrows the BAA register to vendors that actually touch PHI.

  • What should developers look for in a backend that supports HIPAA-relevant applications?

    Look for vendors that offer formal BAA agreements (not just a compliance FAQ page), document their security controls (encryption at rest and in transit, access controls, audit logging), are transparent about sub-processors, and provide SOC 2 Type II reports or equivalent third-party audit documentation. Appwrite Cloud and self-hosted Appwrite both expose Argon2 password hashing, OAuth integrations, and granular access controls suitable for compliance-sensitive workloads.

Start building with Appwrite today