Skip to main content
Building healthcare applications requires careful attention to security. This guide covers the essential security practices for integrating with Sully.ai, from API key management to handling protected health information (PHI).

API Key Management

Your API key is the gateway to your Sully.ai account. Protecting it is critical to preventing unauthorized access.

Never Hardcode Keys

Never commit API keys to source control or include them in client-side code.

Use Environment Variables

For local development and simple deployments, use environment variables:

Use a Secrets Manager for Production

For production deployments, use a dedicated secrets manager:
Other supported secrets managers include:
  • HashiCorp Vault
  • Google Cloud Secret Manager
  • Azure Key Vault
  • Doppler

Key Rotation and Environment Separation

Webhook Verification

If your integration receives webhooks, always verify the signature before processing events.

Signature Format

Every webhook includes an x-sully-signature header:

Verification Requirements

Always verify both the signature AND the timestamp. Skipping either check leaves your endpoint vulnerable.
  1. Verify the signature - Compute HMAC-SHA256 and compare using constant-time comparison
  2. Check the timestamp - Reject requests older than 5 minutes to prevent replay attacks

Verification Implementation

For complete webhook handling examples including event processing, see the Webhooks Guide.

Data in Transit

All communication with Sully.ai is encrypted in transit.

HTTPS Required

  • All API calls must use HTTPS (TLS 1.2 or higher)
  • HTTP requests are rejected
  • WebSocket connections must use WSS (WebSocket Secure)

Certificate Validation

Always validate TLS certificates. Never disable certificate verification, even in development:

Access Control

Sully.ai uses account-based isolation to separate data between customers.

Account Isolation

Multi-Tenant Patterns

If you’re building a multi-tenant application, consider these patterns: Option 1: Separate API Keys Request a separate API key for each tenant from Sully.ai. This provides the strongest isolation.
Option 2: Your Own Auth Layer Use a single Sully.ai account and implement your own authorization layer to control which tenants can access which resources.

Handling PHI

When working with protected health information (PHI), follow these practices to maintain compliance.

Data Minimization

Only send data that’s necessary for the operation:

Logging Practices

Never log full transcripts, clinical notes, or other PHI in your application logs.

Webhook Endpoint Security

Secure your webhook endpoint to protect incoming PHI:
  • Use HTTPS only
  • Verify webhook signatures (see above)
  • Process events asynchronously and acknowledge quickly
  • Store received data in encrypted storage
  • Implement access controls on your endpoint

Data Retention

Consider implementing data retention policies:
  • Delete transcriptions and notes from Sully.ai when no longer needed
  • Use the DELETE endpoints to remove resources
  • Document your retention policies for compliance audits

Incident Response

If you suspect your API key has been compromised, act immediately.

Key Compromise Response

  1. Revoke the key immediately - Go to the Sully Dashboard and revoke the compromised key
  2. Generate a new key - Create a new API key in the dashboard
  3. Update all services - Deploy the new key to all applications using the compromised key
  4. Audit recent activity - Review API logs in the dashboard for unauthorized access
  5. Investigate the breach - Determine how the key was exposed and fix the vulnerability

Contact Support

For security concerns or to report a potential breach, contact the Sully.ai security team:
  • Email: support@sully.ai
  • Subject line: “Security Incident” for priority handling

Security Checklist

Use this checklist before deploying to production:
API keys stored in environment variables or secrets manager
No API keys in source code or version control
Webhook signature verification enabled
Webhook timestamp validation enabled (5-minute window)
All API connections use HTTPS
All WebSocket connections use WSS
No PHI in application logs
Key rotation process documented
Incident response plan in place
Data retention policy defined
Webhook endpoint secured with HTTPS
Different API keys for dev/staging/production

Next Steps

Webhooks Guide

Complete guide to implementing secure webhook handlers

Authentication

API authentication reference

TypeScript SDK

Type-safe SDK with built-in security features

Python SDK

Python SDK with secure credential handling