# Planhat

### How to set up a Service Account and retrieve an API Access Token <a href="#h_5c9f007e85" id="h_5c9f007e85"></a>

To quickly set up a Service Account, refer to the GIF below. Click to view it in a larger format. For detailed step-by-step instructions, see the text following the GIF.

[![](https://downloads.intercomcdn.com/i/o/390351731/7cd0689ac59cc984582ff2a8/Service+accounts.gif?expires=1761685200\&signature=7e06a81dcce83fed57c01b739098031356e2a9c771a22a9a439dab4ffbdefa2f\&req=dyknFcx%2FmoJeFb4f3HP0gCX0xkVZd%2Bv%2FmnpWgL2DAiKZzLCCuYfpAeOC22jm%0A7B1R2j6udImu%2FHG6mg%3D%3D%0A)](https://downloads.intercomcdn.com/i/o/390351731/7cd0689ac59cc984582ff2a8/Service+accounts.gif?expires=1761685200\&signature=7e06a81dcce83fed57c01b739098031356e2a9c771a22a9a439dab4ffbdefa2f\&req=dyknFcx%2FmoJeFb4f3HP0gCX0xkVZd%2Bv%2FmnpWgL2DAiKZzLCCuYfpAeOC22jm%0A7B1R2j6udImu%2FHG6mg%3D%3D%0A)

1. Hover over your avatar (initial or photo) in the bottom right corner of your Planhat tenant, and click "Service Accounts."

   📌 Note: If "Service Accounts" is not visible, your user account may not have access. Contact a Planhat admin to adjust your role settings if necessary.

   * [![](https://downloads.intercomcdn.com/i/o/1177759521/3a27117f307f24e07e25ddcd/image.png?expires=1761685200\&signature=e53db345f55aa19f1c574a11db1e1fb95b96b12bbd456ddf8310fd211cc56cf7\&req=dSEgEc57lIRdWPMW1HO4zXmZE%2BZV57hnLrTNRkdOHszb8WGLjmpcN0n%2FqrrJ%0AsjIP%0A)](https://downloads.intercomcdn.com/i/o/1177759521/3a27117f307f24e07e25ddcd/image.png?expires=1761685200\&signature=e53db345f55aa19f1c574a11db1e1fb95b96b12bbd456ddf8310fd211cc56cf7\&req=dSEgEc57lIRdWPMW1HO4zXmZE%2BZV57hnLrTNRkdOHszb8WGLjmpcN0n%2FqrrJ%0AsjIP%0A)
2. Click the blue "Add New" button
3. A modal will appear:\
   ​

   [![](https://downloads.intercomcdn.com/i/o/1177790094/b8df794dd44862b79ab52420/image.png?expires=1761685200\&signature=d1959c9169836f2a05fefe6f164e855b923adf0e1aebe3f28c11810302afeca8\&req=dSEgEc53nYFWXfMW1HO4zdVwTg1NDvalp6g5OibHxXVp7lSmmSmbroNDPqFy%0AfeWj%0A)](https://downloads.intercomcdn.com/i/o/1177790094/b8df794dd44862b79ab52420/image.png?expires=1761685200\&signature=d1959c9169836f2a05fefe6f164e855b923adf0e1aebe3f28c11810302afeca8\&req=dSEgEc53nYFWXfMW1HO4zdVwTg1NDvalp6g5OibHxXVp7lSmmSmbroNDPqFy%0AfeWj%0A)

   * Name - give your Service Account a suitable name
   * Copy Permissions From
     * Here you define which permissions the Service Account has (so what its associated API Access Token will be able to do). Note that you can change this later if required
     * You have the option to:
       * Start from scratch
       * Use the permissions of your choice of existing Service Account
       * Use the permissions of your choice of existing [Role](https://support.planhat.com/en/articles/4560179-roles-permissions)
     * This is great because you don't need to start from scratch each time you want to define permissions!
     * If you would like to know more about our permissions then check out this [article](https://support.planhat.com/en/articles/4560179-roles-permissions) 👍\
       ​
4. Your Service Account has now been created! It will open up a modal similar to this:

   [![](https://downloads.intercomcdn.com/i/o/1177825777/8cb9f87eb671e57d18fefed1/image.png?expires=1761685200\&signature=c5af2b2ca229065c02f8c2873ead80a91219cf4dea785e72dc688f86d71b91d3\&req=dSEgEcF8mIZYXvMW1HO4zciWfezIC4z4ldTsO%2FVVaJ0Qftjkzpup50r1v634%0AsG4W%0A)](https://downloads.intercomcdn.com/i/o/1177825777/8cb9f87eb671e57d18fefed1/image.png?expires=1761685200\&signature=c5af2b2ca229065c02f8c2873ead80a91219cf4dea785e72dc688f86d71b91d3\&req=dSEgEcF8mIZYXvMW1HO4zciWfezIC4z4ldTsO%2FVVaJ0Qftjkzpup50r1v634%0AsG4W%0A)

   * INFO - in this tab, you can add a description to explain what the Service Account is used for, and generate API Access Tokens (as described in the next step)
   * PERMISSIONS - here you can set/edit the Service Account permissions (what the API Access Token can be used for)
   * LOGS - view your API request history
5. Click the blue "Generate New Token" button at the bottom of the "INFO" tab to generate your API Access Token
   * 📌 Important to note: The API Token will only be displayed this once, so make sure you copy it and store it securely. If you lose it and need it again, you will need to generate a new API Token
6. Copy the API token&#x20;
7. You can now close the modal
8. Go to churned > integrations > paste the API token into the Churned integration form.

Click Save to test the connection. Once it’s working, notify the Churned team to begin syncing data.


---

# Agent Instructions: 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:

```
GET https://docs.churned.io/churned-docs/integrations/planhat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
