Bearer Token Authentication
All Bouncy.ai API requests require authentication using an API key passed as a Bearer token in theAuthorization header of every request.
Getting Your API Key
1
Upgrade to Growth Plan
API access requires a Growth plan or higher ($35/month).
2
Generate an API Key
- Go to bouncy.ai/api/dashboard
- Click “Create Key”
- Give your key a descriptive name
- Choose a role: Full Access, Creator, or Viewer (read only)
- Copy and save your key securely
3
Store Securely
API Key Format
Bouncy.ai API keys follow this format:- bcy_ - Bouncy.ai identifier
- live_ - Production environment
- pk_ - Private key (keep secret!)
- 64 characters - Random hex string
Making Authenticated Requests
Include your API key as a Bearer token in theAuthorization header:
Using Environment Variables
Recommended: Store your API key in an environment variable:API Key Roles
Every key gets a role when you create it. The role controls which endpoints the key can call. You can have up to 10 active keys, so you can hand out narrowly scoped keys instead of sharing your main one.
The rule of thumb:
GET endpoints need read permission for their resource, and everything else needs write permission. GET /v1/account/profile is the exception: it returns account owner details (email, name, billing), so only Full Access keys can call it.
Keys created before roles existed keep working unchanged, with full access.
Insufficient permissions error
When a key calls an endpoint outside its role, the API returns403 Forbidden:
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_••••) - Role (Full Access, Creator, or Viewer)
- 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.
Use role-scoped keys
Use role-scoped keys
Create a Viewer key for read-only integrations and reporting tools. If that key ever leaks, it cannot be used to create or change anything on your account.
Authentication Errors
401 Unauthorized - Missing API Key
Authorization 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:
When you exceed a limit, the API returns
429 Too Many Requests with a message explaining which limit you hit and when it resets.
See the Error Handling Guide for more details on rate limiting.