Overview
The Operahealth API uses API key authentication. All requests must include a valid API key in theAuthorization header using the Bearer scheme.
API Key Format
API keys follow a specific format based on environment:| Environment | Example |
|---|---|
| Production | opera_live_a1b2c3d4e5f6... |
| Development | opera_demo_a1b2c3d4e5f6... |
Managing API Keys
API keys are managed through your Operahealth dashboard at Settings → API Keys.Creating a Key
Create a new key
Click Create API Key and give it a descriptive name (e.g., “Production
Integration” or “Development Integration”).
Revoking a Key
Keys can be revoked instantly from the dashboard. Once revoked, any requests using that key will immediately return401 Unauthorized.
Security Best Practices
Keep API keys secret
Keep API keys secret
- Never commit keys to version control - Never expose keys in client-side code - Use environment variables or a secrets manager
Use HTTPS only
Use HTTPS only
API keys must only be transmitted over secure HTTPS connections. The API
will reject non-HTTPS requests.
Rotate keys regularly
Rotate keys regularly
Periodically revoke old keys and create new ones, especially if team members
leave or keys may have been exposed.
One key per integration
One key per integration
Use separate keys for different integrations. This makes it easier to track
usage and revoke access for specific integrations without affecting others.
Example Request
- Production
- Development
Authentication Errors
| Status | Error | Description |
|---|---|---|
401 | Missing API key | No Authorization header provided |
401 | Invalid API key | Key format is incorrect or key doesn’t exist |
401 | Revoked API key | Key has been revoked in the dashboard |
403 | Insufficient permissions | Key lacks required permissions (future) |
Example 401 Response