Skip to main content

Overview

The Operahealth API uses API key authentication. All requests must include a valid API key in the Authorization header using the Bearer scheme.

API Key Format

API keys follow a specific format based on environment:

Managing API Keys

API keys are managed through your Operahealth dashboard at SettingsAPI Keys.

Creating a Key

1

Log in to your dashboard

Navigate to your Operahealth dashboard and log in with your credentials.
2

Go to API Keys

Navigate to SettingsAPI Keys.
3

Create a new key

Click Create API Key and give it a descriptive name (e.g., “Production Integration” or “Development Integration”).
4

Copy and store securely

Copy the key immediately — it won’t be shown again. Store it securely in an environment variable or secrets manager.
Store your API key securely. Once created, the full key cannot be retrieved again. If you lose it, you’ll need to create a new one.

Revoking a Key

Keys can be revoked instantly from the dashboard. Once revoked, any requests using that key will immediately return 401 Unauthorized.

Security Best Practices

  • Never commit keys to version control - Never expose keys in client-side code - Use environment variables or a secrets manager
API keys must only be transmitted over secure HTTPS connections. The API will reject non-HTTPS requests.
Periodically revoke old keys and create new ones, especially if team members leave or keys may have been exposed.
Use separate keys for different integrations. This makes it easier to track usage and revoke access for specific integrations without affecting others.

Example Request

Authentication Errors

Example 401 Response