HIPAA
The Health Insurance Portability and Accountability Act (HIPAA) establishes requirements for protecting Protected Health Information (PHI). As a telecommunications technology company, SignalWire is built to support HIPAA-compliant applications: SignalWire APIs and WebRTC communications services are all encrypted by default via HTTPS, TLS, and/or SRTP/DTLS. When building applications — especially voice AI agents defined with SWML or the Server SDK — that handle healthcare data, you must implement appropriate safeguards to protect PHI throughout the call lifecycle.
This guide provides technical guidance for implementing security controls relevant to HIPAA compliance. It is not legal advice. Healthcare organizations must consult with qualified healthcare compliance experts and legal counsel to ensure their specific implementation meets all applicable HIPAA requirements. Compliance is a shared responsibility between SignalWire, your organization, and your implementation choices.
Overview
HIPAA applies to covered entities and business associates. Individuals, organizations, and agencies that meet the definition of a covered entity must comply with the Rules’ requirements to protect the privacy and security of health information. If a covered entity engages a business associate to help carry out its health care activities, the covered entity must have a written business associate contract that establishes what the business associate has been engaged to do and requires it to comply with the Rules’ requirements to protect PHI.
SignalWire is built to support HIPAA-compliant applications. No PII (Personally Identifiable Information), private resource logs, or other records are publicly accessible — you must have specific access granted by a Space Admin to see logs in the portal, and you must have API credentials to use the API. PII and PHI that may be contained in resources can also be deleted from the logs (message bodies, fax media, message media, and so on). Recordings must be manually enabled, and they can be deleted from the Space altogether or paused during the collection of sensitive data.
What is PHI in voice AI?
In the context of voice AI agents, PHI may include:
- Patient names, addresses, phone numbers
- Medical record numbers and account numbers
- Appointment details and scheduling information
- Prescription information
- Lab results and diagnoses
- Insurance information
- Any health-related information combined with patient identifiers
Shared responsibility model
Business Associate Agreement (BAA)
SignalWire is a Business Associate and offers Business Associate Agreements for healthcare customers. You must have a signed BAA with SignalWire before processing any PHI through the platform.
If you need a BAA signed for HIPAA compliance, reach out to sales@signalwire.com to get started.
Prerequisites
Before deploying a HIPAA-compliant agent, ensure the following are in place.
Infrastructure requirements
HIPAA-compliant providers
When building HIPAA-compliant agents, you must use voice and LLM providers that support BAA coverage. In SWML, voice is selected per language with the voice property of ai.languages, and the model is selected with ai_model in ai.params. The Server SDK exposes the same settings through addLanguage and setParams.
HIPAA-compliant voice providers:
HIPAA-compliant LLM:
Configure the model and a HIPAA-compliant voice as follows:
Server SDK (Python)
Server SDK (TypeScript)
SWML
Personnel requirements
- Designated HIPAA Privacy Officer
- Designated HIPAA Security Officer
- Workforce training on PHI handling
- Documented policies and procedures
Access control
When you invite a new user to your SignalWire Space, the admin can specify the projects that they should be allowed to view, limiting accessibility to resource logs to only those who have been granted permission. The API also requires each request to be authenticated with a Space URL, Project ID, and most importantly, an API Token.
We highly recommend that each application that programmatically accesses SignalWire uses its own API tokens, so that you can easily see when these tokens have been used and remove them when necessary. Additionally, take care to make sure only those who need access to a project have it.
The principle of least privilege. The principle of least privilege (POLP) limits users’ access rights to only what is strictly required to do their jobs. Implementing this is a huge help in HIPAA compliance, as well as a solid business practice.
Authentication configuration
Configure strong authentication on the agent’s own endpoints. The Server SDK reads HTTP Basic Auth credentials from environment variables:
If SWML_BASIC_AUTH_PASSWORD is not set, the SDK auto-generates a password on each startup; in production, always set it explicitly.
For sensitive functions, enable token security: mark any PHI-accessing tool secure so its function callback also requires a validated token. Any SWAIG function (SWML reference, Server SDK guide) that accesses PHI calls out to a web_hook_url you host — in SWML, protect it with HTTP Basic Auth (SWAIG.defaults.web_hook_url as username:password@url) and serve it over HTTPS.
Server SDK (Python)
Server SDK (TypeScript)
TLS/HTTPS configuration
Always use HTTPS in production. Configure TLS via environment variables:
For production deployments behind a reverse proxy (nginx, Caddy) that terminates SSL, set the public base URL instead:
Audit logging
HIPAA requires audit trails for PHI access. Write the audit entry in whichever handler backs your function — the tool handler (Server SDK) or your SWAIG web_hook_url handler (SWML) — and redact sensitive fields so that PHI never appears in plaintext logs:
Server SDK (Python)
Server SDK (TypeScript)
Required audit log events:
Call recording compliance
Consent and disclosure
HIPAA and state laws require consent for call recording. Put the disclosure instruction directly in the AI prompt so it is spoken before any PHI discussion:
Server SDK (Python)
Server SDK (TypeScript)
SWML
Alternatively, you can deliver the disclosure as a static_greeting with static_greeting_no_barge set to true, which forces the entire message to play before the caller can interrupt.
Pausing recording for sensitive data
Pause recording when collecting highly sensitive information. A SWAIG function pauses and resumes the recording — in SWML by returning a SWML action that runs stop_record_call (and later record_call), or in the Server SDK by chaining .stop_record_call() / .record_call() on the FunctionResult:
Server SDK (Python)
Server SDK (TypeScript)
Recording retention
Call recordings containing PHI are considered part of the medical record. HIPAA does not specify a retention period for PHI itself — retention requirements come from state medical records laws, other federal regulations (for example, Medicare conditions of participation), and organizational policies.
The HIPAA six-year retention requirement (45 CFR 164.530(j)) applies to administrative documentation — policies, procedures, training records, risk assessments, and audit logs — not to PHI or call recordings.
Manage recordings through the REST API — list them to audit access, and delete them once their retention period expires.
Retrieve your call recordings via the REST API.
Permanently delete a recording when its retention period expires.
PHI handling best practices
Keeping PHI out of the LLM with global_data and meta_data
One of the most effective ways to protect PHI is to keep it away from the LLM entirely. Use global_data or meta_data to store sensitive information while keeping it out of the model’s context.
ai.global_data— a key-value object that persists for the whole AI session. It is available to your prompts, AI params, and the SWML returned by SWAIG functions, and is updated at runtime with theset_global_dataaction (orupdate_global_dataon aFunctionResult). As long as you never template a value into the prompt or a spoken response, it stays out of the model’s context.meta_data— an environmental variable scoped locally to a function (and itsweb_hook_url), updated with theset_meta_dataaction (see theset_meta_dataguide). Use it for per-function context that no other function — and never the model’s conversation — should see.
A verification function stores the resolved patient record in global_data and returns only a generic confirmation, so the identifiers your other functions rely on are never exposed to the model:
Server SDK (Python)
Server SDK (TypeScript)
A later function — for example, scheduling an appointment — reads ${global_data.patient_id} and ${global_data.mrn} on the server side and confirms the booking without ever speaking the identifiers back.
Collecting PHI via IVR (bypassing the LLM)
For maximum PHI protection, collect sensitive values with the prompt verb (DTMF or speech) instead of through conversation. Input gathered this way is placed in the prompt_value variable for your SWML and webhooks — it never enters the model’s context or the transcript, and with recording paused it never reaches the recording either:
Server SDK (Python)
Server SDK (TypeScript)
SWML
This approach provides several layers of protection:
Combined pattern: maximum PHI protection
For the strongest protection, combine paused recording with DTMF collection of every sensitive field in a single flow, then resume recording and hand control back to the AI with only a generic confirmation:
Prompt design for PHI protection
Design prompts to minimize PHI exposure. Whether you write a single text prompt or a structured POM, encode the protection and verification rules explicitly. In the Server SDK, promptAddSection builds the POM for you:
Server SDK (Python)
Server SDK (TypeScript)
SWML
Secure function design
Design SWAIG functions to return the minimum necessary PHI. The handler should verify the caller is authorized, log the access, and respond with only what the caller needs to hear — never provider names or detailed locations. On an authorization failure, return a non-revealing message:
Server SDK (Python)
Server SDK (TypeScript)
Input validation
Validate all inputs to prevent injection and ensure data integrity. Declare expected inputs and constraints in the function parameters (SWML reference, Server SDK guide) so the model can only supply well-formed values, then re-validate in the handler:
Server SDK (Python)
Server SDK (TypeScript)
SWML
Redacting stored message media
To remove PHI from message logs after the fact, redact the body of a previously sent message through the REST API. Redaction clears the message body for compliance or privacy while keeping a record that the message was sent; the original body is overwritten and cannot be recovered. Only messages in a terminal state (delivered, undelivered, failed) are eligible.
Clear the body of a previously sent message via the REST API.
Find the message IDs whose bodies you need to redact.
Deployment
The PHI-handling parts of an agent live in the services you host: the endpoint that serves the SWML (or the Server SDK app) and the web_hook_url endpoints that back your SWAIG functions. Secure those services regardless of how you deploy them.
Serverless deployment
For AWS Lambda, Google Cloud Functions, or Azure Functions hosting your agent or SWAIG webhooks:
The Server SDK serves serverless platforms through handle_serverless_request, with a mode for each provider:
Self-hosted deployment
Self-hosted security checklist:
- Deploy in HIPAA-compliant data center or cloud region
- Enable full-disk encryption on all servers
- Configure host-based firewall
- Implement intrusion detection
- Enable comprehensive system logging
- Regular security patching schedule
- Network segmentation from other workloads
A container deployment that keeps the agent off the public internet and terminates TLS at a reverse proxy:
Administrative safeguards
Access management
Server SDK (Python)
Server SDK (TypeScript)
Incident response
For a security incident, have your handlers refuse PHI access and return a safe fallback when an emergency flag is set. Check an AGENT_EMERGENCY_MODE flag and short-circuit before any PHI access:
Server SDK (Python)
Server SDK (TypeScript)
Incident response requirements:
Compliance checklist
Pre-deployment
- Signed BAA with SignalWire
- HIPAA-compliant hosting environment selected
- Strong authentication credentials configured
- TLS/HTTPS properly configured
- Audit logging implemented and tested
- PHI handling procedures documented
- Workforce training completed
- Incident response plan documented
- Recording consent disclosures implemented
- Data retention policies defined
Ongoing compliance
- Regular access reviews (quarterly recommended)
- Audit log reviews (monthly recommended)
- Security patch management
- Annual risk assessment
- Annual HIPAA training refresh
- BAA review and updates as needed
- Penetration testing (annual recommended)
- Business continuity testing
Documentation requirements
Maintain documentation for:
Complete example
Complete examples of a HIPAA-compliant healthcare appointment agent in the Server SDKs and SWML are presented in the tabs below.
Server SDK (Python)
Server SDK (TypeScript)
SWML
Resources
SignalWire resources:
- Contact SignalWire for a BAA:
sales@signalwire.com - SWML AI reference
- SWAIG functions reference
- Server SDK — building AI agents guide
- Server SDK — defining functions guide
- Server SDK — AgentBase reference (Python)
- Server SDK — AgentBase reference (TypeScript)
HIPAA resources:
- HHS HIPAA for professionals
- HHS HIPAA Security Rule guidance
- NIST SP 800-66 Rev. 2 — Implementing the HIPAA Security Rule
- HHS Breach Notification Rule
Summary
Building HIPAA-compliant communications and voice AI applications requires attention to:
- Technical controls — authenticated, HTTPS SWAIG webhooks; encryption; audit logging in your handlers.
- Administrative controls — policies, training, role-based access management.
- PHI handling — minimization, identity verification, and keeping PHI out of the model with
global_data,meta_data, and DTMF collection. - Documentation — policies, audit trails, incident records.
SignalWire is built to support HIPAA-compliant applications, and provides the building blocks — AI prompts and post-prompts, AI-inaccessible data stores, recording control, and secure SWAIG functions — needed for compliance. Your responsibility is to configure these features appropriately, secure the webhooks that handle PHI, and maintain the administrative safeguards required by HIPAA. Always consult with qualified healthcare compliance experts and legal counsel to ensure your specific implementation meets all applicable requirements.