Overview
In addition to API key authentication, MentionLab uses context headers to scope API requests to specific organisations and projects. These headers ensure you’re working with the correct data and have appropriate access.Required Headers
x-project-id
The unique identifier (UUID) of the project. Required for project-scoped operations.
- Which project’s queries, tags, and results you access
- Project-specific settings and configurations
fedcba98-7654-3210-fedc-ba9876543210)
Finding Your Project ID
From the Dashboard:- Go to app.mentionlab.io
- Open your project and navigate to Project Settings → General
- Your Project ID is displayed on this page
Best Practices
Use environment variables
Use environment variables
Store IDs in environment variables for easy management across environments:
Create a centralized API client
Create a centralized API client
Build a wrapper that automatically includes the required headers to avoid repetition and errors.
Handle multiple projects
Handle multiple projects
If you work with multiple projects, pass the project ID as a parameter rather than hardcoding it.
Next Steps
REST API Getting Started
Review base URL, JSON requirements, and rate limits.
Rate Limits
Understand API rate limits and best practices.