Authentication
All Ticksupply API requests require authentication using an API key. This guide covers how to create, use, and manage your API keys.API key authentication
Pass your API key in theX-Api-Key header with every request:
Creating API keys
Generate API keys from your dashboard:Create a new key
Click Create API Key and give it a descriptive name (e.g., “Production Server” or “Development”).
Using API keys in your code
- cURL
- Python
- JavaScript
Account isolation
API keys are scoped to your account. Every API key:- Can only access data belonging to your account
- Shares rate limits with other keys on the same account
- Has the same permissions as other keys on your account
All subscriptions and exports created with any of your API keys are visible to all your API keys.
Authentication errors
If authentication fails, you’ll receive a401 Unauthorized response:
X-Request-Id header you can reference when contacting support.
Common causes:
| Issue | Solution |
|---|---|
Missing X-Api-Key header | Add the header to your request |
| Invalid API key | Check for typos or regenerate the key |
| Deleted API key | Create a new key in the dashboard |
| Incorrect header name | Use X-Api-Key (case-sensitive) |
Security best practices
Use environment variables
Never hardcode API keys in your source code:Rotate keys periodically
Create new keys and retire old ones regularly:- Create a new API key in the dashboard
- Update your applications to use the new key
- Verify everything works correctly
- Delete the old key
Use separate keys for environments
Create different keys for development, staging, and production:- Development: Test locally without affecting production data
- Staging: Validate changes before production deployment
- Production: Use only in your production environment
Monitor key usage
Review your API usage regularly in the dashboard to detect:- Unexpected spikes in requests
- Requests from unknown IP addresses
- Failed authentication attempts
Request tracing
Every API response includes anX-Request-Id header: