Install
Requirements
- Node.js 18+ (or any runtime with native
fetchsupport) - TypeScript 5+ (recommended, not required)
Quick setup
ImportClinik and instantiate it with your secret API key. Store the key in an environment variable — never hardcode it.
Configuration options
Pass a second argument to the constructor to override defaults.| Option | Type | Default | Description |
|---|---|---|---|
baseUrl | string | https://api.clinikehr.com | API base URL |
timeout | number | 30000 | Request timeout in milliseconds |
retries | number | 2 | Max retry attempts on 5xx or 429 responses |