API Keys
All requests to the Polyhush API must be authenticated using an API key. Your API key should be kept secret and never shared publicly.Getting Your API Key
1
Sign in to Polyhush
Navigate to polyhush.com and sign in to your account.
2
Go to Dashboard
Access your Dashboard.
3
Generate API Key
Click on “Generate API Key” or navigate to Settings to create a new key.
4
Copy and Store Securely
Copy your API key immediately. For security reasons, you won’t be able to view it again.
Using Your API Key
Option 1: Pass directly to client
Option 2: Environment Variable (Recommended)
Set thePOLYHUSH_API_KEY environment variable:
Security Best Practices
Use Environment Variables
Use Environment Variables
Store your API key in environment variables or a
.env file (added to .gitignore).Rotate Keys Regularly
Rotate Keys Regularly
Periodically regenerate your API keys, especially if you suspect they may have been compromised.
Use Separate Keys for Different Environments
Use Separate Keys for Different Environments
Use different API keys for development, staging, and production environments.
Monitor API Usage
Monitor API Usage
Regularly review your API usage in the dashboard to detect any unauthorized access.
Rate Limits
API requests are rate-limited to ensure fair usage. Current limits:| Endpoint Type | Rate Limit |
|---|---|
| Read operations | 100 requests/minute |
| Write operations | 30 requests/minute |
| Order placement | 10 orders/second |
If you exceed rate limits, you’ll receive a
429 Too Many Requests response. Implement exponential backoff in your retry logic.