Installation
Client Initialization
| Parameter | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | Your API key (required) |
environment | string | 'production' | 'production' or 'sandbox' |
region | string | 'us' | 'us', 'eu', 'uk' |
mode | string | 'direct' | 'direct' for clinics, 'connect' for platform partners |
timeout | number | 30000 | Request timeout in ms (Node) or seconds (Python) |
retries | number | 3 | Auto-retry count on 5xx/timeout |
Engagements
hana.engagements.create(params)
Create a new patient engagement.
Engagement object with id, status, patient_id, scheduled_at, created_at.
hana.engagements.get(id)
Retrieve an engagement by ID, including outcomes if completed.
hana.engagements.list(filters)
List engagements with filtering and pagination.
hana.engagements.cancel(id)
Cancel a scheduled engagement before it starts.
Patients
hana.patients.upsert(id, data)
Create or update a patient record. Upsert by your internal patient ID.
hana.patients.get(id)
Retrieve a patient record.
hana.patients.getMemory(id)
Retrieve the longitudinal engagement memory for a patient — preferences, trends, barriers, interaction patterns.
hana.patients.delete(id, options)
Delete a patient and optionally erase all data (GDPR right to erasure):
Protocols
hana.protocols.create(config)
Create a custom clinical protocol:
hana.protocols.list()
List all protocols for your organization.
hana.protocols.upload(file)
Upload a clinical guideline (PDF, DOCX) for HANA to parse into a structured protocol:
Webhooks
hana.webhooks.create(config)
Register a webhook endpoint:
hana.webhooks.list()
List registered webhooks.
hana.webhooks.test(id)
Send a test event to verify connectivity.
hana.webhooks.replay(id, eventIds)
Replay failed webhook deliveries.
Organizations (Connect Mode)
Available whenmode: 'connect'.
hana.organizations.create(config)
Create a sub-organization (for multi-tenant deployments):
hana.organizations.list()
List all sub-organizations under your platform.
Error Handling
All SDK methods throw typed errors:TypeScript Support
The Node.js SDK is fully typed. All request params and response objects have TypeScript definitions:Next: API Reference
Full REST API documentation for direct HTTP integration.