API Key Authentication
All Bouncy.ai API requests require authentication using an API key. Include your API key in theX-Api-Key header of every request.
Getting Your API Key
Upgrade to Growth Plan
API access requires a Growth plan or higher ($35/month).
Generate an API Key
- Go to bouncy.ai/api/dashboard
- Click “Create New Key”
- Give your key a descriptive name
- Copy and save your key securely
API Key Format
Bouncy.ai API keys follow this format:- bcy_ - Bouncy.ai identifier
- live_ - Production environment
- pk_ - Private key (keep secret!)
- 40 characters - Random alphanumeric string
Making Authenticated Requests
Include your API key in theX-Api-Key header:
Using Environment Variables
Recommended: Store your API key in an environment variable:Managing API Keys
Viewing Your Keys
View all your API keys in the API Dashboard. You can see:- Key name and prefix (e.g.,
bcy_live_pk_••••) - Creation date
- Last used date
- Current usage statistics
Revoking Keys
If an API key is compromised:- Go to bouncy.ai/api/dashboard
- Find the compromised key
- Click “Revoke”
- Create a new key immediately
- Update your applications with the new key
Security Best Practices
Never commit keys to version control
Never commit keys to version control
Use
.gitignore to exclude files containing API keys:Use environment variables
Use environment variables
Store API keys in environment variables, not in your code:
Rotate keys regularly
Rotate keys regularly
Create new API keys every 90 days and revoke old ones. This limits exposure if a key is compromised.
Use separate keys per environment
Use separate keys per environment
Create different API keys for development, staging, and production. This makes it easier to revoke a specific environment’s access.
Restrict by IP (Scaling/Dominance plans)
Restrict by IP (Scaling/Dominance plans)
If you have a Scaling or Dominance plan, you can whitelist specific IP addresses for your API keys.
Authentication Errors
401 Unauthorized - Missing API Key
X-Api-Key header.
401 Unauthorized - Invalid API Key
- Check that you’ve copied the full API key
- Verify the key hasn’t been revoked
- Generate a new API key if needed
403 Forbidden - Plan Upgrade Required
Rate Limits
Rate limits are enforced per API key:| Plan | Requests/Hour | Requests/Day |
|---|---|---|
| Growth | 1,000 | 10,000 |
| Scaling | 5,000 | 50,000 |
| Dominance | 10,000 | 100,000 |