Authentication & Security
Learn how to securely authenticate with the Perf API and protect your integration.API Key Authentication
Perf uses API key authentication with Bearer tokens. All requests must include your API key in theAuthorization header.
Header Format
Example Request
API Key Types
Test Keys (pk_test_...)
- For development and testing
- Separate usage quotas from production
- No charges to your billing account
- Can be regenerated freely
Production Keys (pk_live_...)
- For production environments
- Charges applied to your billing account
- Higher rate limits
- Should be rotated regularly for security
Managing API Keys
Creating Keys
- Log in to withperf.pro
- Navigate to Settings → API Keys
- Click Generate New Key
- Provide a descriptive name (e.g., “Production Server”, “Dev Environment”)
- Select key type (test or live)
- Copy the key immediately - it won’t be shown again
Rotating Keys
We recommend rotating API keys every 90 days:- Generate a new key
- Update your application configuration
- Deploy the changes
- Verify the new key works
- Revoke the old key
Revoking Keys
Immediately revoke a key if:- It’s been compromised
- An employee with access leaves
- You’re retiring an application
- Go to Settings → API Keys
- Find the key in the list
- Click Revoke
- Confirm the action
Security Best Practices
1. Never Expose Keys in Client-Side Code
❌ Don’t do this:2. Use Environment Variables
Store API keys in environment variables, never in code:3. Restrict Key Permissions
When available, use scoped keys with minimal permissions:- Read-only keys: For analytics dashboards
- Write-only keys: For logging systems
- Admin keys: For full account access (use sparingly)
4. Use Different Keys per Environment
Maintain separate keys for:- Development
- Staging
- Production
- CI/CD pipelines
- Track usage by environment
- Revoke specific keys without affecting others
- Apply different rate limits
5. Monitor Key Usage
Regularly review:- Request volume per key
- Unusual access patterns
- Failed authentication attempts
- Geographic distribution
6. Implement Server-Side Proxies
For frontend applications, create a backend proxy:Rate Limiting
Perf enforces rate limits to ensure fair usage and system stability.Current Limits
| Tier | Requests/Minute | Requests/Month |
|---|---|---|
| Free | 60 | 1,000 |
| Pro | 300 | 100,000 |
| Enterprise | Custom | Custom |
Rate Limit Headers
Every response includes rate limit information:Handling Rate Limits
When you exceed limits, you’ll receive a429 Too Many Requests response:
IP Allowlisting (Enterprise)
Enterprise customers can restrict API access to specific IP addresses:- Navigate to Settings → Security
- Click IP Allowlist
- Add allowed IP addresses or CIDR ranges
- Save changes
Webhook Security
When receiving webhooks from Perf (for usage alerts, etc.), verify the signature:Signature Verification
Perf signs webhook payloads with HMAC-SHA256:Compliance & Certifications
Current Certifications
- SOC 2 Type II: Audited annually
- GDPR Compliant: EU data protection standards
- HIPAA Ready: For healthcare applications (Enterprise)
- ISO 27001: Information security management
Data Handling
- Encryption in Transit: TLS 1.3
- Encryption at Rest: AES-256
- Data Retention: Configurable (7-90 days)
- Data Deletion: On-demand via API or dashboard
Regional Compliance
- US: Data stored in US-East region
- EU: Data stored in EU-West region (opt-in)
- Data Residency: Enterprise customers can specify region
Audit Logs
Track all API activity in your audit log:- Go to Settings → Audit Log
- Filter by:
- Date range
- API key
- Event type (create, read, update, delete)
- User
Incident Response
If you suspect a security breach:- Immediately revoke compromised API keys
- Review audit logs for unauthorized access
- Contact [email protected]
- Rotate all potentially affected keys
- Monitor for unusual activity
Security Contact
Report security vulnerabilities to:- Email: [email protected]
- PGP Key: Available at withperf.pro/security.asc
- Acknowledgment within 24 hours
- Resolution timeframe within 30 days
- Recognition in our security hall of fame