API Keys
Create and manage API keys for programmatic access
API keys allow you to authenticate with the REST API for programmatic access to your analytics data.
Creating an API Key
Go to Account Settings
Navigate to Account Settings → API Keys.
Create a New Key
Click Create API Key. Give your key a descriptive name so you can identify what it's used for.
Set Expiration (optional)
You can optionally set an expiration date for the key. Keys without an expiration date are valid indefinitely.
Copy Your Key
Copy the generated API key immediately. You won't be able to see it again after closing the dialog.
Using an API Key
Include the API key in the Authorization header of your requests:
curl -H "Authorization: Bearer bs_api_xxxxxxxxxxxx" \
https://app.buddystat.com/api/v1/sitesRate Limits
- 50 requests per minute per API key
- Rate limit information is included in response headers:
X-RateLimit-Remaining— Number of requests remaining in the current windowX-RateLimit-Reset— Unix timestamp when the rate limit resets
Managing API Keys
- View keys — See all your API keys with name, prefix, creation date, and expiration
- Delete keys — Remove keys you no longer need. Deleted keys immediately stop working
- Rotate keys — Create a new key and delete the old one to rotate credentials
Security
API keys grant full access to your analytics data. Treat them like passwords:
- Never share keys in client-side code or version control
- Use short-lived keys and rotate them regularly
- Delete unused keys
API Playground
The API Playground in Site Settings lets you test API requests interactively. You can:
- Select from available API endpoints
- Toggle between session-based auth and API key auth
- View raw request and response data
- Copy curl commands for any request