Overview
All MentionLab REST API requests require an API key sent in thex-api-key header. Your API key is scoped to a single organization and can access all projects within that organization.
Project-scoped API keys are on the roadmap.
Get Your API Key
You can retrieve your API key from the dashboard:1
Sign in to MentionLab
Go to app.mentionlab.io and sign in to your account.
2
Open API Keys
Use the organization switcher in the top bar, choose Organization settings, then
Developer settings → API Keys in the sidebar.
3
Create the key
Click Create API Key and set a Name, a Permission (
Read only or Read & Write)
and an optional Expiration Date — leave it empty for a key that never expires.4
Copy and store securely
Copy your API key immediately. For security reasons, you will not be able to see it again.
Only organization Administrators can create or delete keys. Editors can see the list.
Permissions
API Key Format
MentionLab API keys use the following format:ml_live_ for production keys.
Using Your API Key
Include your API key in thex-api-key header of every request:
Example
Environment Variables
We recommend storing your API key in environment variables:- Unix/Linux/macOS
- .env file
Always add
.env files to your .gitignore to prevent accidentally committing secrets to version control.Required Headers
Example Request
Most list endpoints arePOST, with filters and paging in the body:
Project Context
Project-specific endpoints require thex-project-id header so the API knows which project to operate on. You can store a default project ID in your environment if most requests target a single project.
A missing or invalid context header returns 403, not 400 — for example
Missing project id context or Project does not belong to specified organisation.Invalid keys
Rate Limits
The MentionLab API implements rate limiting to ensure fair usage and maintain service stability for all users. Understanding these limits helps you design efficient integrations that avoid throttling.Default Rate Limits
All accounts share the same default rate limits:If you have a custom agreement with MentionLab, your rate limits may differ from the defaults listed here. Please refer to your agreement documentation for your specific limits.
Rate Limit Headers
Every API response includes headers to help you track your usage:Handling Rate Limits
When you exceed the rate limit, the API returns a429 Too Many Requests response:
Error Codes
Next Steps
Context Headers
See all header requirements and examples.
REST API Getting Started
Review base URL, JSON requirements, and rate limits.