Authentication
All API requests require authentication using an API key. This page explains how to obtain and use your API key securely.
How Authentication Works
The SalesCaddie API uses API Key authentication. Your API key must be included in the Authorization header of every request using the Bearer authentication scheme.
Request Format
Code
Complete Example
Code
Getting Your API Key
For Production
Please reach out to us at [email protected] to receive your production API credentials. We'll provide you with:
- Your unique API key (starts with
zpka_) - Your tenant ID
- Access to this developer portal
Managing Your Keys (Coming Soon!)
We're currently building a self-service API key management portal where you'll be able to:
- View your existing API keys
- Generate new keys
- Rotate keys without downtime
- Revoke compromised keys
For now, contact us at [email protected] for any key management needs (rotation, revocation, additional keys, etc.).
Security Best Practices
⚠️ Keep Your API Key Secret
Never expose your API key in client-side code, public repositories, or documentation. Treat it like a password.
DO:
- ✅ Store keys in environment variables
- ✅ Use secrets management systems (AWS Secrets Manager, HashiCorp Vault, etc.)
- ✅ Rotate keys regularly
- ✅ Use different keys for different environments (staging vs production)
DON'T:
- ❌ Commit keys to version control (Git, SVN, etc.)
- ❌ Share keys via email or chat
- ❌ Use production keys in staging/development
- ❌ Hardcode keys in your application code
Authentication Errors
If your API key is missing, invalid, or expired, you'll receive a 401 Unauthorized response:
Code
Environment Variables Example
Here's how to securely store and use your API key in different languages:
Node.js
.env file (never commit this!):
Code
In your code:
Code
Python
.env file (never commit this!):
Code
In your code:
Code
PHP
.env file (never commit this!):
Code
In your code:
Code
Next Steps
→ Learn about Core Concepts like idempotency
→ Explore the API Reference for all available endpoints
→ Need help? Check out Support