---
updatedAt: 2026-10-05T10:08:14.000Z
agentTools:
  projectIndex: https://apidoc.factorialhr.com/llms.txt
---

# API Keys Setup Guide

Complete step-by-step guide for creating and managing API Keys

## Overview

This guide walks you through setting up API Key authentication with Factorial. API Keys are the simplest way to authenticate against the Factorial API as no OAuth flow is required.

## Prerequisites

Before starting, make sure you have:

* Admin access to Factorial HR
* Access to the correct environment: <Anchor target="_blank" href="https://app.factorialhr.com/">Production </Anchor>or <Anchor target="_blank" href="https://app.demo.factorial.dev/">Demo</Anchor>

**How to choose your environment:&#x20;**<Anchor target="_blank" href="https://apidoc.factorialhr.com/docs/production-and-demo">**Environments: Production and Demo**</Anchor>

## Understanding API Keys

An API Key provides **company-wide access** to Factorial data. All requests are authenticated on behalf of the company.

| Property          | Details                                                               |
| ----------------- | --------------------------------------------------------------------- |
| **Lifetime**      | Does not expire (but can be revoked)                                  |
| **Use case**      | Simple integrations that need full company data without an OAuth flow |
| **Permissions**   | Full access to all company data                                       |
| **How it's sent** | As a header: `x-api-key: <YOUR_API_KEY>`                              |

<Callout icon="⚠️" theme="warn">
  ### **API Keys vs OAuth Tokens:** API Keys are simpler to set up but offer less granular access control than Company or User Tokens. If your integration requires user-scoped permissions, use OAuth 2.0 instead. See the \[<Anchor target="_blank" href="https://apidoc.factorialhr.com/v2026-10-01/docs/oauth-2">OAuth 2.0 Setup Guide</Anchor>].
</Callout>

## Creating an API Key

### Step 1 — Navigate to API Keys

1. Log in to Factorial with your admin account.
2. Go to **Settings → API Keys**.

![](https://files.readme.io/0f6fb24534f2da5700ec7edfe7e6702e8c32bad79b6dbf098d3a88166d8ac698-image.png)

### Step 2 — Create a New API Key

1. Click **"New API Key"**.
2. Give the key a descriptive name, for example, the name of the integration or external system it will be used for (e.g., `PowerBI Integration`, `Zucchetti Sync`).
3. Click **"Get my API Key"**.

![](https://files.readme.io/cba298de66b660f777b4e807ae035b0dcd0a95da688c3f6b64a49c35a35098d0-image.png)

<Callout icon="✅" theme="okay">
  ### **Best practice:** Use one API key per integration. This makes it easier to revoke access for a specific integration without affecting others.
</Callout>

### Step 3 — Copy and Store the Key

1. Copy the generated API key immediately and store it in a secure location (e.g., a password manager or secrets vault).
2. The key **will not be shown again** after you close this screen.

<Image src="https://files.readme.io/a9828431348930458826906e7b593fbb2da8bf43bbe3fc2e5712e103e1d4e33c-image.png" width="500px" />

<Callout icon="⚠️" theme="warn">
  ### **Important:** If you lose the key, you will need to revoke it and create a new one.
</Callout>

## Using the API Key

Include the key in every API request using the `x-api-key` header:

```
 --url 'https://api.factorialhr.com/api/2026-10-01/resources/employees/employees?only_active=true&only_managers=true' \
--header 'accept: application/json' \
--header 'x-api-key: YOUR-API-KEY'
```

## Revoking an API Key

If a key is compromised or no longer needed:

1. Go to **Settings → API Keys**.
2. Find the key you want to remove.
3. Click the three dots and **"Delete API Key"**.

   ![](https://files.readme.io/d73e735a7a1f81bb7649d59781eff080e48d91a5fb07e24f4e1918010444579d-image.png)

<Callout icon="⚠️" theme="warn">
  ### **Important:** Once revoked, any integration using that key will immediately lose access.
</Callout>

<br />

<br />

# Support

If you have any issues or questions about the API, don't hesitate to get in touch with our Tech Support team by filling out one of the following forms:

> **➡️&#xA0;**<Anchor target="_blank" href="https://portal.support.factorialhr.com/servicedesk/customer/portal/347/group/478/create/1119">**Partner Developers Tech Support**</Anchor>

> **➡️&#xA0;**<Anchor target="_blank" href="https://portal.support.factorialhr.com/servicedesk/customer/portal/5/group/7/create/19">**Clients Customer Support**</Anchor>

<br />