The LeadMagic API uses API key authentication to secure all requests. Your API key must be included in the header of every request.Documentation Index
Fetch the complete documentation index at: https://leadmagic.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Getting Your API Key
Log in to LeadMagic
Visit app.leadmagic.io and sign in to
your account.
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
| Issue | Solution |
|---|---|
| Missing header | Ensure X-API-Key header is included |
| Header name variation | Header names are case-insensitive; use X-API-Key as canonical |
| Invalid key | Verify your key in the dashboard |
| Expired key | Regenerate your API key |
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:Next Steps
Making API Calls
Learn the basics of making requests to our API.
Email Validation
Try our most popular endpoint.