Overview
SmartLead API uses API keys for authentication. Your API key carries many privileges, so be sure to keep it secure!Getting Your API Key
Login to SmartLead
Visit app.smartlead.ai and log in to your account
Using Your API Key
Query Parameter Method (Recommended)
Pass your API key as a query parameter in the URL:Request Body Method
For POST/PATCH requests, you can also include the API key in the request body:Example Requests
Authentication Errors
If your API key is invalid or missing, you’ll receive a 401 Unauthorized response:Best Practices
Store API Keys Securely
Store API Keys Securely
- Use environment variables or secure key management systems
- Never hardcode API keys in your source code
- Rotate your API keys periodically
Use Environment Variables
Use Environment Variables
Handle 401 Errors Gracefully
Handle 401 Errors Gracefully
Always check for authentication errors and handle them appropriately in your application.
Rate Limiting
Your API key is subject to rate limiting based on your subscription plan. See Rate Limits for more information.Multiple API Keys
You can generate multiple API keys for different applications or environments:- Production Key: For your live application
- Development Key: For testing and development
- Integration Keys: For specific third-party integrations
Regenerating API Keys
If you suspect your API key has been compromised:- Log in to your dashboard
- Navigate to Settings → API Keys
- Click “Regenerate” next to the compromised key
- Update your application with the new key
