> 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/customer-success/integrating-with-planhat.md).

# Integrating with Planhat

[Prerequisites](#prerequisites)

[Planhat Setup](#planhat-setup)\
&#x20;  [ Step 1: Create a service account](#step-1-create-a-service-account)\
&#x20;   [Step 2: Generate API access token](#step-2-generate-api-access-token)

## Prerequisites

To connect Planhat to Drivetrain, you need:

1. An active Planhat account with admin privileges.
2. Service Account for token generation.

## Planhat Setup <a href="#planhat-setup" id="planhat-setup"></a>

Drivetrain connects to Planhat using an API access token generated in Planhat for this integration. To setup this integration, you need to login into your Planhat account and create a service account, assign relevant permissions to access Planhat objects, and share the API token with us. This guide covers the above-mentioned steps in detail below.

### Step 1: Create a Service Account <a href="#step-1-create-a-service-account" id="step-1-create-a-service-account"></a>

1. Login into your Planhat account, hover your mouse on your avatar (intials or photo) in the bottom right of your Planhat tenant and click “**Service Accounts**”.
2. Click on **Add New** to create a new service account, and enter the service account name as “Drivetrain Integration”.

{% hint style="info" %}
A service account is a special account used by the applications to access data within relevant permissions, we strongly suggest creating a new service account for Drivetrain. However, you can continue to use an already-created one as well.
{% endhint %}

3. Select a role or service account to copy permissions from. If none is selected, the service account will have full permissions, which you can modify later.
4. Click on **Save.**

<figure><img src="/files/jDTSKprwRwA1CZfbPSEv" alt=""><figcaption></figcaption></figure>

### Step 2: Generate API Access Token <a href="#step-2-generate-api-access-token" id="step-2-generate-api-access-token"></a>

1. If you did not select a role or service account in Step 1, point 3, click on ‘**Permissions**’ under the service account.
2. Assign the relevant permissions here needed for the integration.
3. Click on **Generate New Token.**

{% hint style="info" %}
That’s it share the token with your customer success manager
{% endhint %}


---

# 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/customer-success/integrating-with-planhat.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.
