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

# Connect Pleo with API Key – StackOne Hub

> Link a Pleo account in the StackOne Hub using API Key. End-user guide to authorize the integration and start using Pleo actions.

> [!WARNING]
>
> Pleo says Standalone API Keys "aren't enabled by default" and must be requested from your Customer Success Manager or Pleo Support, and that you must be an admin or bookkeeper to create one. If you are an admin or bookkeeper and do not see **API Keys** under **Settings**, Pleo has not enabled API keys for your organization. A key works only in the environment where it was created, so create it in Production.

## Create the API key

A Standalone API Key reads the employees, teams and companies that its access level and permissions allow.

**1. Sign in to Pleo**

Sign in to your [Pleo Web App for Production](https://app.pleo.io/access) as an admin or bookkeeper.

<ul>
  <li>Select **Settings** in the main left-hand menu.</li>
  <li>Scroll down and select **API Keys**.</li>
</ul>

**2. Name the key and set its expiry**

Select **Create API Key**, then fill in the first fields.

<ul>
  <li>**Name**: `StackOne Integration`</li>
  <li>**Expiration**: choose how long the key stays valid. Pleo shows the date the key expires next to your choice and disables the key after that date. The connection then stops working until you create a new key and paste it into StackOne Hub, so pick the longest period your security policy allows.</li>
</ul>

**3. Choose the access level and permissions**

Under **Access level**, select **Only this entity** to limit the key to the company you are working in. Select **All entities in multi-entity organisation** only when the connection must read several companies.

<ul>
  <li>Under **Permissions**, tick only the permissions below. This connector only reads, so leave every other permission unticked.</li>
  <li>`users:read` reads employees. The connection test needs it.</li>
  <li>`team:read` reads teams. The connection test needs it.</li>
  <li>`companies:read` is needed only for the Get Company action. Leave it unticked if you do not use that action.</li>
</ul>

**4. Create the key and copy it**

Select **Create API Key**, then select **Copy API Key** and store the key securely for use later.

<ul>
  <li>The key is shown once. Pleo says "We can display it only once." There is no regenerate option, so create a new key if it is lost.</li>
  <li>Paste it into the **API Key** field in StackOne Hub.</li>
  <li>Format: `pls_` followed by letters, digits and underscores</li>
  <li>Example: `pls_example_key`</li>
</ul>

## Choose a company

The **Company ID** limits StackOne to one Pleo company. It is optional. Set it only when the\
key's access level is **All entities in multi-entity organisation** and StackOne should read\
one company.

<ul>
  <li>Leave it empty to read every company the key reaches. With **Only this entity**, leave it empty.</li>
  <li>Pleo returns the ID as `companyId` on each employee in its Employees API.</li>
  <li>Format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`</li>
  <li>Example: `00000000-0000-0000-0000-000000000000`</li>
  <li>The connection test fails if the key reads no employee in that company.</li>
  <li>Paste it into the **Company ID** field in StackOne Hub.</li>
</ul>

## Revoke the key

To stop StackOne from reading your Pleo data, delete the key.

<ul>
  <li>Navigate to **Settings** > **API Keys**.</li>
  <li>Select the key's row, then select **Delete**.</li>
</ul>

## Linking the Account from the Hub

**1. Navigate to the Hub**

Use one of the three [Linking Account Methods](https://docs.stackone.com/connect/managing-connectors/linking-accounts.md) to access the Hub.

**2. Fill out the fields**

Fill out the following fields using details from your provider:

<ul>
  <li>**API Key**</li>
  <li>**Company ID** (Optional)</li>
</ul>

**3. Connect**

<ul>
  <li>Click **Connect**</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup</li>
</ul>

If the account linking is successful, you will see the newly linked account on your [Accounts](https://app.stackone.com/accounts) page.


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