Authentication
API Reference
API Key Authentication
Barq uses API keys for authentication. Include your key in every request via the Authorization header.
Bearer Token Format
Authorization: Bearer YOUR_BARQ_API_KEY
Getting Your API Key
- Sign up at barqapi.com/signup
- Verify your email address
- Go to Dashboard → API Keys
- Click Create API Key
- Copy and store your key securely — it won't be shown again
Security Best Practices
- Never expose your API key in client-side code, public repos, or screenshots
- Use environment variables to store keys (
BARQ_API_KEY) - Rotate keys periodically — create new keys and revoke old ones
- Set IP whitelists for production environments
- Monitor key usage in your dashboard for anomalies
Example: Environment Variable
# .env
BARQ_API_KEY=barq-sk-abc123xyz...
Key Revocation
You can revoke any API key from your dashboard. Revoked keys stop working immediately. Create a new key to continue using the API.