API Keys
Orwel uses API keys to authenticate requests. Your API keys carry many privileges, so be sure to keep them secure!Key Types
Orwel provides two types of API keys per workspace:Production Keys
Use in production environments
- 1000 requests per minute
- Full access to workspace data
- Tracked separately for monitoring
Development Keys
Use for testing and development
- 100 requests per minute
- Full access to workspace data
- Safe for local development
Authentication Methods
You can authenticate requests using either of these methods:Bearer Token (Recommended)
Include your API key in theAuthorization header:
Custom Header
Alternatively, use thex-api-key header:
Managing API Keys
Generating Keys
Key Rotation
We recommend rotating your API keys regularly:- Generate a new API key
- Update all applications to use the new key
- Monitor for any failed requests
- Delete the old key once migration is complete
Security Best Practices
Never Expose Keys in Client-Side Code
Never Expose Keys in Client-Side Code
API keys should only be used in server-side code. Never include them in:
- Frontend JavaScript
- Mobile app code
- Public repositories
- Client-side configuration files
Use Environment Variables
Use Environment Variables
Store API keys in environment variables, not in your code:
Rotate Keys Regularly
Rotate Keys Regularly
Rotate your API keys every 90 days or immediately if you suspect a key has been compromised.
Monitor Key Usage
Monitor Key Usage
Regularly review your API key usage in the dashboard. Look for:
- Unexpected traffic patterns
- Failed authentication attempts
- Unusual geographic locations
Key Tracking
Every API key tracks its last usage:- Production Key:
prod_last_usetimestamp - Development Key:
dev_last_usetimestamp
Authentication Errors
401 Unauthorized
Returned when the API key is invalid or missing:- Missing
Authorizationorx-api-keyheader - Invalid or expired API key
- Typo in the API key
403 Forbidden
Returned when you don’t have access to the requested resource:- Trying to access another workspace’s data
- Resource doesn’t exist in your workspace
Testing Authentication
Test your API key with this simple request:Next Steps
Rate Limiting
Learn about rate limits for your API keys
API Reference
Start making API calls