API Key Authentication
All VulnZap API requests require authentication using an API key in thex-api-key header.
Basic Authentication
Creating an API Key
Via Dashboard:1
Navigate to API Keys
Go to Dashboard → Settings → API Keys
2
Create Key
Click Create API Key
3
Configure
- Name: “Production API Key”
- Scope: Full access or Read-only
- Expiration: Never, 90 days, 1 year
4
Copy Key
⚠️ Important: Copy immediately - won’t be shown again
Using API Keys
Environment Variable (Recommended):Key Types
Personal API Keys
- Scope: Your projects only
- Permissions: Based on your role
- Best for: Development, personal automation
Team API Keys
- Scope: All team projects (or subset)
- Permissions: Configurable
- Best for: CI/CD, shared services
- Requirements: Admin/Owner role
Security Best Practices
Never Hardcode Keys
Never Hardcode Keys
Use Environment Variables
Use Environment Variables
.env to .gitignoreRotate Keys Regularly
Rotate Keys Regularly
Rotate every 90 days:
- Create new key
- Update services to use new key
- Revoke old key
Use Minimal Scopes
Use Minimal Scopes
Grant only necessary permissions:
- Read-only keys for reporting
- Project-specific keys where possible
- Avoid full-access keys unless needed
Revoke Compromised Keys Immediately
Revoke Compromised Keys Immediately
Revoking API Keys
Via Dashboard:401 Unauthorized.