Creating an API Key
- Go to your project
- Navigate to Settings → API Keys
- Click “Create API Key”
- Enter a name (e.g., “CI/CD Pipeline”, “Local Development”)
- Click “Create”
- Copy the key immediately
API Key Properties
Using API Keys
CLI Authentication
API Authentication
Include the key in theAuthorization header:
Managing API Keys
View Keys
- Go to Settings → API Keys
- See all keys for the project
- Check last used timestamps
Revoke a Key
- Find the key in the list
- Click “Revoke”
- Confirm revocation
Rotate Keys
To rotate a key:- Create a new key
- Update your CI/CD pipelines with the new key
- Verify scans work with the new key
- Revoke the old key
Best Practices
Use Descriptive Names
Name keys by their purpose:github-actions-prodgitlab-ci-staginglocal-dev-alice
One Key Per Purpose
Create separate keys for:- Each CI/CD pipeline
- Each developer (for local development)
- Each environment
Secure Storage
Regular Rotation
Rotate keys periodically:- Every 90 days for production
- After team member departure
- After any suspected compromise
Permissions
All API keys have full access to their project:- Start scans
- View issues
- Access scan results
Rate Limits
API calls are rate-limited per project:
Contact support if you need higher limits.
Troubleshooting
”Invalid API key”
- Verify the key was copied correctly
- Check for extra whitespace
- Ensure the key hasn’t been revoked
- Verify you’re using the right project’s key
”API key expired”
API keys don’t expire automatically. If you see this error:- The key may have been revoked
- Create a new key
”Rate limit exceeded”
- Reduce scan frequency
- Check for duplicate CI/CD triggers
- Contact support for limit increase
Related Pages
CLI Authentication
CLI login methods
CI/CD Integration
Pipeline setup
Team Members
Manage access
API Reference
API documentation

