API Key Authentication
All AlfaOne API endpoints require authentication using an API key. API keys are scoped to a single organization, and all data returned will be filtered to that organization.Obtaining an API Key
- Log in to your AlfaOne admin dashboard
- Navigate to Settings → Integrations
- Click Generate API Key
- Give your key a descriptive name (e.g., “Production Integration”, “Development Testing”)
- Copy and securely store the generated key
Using your API Key
Include your API key in thex-api-key header with every request:
API Key Format
AlfaOne API keys follow this format:| Environment | Format | Example |
|---|---|---|
| Live/Production | ak_live_ + 32 characters | ak_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 |
| Test/Sandbox | ak_test_ + 32 characters | ak_test_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 |
Error Responses
If authentication fails, the API will return one of the following errors:Description of the authentication error
Common Authentication Errors
401 - Missing API Key
401 - Missing API Key
x-api-key header in your request.401 - Invalid API Key
401 - Invalid API Key
401 - Expired API Key
401 - Expired API Key
401 - Revoked API Key
401 - Revoked API Key
Security Best Practices
Use Environment Variables
Never hardcode API keys in your source code. Use environment variables or a secrets manager.
Rotate Keys Regularly
Periodically rotate your API keys and revoke old ones to minimize security risks.
Use Separate Keys
Use different API keys for development, staging, and production environments.
Monitor Usage
Regularly review API usage in your dashboard to detect any unusual activity.
Rate Limiting
API requests are rate limited to ensure fair usage:| Tier | Rate Limit |
|---|---|
| Standard | 100 requests/minute |
| Enterprise | 1000 requests/minute |
429 Too Many Requests response: