Docs
APIGetting started

Create an API key

Mint a Layers API key and authenticate your first request.

View as Markdown

Every request to the Layers API — and every MCP session — authenticates with a Bearer key. Here's how to get one.

Keys are shown once at creation. Copy it somewhere safe; you can't read it again, only rotate or revoke it.

Option A — from the dashboard

Open Org Settings → API Keys in the Layers app.

Click Create key, pick the scopes it needs, and copy the lp_… secret.

Store it as an environment variable:

export LAYERS_API_KEY=lp_xxxxxxxxxxxxxxxxxxxx

Option B — for a customer (sub-organization)

If you manage customers as sub-organizations, mint a scoped child key with your parent key — see createSubOrgApiKey.

Make your first call

curl https://api.layers.com/v1/whoami \
  --header "Authorization: Bearer $LAYERS_API_KEY"

A 200 with your organization confirms the key works. Next: Authentication · Common patterns.

On this page