Skip to main content

Authorization

The MDB Enrichment API uses API key authentication to secure access to all endpoints.
Access to the MDB Enrichment API is currently given to select partners only and is not publicly available.

Getting Your API Key

  1. Log in to the MDB Dashboard at mdb.tools
  2. Navigate to the Admin Dashboard after successful authentication
  3. Generate or retrieve your API key from the dashboard interface

Using Your API Key

Include your API key in the x-api-key header with every request:
curl -X GET "https://api.mdb.tools/v1/endpoint" \
  -H "x-api-key: your-api-key-here" \
  -H "Content-Type: application/json"

Verify Your Access

You can verify your API key and view your organization details using the whoami endpoint:
curl -X GET "https://mdb.tools/whoami" \
  -H "x-api-key: your-api-key-here"
{
  "organization": "Acme Corp",
  "api_key_id": "ak_1234567890",
  "permissions": [
    "email_validation",
    "ip_lookup", 
    "linkedin_scraping"
  ],
  "rate_limits": {
    "requests_per_minute": 1000,
    "requests_per_day": 50000
  },
  "created_at": "2024-01-15T10:30:00Z",
  "last_used": "2024-01-20T14:22:15Z"
}

Security Best Practices

  • Keep your API key secure - Never expose it in client-side code or public repositories
  • Use environment variables - Store your API key in environment variables or secure configuration
  • Rotate keys regularly - Generate new API keys periodically for enhanced security
  • Monitor usage - Check your dashboard regularly for unexpected API usage

Authentication Errors

If authentication fails, you’ll receive a 401 Unauthorized response:
{
  "error": "unauthorized",
  "message": "Invalid or missing API key",
  "code": "AUTH_001"
}
For more details on error codes, see Common Error Codes.