Authorization header.
Creating an API Key
Log in to your account
Go to app.trackyard.com and sign in.
Navigate to API Keys
Click API Keys in the dashboard or visit app.trackyard.com/api-keys.
Using Your API Key
Include your API key in theAuthorization header of every request using the Bearer token scheme:
Example Request
Security Best Practices
Store keys in environment variables
Store keys in environment variables
Never hardcode API keys in your source code. Use environment variables instead.
Use separate keys for different environments
Use separate keys for different environments
Create distinct API keys for development, staging, and production environments. This allows you to:
- Revoke a compromised key without affecting other environments
- Monitor usage separately per environment
- Enforce different rate limits if needed
Production - Main AppStaging - Test EnvironmentDevelopment - Local Testing
Rotate keys regularly
Rotate keys regularly
As a security best practice, rotate your API keys periodically (every 90 days recommended):
- Generate a new API key
- Update your application to use the new key
- Test that the new key works
- Revoke the old key
Restrict key permissions (coming soon)
Restrict key permissions (coming soon)
Future feature: Assign read-only or download-only permissions to specific keys for added security.
Managing API Keys
View All Keys
In your API Keys dashboard, you can see:- Key name — The label you assigned
- Created date — When the key was generated
- Last used — Most recent API call timestamp
- Status — Active or revoked
Revoke a Key
If a key is compromised or no longer needed:- Go to app.trackyard.com/api-keys
- Find the key in the list
- Click Revoke
- Confirm the action
API Key Metadata
Use the/me endpoint to check your key’s metadata:
Common Authentication Errors
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Cause: API key is valid but lacks permissions for the requested action.Solutions:
- Check your account tier (some features require paid plans)
- Verify you’re not trying to access admin-only endpoints