Getting Your API Key
Your API key is used to authenticate all requests to the MentionLab API.1
Sign in to MentionLab
Go to app.mentionlab.io and sign in to your account.
2
Navigate to Settings
Click on your profile or organization settings in the dashboard.
3
Generate API Key
In the API section, click “Generate API Key” to create a new key.
4
Copy and Store Securely
Copy your API key immediately. For security reasons, you won’t be able to see it again.
API Key Format
MentionLab API keys use the following format:ml_live_ for production keys or ml_test_ for test environment keys.
Using Your API Key
Include your API key in thex-api-key header of every request:
Example
Managing API Keys
Multiple Keys
For different environments or applications, consider using separate API keys:| Environment | Key Purpose |
|---|---|
| Development | Testing and development |
| Staging | Pre-production testing |
| Production | Live application |
Environment Variables
We recommend storing your API key in environment variables:- Unix/Linux/macOS
- Windows
- .env file
Always add
.env files to your .gitignore to prevent accidentally committing secrets to version control.Next Steps
Context Headers
Learn about the x-organisation-id and x-project-id headers required for API requests.