> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuronsearchlab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Keys

> Create scoped Platform API keys for configuration automation and MCP clients.

Open **Developers → API Keys**. The page heading is **Platform API Keys**. These keys authenticate automation against `https://console.neuronsearchlab.com/api`; application traffic uses [SDK credentials](https://docs.neuronsearchlab.com/console/sdk-credentials.md).

## Create a key

1. Select **New API key** and enter a name that identifies its application.
2. Choose an environment: production, staging, dev or test. This is an organisational label, not a separate workspace.
3. Choose the scopes needed by the routes you will call.
4. Create the key and copy its full value from the reveal dialog. It is displayed once.
5. Store it on your server or in your MCP client's secret configuration.

## Scopes

| Scope | Meaning |
| - | - |
| `admin` | Workspace administration; required by most configuration routes |
| `events` | Routes that explicitly permit event access |
| `items` | Routes that explicitly permit item access |
| `recommendations` | Routes that explicitly permit recommendation access |
| `search` | Routes that explicitly permit search access |

A scope name does not grant access to every similarly named route. Check the operation's authentication requirements in the [Platform API reference](https://docs.neuronsearchlab.com/api-reference/platform-api/introduction.md). A valid key with insufficient scope receives `403`.

For example, list rules using a key with `admin` scope:

```bash theme={null}
curl https://console.neuronsearchlab.com/api/rules \
  -H "Authorization: Bearer $NSL_PLATFORM_KEY"
```

## Review and revoke

The table shows the key name, visible prefix, environment, scopes, last-use time and status. Use the prefix to identify a key without exposing its full value.

Select **Revoke** to disable a key. To rotate one, create and deploy its replacement first, verify access, then revoke the original. Check [Activity](https://docs.neuronsearchlab.com/console/activity.md) when investigating configuration changes.

Keep keys private. A publishable website key is a separate credential with a narrower purpose; see [Website embed](https://docs.neuronsearchlab.com/console/website-embed.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.