# How do I create an API key for an integration?

In Kinmu, open My company, go to Public API, select Create API key, set the name, expiration and scopes, and copy the key, which is shown only once.

Open in Kinmu: <https://my.kinmu.app/en/dashboard/company#public-api>

## On the web

1. ### Open **My company**

   On your phone, use the menu button to open the menu first.

   In the left menu.

2. ### Open **Public API**

   On the **My company** page, under **Extensions**, open **Public API**.

   The **API keys** tab opens.

   After you select it:

   ![Create API key button available in the API keys list](https://kinmu.app/help/en/k0028-02.webp)

3. ### Start a new key

   Select **Create API key**.

   After you select it:

   ![Name empty and Production selected in Create API key](https://kinmu.app/help/en/k0028-03.webp)

4. ### Enter a name

   Complete **Name** with a name that identifies the integration.

   ![Name filled and Production selected in Create API key](https://kinmu.app/help/en/k0028-04.webp)

   The name appears in the panel. If you see **Production** and **Sandbox**, choose the environment. **Sandbox** works on a test company with synthetic data.

5. ### Choose the expiration

   In **Expiration**, choose how many days the key will work or **No expiration**.

   After you select it:

   ![Expiration options expanded in Create API key](https://kinmu.app/help/en/k0028-05.webp)

   If you choose a time limit, the key will stop working automatically when it expires.

6. ### Choose the scopes

   In **Scopes**, select only the scopes your integration needs, such as **Employees (read)**.

   After you select it:

   ![Employees (read) enabled in the API key scopes](https://kinmu.app/help/en/k0028-06.webp)

7. ### Create the key

   Select **Create key**.

   After you select the button, you see “Copy your API key now” with the full key.

8. ### Copy the key

   Select **Copy**, store the key somewhere safe and select **Done**.

   The key appears in the list, masked. Kinmu will not show it again.

## If you don't see it

- **Public API** needs the **Public API** extension, turned on in **My company** › **Extensions**.
- Required roles: **Global Admin**, **Manager**.
- If **Create API key** is disabled, you have reached the maximum of active keys. Revoke one to create a new key.
- If you see “Select at least one scope.”, tick at least one scope before creating the key.

## Common questions

### I lost the key. How do I get it back?

You can’t see it again. Open the key in the list and select **Rotate** to get a new one with the same scopes, or create a new key. The old one stops working at once, so update your integrations.

### How do I stop an integration from using a key?

Open the key and select **Revoke**. The key stops working immediately and this can’t be undone.

## Result

The new key appears in **API keys** with its status. Your integration sends it in the **Authorization: Bearer** header of each request. The technical reference is at [docs.kinmu.app](https://docs.kinmu.app/).
