Overview
The Hoox API uses API keys to authenticate requests. Your API key must be included in theAuthorization
header of all your requests.
API Key Format
Hoox API keys follow this format:- Production:
hx_live_
followed by 64 hexadecimal characters
hx_live_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Generating an API Key
1
Access settings
Log in to your Hoox dashboard and go to Your Space > Settings > API.
2
Check your plan
Make sure you have an Enterprise plan. API access is only available for this plan.
3
Generate the key
Click Generate API Key and give it a descriptive name.
4
Save the key
Important: Copy and save your key immediately. It will never be displayed again.
Using the API Key
Authentication Header
All requests must include theAuthorization
header:
Implementation Examples
API Key Management
Revoking a Key
If your key is compromised:- Go to Settings > API
- Click Revoke next to your key
- Generate a new key immediately
- Update your applications with the new key
Regeneration
To renew your key:- Click Regenerate in the API settings
- The old key will be immediately revoked
- Save the new key
- Update your applications
Regeneration immediately revokes the old key. Make sure to update all your applications.
Security
Best Practices
Secure Storage
Secure Storage
- Store your keys in environment variables
- Never commit keys to source code
- Use secret managers in production
Key Rotation
Key Rotation
- Regenerate your keys regularly (every 3-6 months)
- Monitor your key usage
- Immediately revoke compromised keys
Access Restriction
Access Restriction
- Limit API key access to necessary personnel only
- Use different keys for different environments
- Monitor usage logs
Environment Variables
Authentication Errors
Common Error Codes
Code | Status | Description |
---|---|---|
invalid_api_key | 401 | Invalid or missing API key |
plan_required | 403 | Enterprise plan required |
rate_limit_exceeded | 429 | Rate limit exceeded |
Error Response Example
Rate Limiting
Each API key has rate limits:- 100 requests per minute for Enterprise plan
- Limits are applied per workspace
- Response headers indicate your current usage
Rate Limiting Headers
Monitor the
X-RateLimit-*
headers to avoid exceeding your limits.