> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/hris-and-ats/integrating-with-peoplehr.md).

# Integrating with PeopleHR

### Prerequisites

To connect PeopleHR to Drivetrain, you need:

* An active PeopleHR account
* Admin privileges on PeopleHR
* Admin privileges in Drivetrain

### PeopleHR Setup <a href="#peoplehr-setup" id="peoplehr-setup"></a>

Drivetrain supports integration with PeopleHR via an API key. You generate the key from an account with administrator access and scope it to the data Drivetrain should read.

#### Step 1: Create an API key

1. In your PeopleHR account, open **HR Admin**.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2F383qH5BtXRDgu58xqARj%2Funknown.png?alt=media&#x26;token=92849f95-b41a-400a-9738-08293e774c4b" alt=""><figcaption></figcaption></figure>

2. Go to **Settings > API** and click the **+** icon to create a new key.
3. Enter a **Key Name** (for example, *Drivetrain*) and, optionally, restrict the key to specific **IP Addresses**.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2FCuLiTuxUAftM2YAjs8EK%2Funknown.png?alt=media&#x26;token=2fddf8b4-b1df-46b1-9475-2c2ef208e201" alt=""><figcaption></figcaption></figure>

4. Under **Application Access**, select the areas Drivetrain should read — **Employee**, **Salary**, **Absence**, and **Holiday** — based on your use case.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2FukmRgeAZi4imjafpFjGu%2Funknown.png?alt=media&#x26;token=d4ade680-1e66-4cd6-b682-a9bfb5a386f8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The **Salary** area controls access to compensation data. Include it only if your Drivetrain use case requires salary or pay information. To pull salary or employment **history**, also include the **History** area, as historical fields are only returned on the per-employee detail call.
{% endhint %}

5. Click **Save**.
6. Click the copy icon to copy the key, and store it securely.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2FDzsuwvW26ugf0UmxQuny%2Funknown.png?alt=media&#x26;token=bd0fd400-1f40-40fc-8674-a4530320e80c" alt=""><figcaption></figcaption></figure>

### Drivetrain Setup

#### Step 1: Add the API key and complete the integration

1. Log in to Drivetrain as an administrator.
2. Click **+ New Data Source**.
3. Select **PeopleHR** from the list of connectors.
4. Enter the **PeopleHR API key** you copied.
5. Click **Finish Setup**.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2FYVqBM2DhqAzvNuQwR3Oz%2Funknown.png?alt=media&#x26;token=8e8ae9ec-d3cf-410d-808b-97ff08521a06" alt=""><figcaption></figcaption></figure>

Drivetrain validates the key and begins the initial sync. Once the sync completes, the PeopleHR datasets appear on the Data page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/hris-and-ats/integrating-with-peoplehr.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
