Authentication
The Case AI API uses Bearer token authentication. All API requests must include your API key in theAuthorization header.
Getting Your API Key
- Log in to your buyer dashboard
- Navigate to Account > API Keys
- Click Create API Key
- Give your key a name and copy the generated key
Making Authenticated Requests
Include your API key in theAuthorization header with the Bearer prefix:
API Key Format
API keys follow this format:- Test keys:
cc_test_prefix - Live keys:
cc_live_prefix
Security Best Practices
Keep keys secret
Keep keys secret
Never commit API keys to version control or expose them in client-side JavaScript. Use environment variables instead.
Use separate keys for dev/prod
Use separate keys for dev/prod
Create separate API keys for development and production environments.
Rotate keys periodically
Rotate keys periodically
Regenerate your API keys periodically and immediately if you suspect they’ve been compromised.
Monitor usage
Monitor usage
Check your API key activity in the dashboard to detect unauthorized use.
Error Responses
If authentication fails, you’ll receive a401 Unauthorized response: