API Key Authentication
The Cleanview API uses API key authentication. All requests must include a valid API key in thex-api-key
header.
API Key Format
API keys follow this format:cv_pub_KJ3x9mN2pQ8rS7tV5wY6zA1bC4dE0fG2
Making Authenticated Requests
Include your API key in thex-api-key
header:
Request Examples
Authentication Errors
When authentication fails, the API will return a401 Unauthorized
status code with an error response:
Common Error Codes
Error Code | Description |
---|---|
MISSING_API_KEY | No API key provided in the request |
INVALID_API_KEY | API key doesn’t exist or is inactive |
Security Best Practices
Keep Your API Key Secure
Keep Your API Key Secure
- Never expose your API key in client-side code or public repositories
- Store API keys as environment variables
- Use different API keys for different environments (development, staging, production)
- Regularly rotate your API keys
Server-Side Only
Server-Side Only
API keys should only be used in server-side applications. Never include them in:
- Frontend JavaScript code
- Mobile applications
- Public GitHub repositories
- Configuration files committed to version control
Monitor Usage
Monitor Usage
- Regularly review your API usage patterns
- Watch for unexpected spikes in requests
- Contact support if you notice suspicious activity
Getting Your API Key
1
Schedule a demo
During the beta phase, API keys are manually provisioned. Visit our demo page to request access.
2
Tell us how you plan to use the API
Let us know if you plan to use the data for internal business use only or want to integrate it into your product.
3
Receive your key
Our team will review your request and provide you with an API key along with any specific usage guidelines.
Future Self-Service: We’re working on a self-service API key management portal that will be available in a future version of the API.