Skip to content

Authentication

All API requests require authentication using an API key.

  1. Log in to your MidLyr Dashboard
  2. Navigate to Settings > API Keys
  3. Click Create New Key

Set your API key in your environment:

Terminal window
export MIDLYR_API_KEY="ml_..."

Include it in the x-api-key header when calling the HTTP API:

Terminal window
curl https://api.midlyr.com/api/v1/regulations \
-H "x-api-key: $MIDLYR_API_KEY"

The CLI reads MIDLYR_API_KEY from the environment. Self-configured MCP clients can pass the same key in the x-api-key header; OAuth-based clients can use a bearer access token instead.