API Keys
API keys allow your backend services to authenticate with Optare without user credentials.
Creating API Keys
Generate an API key from your dashboard.
- Navigate to Settings → API Keys
- Click "Create API Key"
- Set permissions and expiration
- Copy the key (shown only once)
Using API Keys
Include the API key in your requests.
const response = await fetch('https://api.optare.com/v1/users', {
headers: {
'Authorization': 'Bearer your-api-key',
'Content-Type': 'application/json'
}
})Key Permissions
API keys can have different permission scopes:
users:read- Read user datausers:write- Create and update usersorgs:read- Read organization dataorgs:write- Manage organizationsadmin- Full access
Security Best Practices
Store Securely Never commit API keys to version control. Use environment variables.
OPTARE_API_KEY=your-api-keyRotate Regularly Rotate keys every 90 days or when compromised.
Use Minimal Permissions Grant only the permissions needed for each key.
Set Expiration Configure automatic expiration for temporary keys.
Revoking Keys
Revoke compromised or unused keys immediately:
- Go to Settings → API Keys
- Find the key
- Click "Revoke"
Revoked keys stop working immediately.
Rate Limits
API keys are subject to rate limits:
- 1000 requests per minute
- 50,000 requests per day
Contact support for higher limits.
Next Steps
- Authentication API - API endpoints
- Webhooks - Event notifications
- Security - Security guidelines