API Referencev2.0.0
Authentication
Authentication
All API requests must be authenticated using an API key sent via the Authorization header.
Obtaining an API Key
- Log in to your dashboard
- Navigate to Settings → API Keys
- Click Generate New Key
Using Your API Key
Include the key in the Authorization header of every request as a Bearer token.
Security Best Practices
- Never commit API keys to source control
- Use environment variables
- Rotate keys regularly
Code Samples
Authenticated cURL request
bashcurl https://api.example.com/v2/users \
-H "Authorization: Bearer YOUR_API_KEY"Using fetch in JS
javascriptconst response = await fetch('https://api.example.com/v2/users', {
headers: {
'Authorization': `Bearer ${process.env.API_KEY}`
}
});
const data = await response.json();