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

# API keys

> Create an API key to connect a subaccount to n8n or your own systems.

An API key lets an integration, such as n8n or your CRM, work with one subaccount's leads, conversations and agents. You create it in the dashboard and paste it into the integration.

## How it works

* Each key belongs to one subaccount and only reaches that subaccount's data.
* The full key is shown only once, when you create it.
* **Who can manage keys:** Owner, Agency Admin, Subaccount Owner and Subaccount Admin.
* **Acts as** shows the role the key works with: that of the person who created it, or **Subaccount Owner** if it was created from the agency or its creator has left the team.

## Create a key

**1. Open API keys**

Inside a subaccount, go to **Settings › Subaccount › API keys**. In the agency view, **Settings › Agency › API keys** lists the keys of all your clients. Without agency mode, it's **Settings › Organization › API keys**.

**2. Create it**

Select **Create key** and give it a **Name** that says what it's for, such as the integration that will use it. From the agency, also choose its **Subaccount**.

**3. Copy it**

Copy the key and store it somewhere safe. You won't be able to see it again.

**4. Use it**

Follow [Authentication](https://docs.newlead.ai/authentication.md) to send it with your requests, or [n8n](https://docs.newlead.ai/n8n.md) to use it in your workflows.

## Good to know

* **Revoke key** stops it working right away. Do it whenever a key may have leaked, and create a new one.
* Removing someone from the team lets you revoke or keep the keys they created. See [Team and roles](https://docs.newlead.ai/guide/getting-started/team-and-roles.md).
* Deleting a client revokes all its keys.

> [!WARNING]
>
> Use a key only on a server, never in a website or a mobile app. Anyone who has it can read your leads, send messages and place calls.

## Related

* [Authentication](https://docs.newlead.ai/authentication.md)
* [n8n](https://docs.newlead.ai/n8n.md)


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