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).Documentation Index
Fetch the complete documentation index at: https://docs.sully.ai/llms.txt
Use this file to discover all available pages before exploring further.
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
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:- HashiCorp Vault
- Google Cloud Secret Manager
- Azure Key Vault
- Doppler
Key Rotation and Environment Separation
| Practice | Description |
|---|---|
| Rotate keys periodically | Rotate API keys every 90 days or after personnel changes |
| Separate environments | Use different API keys for development, staging, and production |
| Limit access | Only give API keys to team members who need them |
| Audit usage | Regularly review API key usage in the Sully Dashboard |
Webhook Verification
If your integration receives webhooks, always verify the signature before processing events.Signature Format
Every webhook includes anx-sully-signature header:
| Component | Description |
|---|---|
t | Unix timestamp when the request was signed |
v1 | HMAC-SHA256 signature of the payload |
Verification Requirements
- Verify the signature - Compute HMAC-SHA256 and compare using constant-time comparison
- Check the timestamp - Reject requests older than 5 minutes to prevent replay attacks
Verification Implementation
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
| Concept | Description |
|---|---|
| Account ID | Identifies your organization; all your data is isolated to this account |
| API Key | Authenticates requests; scoped to a single account |
| Resource IDs | Transcriptions, notes, etc. are only accessible within your account |
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.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
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
DELETEendpoints 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
- Revoke the key immediately - Go to the Sully Dashboard and revoke the compromised key
- Generate a new key - Create a new API key in the dashboard
- Update all services - Deploy the new key to all applications using the compromised key
- Audit recent activity - Review API logs in the dashboard for unauthorized access
- 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