Overview
The HirePanda API uses API keys to authenticate requests. API keys are associated with your workspace and can be managed from your dashboard.Getting Your API Key
1
Navigate to Settings
Go to your Dashboard Settings
2
Select API Keys
Click on “API Keys” in the settings menu
3
Generate New Key
Click “Generate New API Key” and provide a descriptive name
4
Copy and Secure
Copy the key immediately - it won’t be shown again
Using Your API Key
Header Authentication
Include your API key in theAuthorization header:
Example Requests
API Key Management
Key Permissions
Configure granular permissions for each API key:- Read Only
- Write Access
- Admin Access
- View jobs
- List candidates
- Access analytics
- Read webhooks
Key Rotation
Best practices for key security:Regular Rotation
Regular Rotation
Rotate API keys every 90 days to minimize exposure risk
Emergency Rotation
Emergency Rotation
If a key is compromised:
- Immediately revoke the compromised key
- Generate a new key
- Update all applications
- Review API logs for unauthorized access
Multiple Keys
Use different keys for different purposes:| Key Type | Use Case | Permissions |
|---|---|---|
| Production | Live application | Full access |
| Development | Local development | Limited access |
| CI/CD | Automated testing | Read only |
| Analytics | Reporting tools | Analytics only |
Security Best Practices
Environment Variables
Store API keys in environment variables:Secure Storage
Do's
- Use environment variables
- Use secret management tools
- Encrypt keys at rest
- Limit key permissions
Don'ts
- Hard-code in source code
- Commit to version control
- Share in documentation
- Use in client-side code
OAuth 2.0 (Coming Soon)
We’re implementing OAuth 2.0 for more secure, user-centric authentication:Planned Features
- Authorization code flow
- Refresh tokens
- Scope-based permissions
- Third-party app support
OAuth 2.0 support is planned for Q2 2024. Contact [email protected] for early access.
IP Whitelisting
For additional security, restrict API access by IP:1
Enable IP Whitelisting
Go to Settings → Security → IP Whitelist
2
Add IP Addresses
Add your server’s static IP addresses
3
Test Access
Verify API access from whitelisted IPs
Error Handling
Authentication Errors
Common authentication error responses:Error Codes
| Code | Status | Description |
|---|---|---|
unauthorized | 401 | Missing or invalid API key |
forbidden | 403 | Valid key but insufficient permissions |
rate_limited | 429 | Too many requests |
key_expired | 401 | API key has expired |
Monitoring Usage
Track your API key usage in the dashboard:Available Metrics
- Request count by endpoint
- Error rates
- Response times
- Geographic distribution
- Top endpoints
Usage Alerts
Set up alerts for:- Approaching rate limits
- Unusual activity patterns
- Failed authentication attempts
- Key expiration reminders