Getting Your API Key
Log in to the Dashboard
Go to heliosai.health and log in to your account.
Create a New Key
Click Create New Key and give it a descriptive name (e.g., “Production API” or “Development API”).
Using Your API Key
Include your API key in thex-api-key header with every request. The same API key works for all endpoints (/api/v1/agent and /api/v1/lab-results):
Managing API Keys
From the Dashboard Settings page, you can:| Action | Description |
|---|---|
| Create | Generate new API keys with custom names |
| View | See when keys were created and last used |
| Revoke | Immediately disable individual keys |
| Revoke All | Emergency disable all keys at once |
Webhook Secret
Your webhook secret is used to verify that incoming webhooks are authentic. You can generate and manage it from the same Settings page:| Action | Description |
|---|---|
| Generate | Create a new webhook secret (shown once) |
| Regenerate | Replace with a new secret (invalidates the old one) |
Security Best Practices
Use environment variables
Use environment variables
Never hardcode API keys in your source code. Use environment variables:
Use separate keys for environments
Use separate keys for environments
Create separate API keys for development, staging, and production. This allows you to:
- Track usage per environment
- Revoke compromised keys without affecting production
- Set up different webhook URLs per environment
Rotate keys periodically
Rotate keys periodically
While not required, rotating API keys periodically is a security best practice:
- Create a new key
- Update your application to use the new key
- Verify the new key works
- Revoke the old key
Monitor key usage
Monitor key usage
Check the Last Used column in the Dashboard to monitor key activity. If you see unexpected usage patterns, consider rotating your keys.
Error Responses
If authentication fails, you’ll receive a401 Unauthorized response:
- Missing
x-api-keyheader - Invalid or revoked API key
- Key from a different account