API Keys
API keys allow external systems to access CHAD’s REST API. They’re scoped to specific users and inherit role permissions.Use Cases
- SIEM integration - Pull alerts into your SIEM
- Automation - Scripts that manage rules
- Dashboards - External dashboards querying stats
- CI/CD - Automated rule deployment
Creating API Keys
Via UI
- Go to Account > API Keys
- Click Create API Key
- Enter a name (e.g., “SIEM Integration”)
- Click Create
- Copy the key immediately - it won’t be shown again
Key Format
chad_ak_ prefix.
Using API Keys
Include the key in theAuthorization header:
Permissions
API keys inherit the creating user’s role:| User Role | API Key Can |
|---|---|
| Admin | Read and write all resources |
| Analyst | Read and write rules, alerts |
| Viewer | Read-only access |
Read-Only Mode
Force read-only regardless of role:- When creating the key, enable Read-Only
- Key cannot make changes even if user is Admin
Key Management
List Keys
View all your API keys:- Go to Account > API Keys
- See all keys with:
- Name
- Created date
- Last used date
- Status
Revoke Key
Immediately disable a key:- Go to Account > API Keys
- Find the key
- Click Revoke
- Key stops working immediately
Revoking is immediate and permanent. Create a new key if needed.
Regenerate Key
Can’t regenerate - revoke and create new:- Revoke the old key
- Create a new key
- Update your integrations
API Endpoints
See API Reference for full documentation.Common Endpoints
Rate Limits
API keys are rate-limited:| Tier | Requests/minute |
|---|---|
| Standard | 60 |
| High | 300 |
Security Considerations
Key Storage
- Store keys securely (secrets manager, vault)
- Never commit keys to source control
- Use environment variables in applications
Key Rotation
Rotate keys periodically:- Create new key
- Update applications
- Revoke old key
Monitoring
Monitor API key usage:- Check Last Used date regularly
- Revoke unused keys
- Watch for unusual patterns in audit log
IP Allowlisting
Restrict API key usage by IP:- Go to Settings > API
- Add IP allowlist per key
- Requests from other IPs rejected
Example Integrations
Python
JavaScript
cURL
Troubleshooting
401 Unauthorized
- Check key is correct (no typos, whitespace)
- Verify key hasn’t been revoked
- Check Authorization header format
403 Forbidden
- User role doesn’t permit this action
- API key is read-only
- Resource requires higher permissions
429 Too Many Requests
- You’ve hit rate limit
- Wait and retry
- Consider rate limit increase
Key not working
- Verify key hasn’t been revoked
- Check user account is enabled
- Test with a new key
Best Practices
One key per integration
One key per integration
Separate keys allow independent rotation and revocation.
Use descriptive names
Use descriptive names
“SIEM Integration - Splunk Prod” is better than “API Key 1”.
Least privilege
Least privilege
Use read-only keys when writes aren’t needed.
Rotate regularly
Rotate regularly
Rotate keys quarterly or after personnel changes.
Monitor usage
Monitor usage
Unusual API activity may indicate compromise.
Next Steps
API Reference
Full API documentation
User Management
Manage user accounts