Getting Your API Key
1
Log in to LeadMagic
Visit app.leadmagic.io and sign in to
your account.
2
Navigate to Account Settings
Click on your profile icon and select “Account Profile” or “API Keys”.
3
Copy your API Key
Your API key will be displayed. Click to copy it to your clipboard.
Using Your API Key
Include your API key in theX-API-Key header of every request:
Authentication Errors
If your API key is missing or invalid, you’ll receive a401 Unauthorized response:
Common authentication issues
Common authentication issues
Security Best Practices
Use Environment Variables
Store your API key in environment variables, not in your code.
Server-Side Only
Never expose your API key in client-side JavaScript or mobile apps.
Use Secrets Managers
For production, use AWS Secrets Manager, HashiCorp Vault, or similar.
Rotate Regularly
Regenerate your API key periodically and if you suspect compromise.
Checking Your Credits
Regenerating Your API Key
If you need to regenerate your API key:1
Go to Account Settings
Navigate to your Account Profile in the LeadMagic dashboard.
2
Click Regenerate
Find the API Key section and click “Regenerate Key”.
3
Update your applications
Replace the old key in all your applications with the new one.
Next Steps
Making API Calls
Learn the basics of making requests to our API.
Email Validation
Try our most popular endpoint.