Authentication
All API requests require authentication using an API key.
API Key Header
Include your API key in the X-API-Key header:
http
GET /api/v1/check?domain=example.com HTTP/1.1
Host: threats.cyberapi.io
X-API-Key: your_api_key_hereSecurity Best Practices
IMPORTANT
Never expose your API key in:
- Client-side JavaScript code
- Public GitHub repositories
- Browser console logs
- Error messages
Secure Storage
Store API keys in environment variables:
bash
CYBERAPI_KEY=your_api_key_herepython
import os
api_key = os.getenv('CYBERAPI_KEY')javascript
const apiKey = process.env.CYBERAPI_KEY;Managing API Keys
Rotation
Rotate your API key periodically for security:
- Contact support at inbox@cyberapi.io
- Request a new API key
- Update your application
- Old key remains valid for 24 hours
Multiple Keys
Business tier customers can request multiple API keys for different environments:
- Production: Main application
- Staging: Testing environment
- Development: Local development
Contact support to set this up.
