> For the complete documentation index, see [llms.txt](https://docs.duplocloud.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.duplocloud.com/docs/getting-started/integrating-providers/heroku.md).

# Heroku

Connect a Heroku account as a provider so the DuploCloud agent can interact with your Heroku apps, dynos, and resources using your API credentials.

***

## Prerequisites — Retrieve Your Heroku API Token

You need a Heroku API token to authenticate the provider. You can retrieve it from the Heroku Dashboard or the Heroku CLI.

**From the Heroku Dashboard:**

1. Log in to [heroku.com](https://heroku.com) and go to **Account Settings**.
2. Scroll down to the **API Key** section.
3. Click **Reveal** to view your existing token, or **Regenerate API Key** to create a new one.
4. Copy the token.

**From the Heroku CLI:**

```bash
heroku login
heroku auth:token
```

Copy the token output — this is the value you will use in the **Credentials** step below.

***

## Step 1 — Navigate to Providers

Go to **AI Admin → Providers** and click the **Other** tab.

![](https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fgit-blob-7db25a8d7facd8e7dbd5628ef20bc242612daae2%2Fheroku-step-02.png?alt=media)

## Step 2 — Add the Provider

Click **+ Add**. Fill in the fields:

* **Name** — a label for this provider
* **Type** — select **Other**
* **Account ID** — enter `api.heroku.com`

Click **Create Provider**.

![](https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fgit-blob-fab9e5df8276f0abee246c663d9b1060c95e5c1c%2Fheroku-step-03.png?alt=media)

## Step 3 — Provider Created

The provider detail page opens with a success confirmation. The sidebar shows the Category, Type, and Account ID. Two tabs are available: **Scope** and **Credentials**.

![](https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fgit-blob-e806db7471863e4441caaefa7b3c010fb437ae0a%2Fheroku-step-04.png?alt=media)

## Step 4 — Add a Credential

Click the **Credentials** tab, then click **+ Add**. Fill in the modal:

* **Name** — a label for this credential
* **Credential Fields** — add a field with:
  * **Key** — `apitoken`
  * **Type** — `String`
  * **Sensitive** — enable this toggle so the token is stored encrypted
  * **Value** — your Heroku API token

Click **Create**.

![](https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fgit-blob-34e1e9964191eaadca1e72ac761b2e5169b99884%2Fheroku-step-05.png?alt=media)

## Step 5 — Add a Scope

Click the **Scope** tab, then click **+ Add**. Fill in the modal:

* **Name** — a label for this scope
* **Credential** — select the credential created in the previous step

Click **Create**.

![](https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fgit-blob-9f72b8dca06e263c1ce836416378e26ffd34501d%2Fheroku-step-06.png?alt=media)

## Step 6 — Verify the Connection

To confirm the provider is working, create a new ticket and select the Heroku scope from the scope picker.

![](https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fgit-blob-aa5ea945bc4287c05e002baa2832dd4c06ebb28f%2Fheroku-step-08.png?alt=media)

The agent will use the Heroku credential to call the API. A successful response confirms the integration is active — the agent lists your Heroku apps along with their region, stack, and last updated date.

![](https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fgit-blob-978c28ef877dba307863c36a1288ae3f8f326425%2Fheroku-step-09.png?alt=media)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.duplocloud.com/docs/getting-started/integrating-providers/heroku.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
