API Key Authentication

The Cleanview API uses API key authentication. All requests must include a valid API key in the x-api-key header.

API Key Format

API keys follow this format:
cv_pub_[32 random characters base64url encoded]
Example: cv_pub_KJ3x9mN2pQ8rS7tV5wY6zA1bC4dE0fG2

Making Authenticated Requests

Include your API key in the x-api-key header:
x-api-key: cv_pub_your_api_key_here

Request Examples

curl -H "x-api-key: cv_pub_your_api_key_here" \
  https://api.cleanview.co/api/v1/eia-860m

Authentication Errors

When authentication fails, the API will return a 401 Unauthorized status code with an error response:
{
  "error": "INVALID_API_KEY",
  "message": "The provided API key is invalid or has been revoked"
}

Common Error Codes

Error CodeDescription
MISSING_API_KEYNo API key provided in the request
INVALID_API_KEYAPI key doesn’t exist or is inactive

Security Best Practices

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.