API Keys
All API requests require a Bearer token in theAuthorization header:
mk_ and are tied to your user account.
Getting your API Key
1
Access Settings
Log into Roulette, click your team name in the sidebar, then go to Settings → API Keys.
2
Create a Key
Click Create API Key and give it a descriptive name (e.g., “Zapier”, “Internal Scripts”).
3
Copy and Store
Copy the key immediately - you won’t see it again.
Example Requests
Error Responses
401 Unauthorized
| Cause | Solution |
|---|---|
| Invalid key | Check for typos or generate a new key |
| Missing header | Add Authorization: Bearer YOUR_KEY |
| Deleted key | Create a new API key in settings |
403 Forbidden
Best Practices
Use Environment Variables
Use Environment Variables
Separate Keys per Environment
Separate Keys per Environment
Create different keys for development, staging, and production. This lets you rotate keys independently and track usage.
Rotate Keys Periodically
Rotate Keys Periodically
Delete old keys and create new ones regularly. You can have multiple active keys for zero-downtime rotation.
Rate Limits
| Limit | Value |
|---|---|
| Requests per minute | 1,000 |
| Requests per second | 100 |
429 Too Many Requests:
Permissions
Your API key inherits your user permissions:- Access is limited to teams you’re a member of
- Row Level Security (RLS) applies to all requests
- You can only see companies based on your team’s visibility settings

