# 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.

![](/files/A8ujCny5qhttNRgkzwXM)

## 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**.

![](/files/Jb0d4nu6RTa0HDi2eBIK)

## 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**.

![](/files/cNJwge5U3j5MfGfYaCXG)

## 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**.

![](/files/m02UmNWUI7PQMzhCcxUq)

## 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**.

![](/files/ucgXjegiGf0S0T9SWssV)

## Step 6 — Verify the Connection

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

![](/files/dZREkvQhFstiXaDbtAYO)

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.

![](/files/kCZopnirlHGJaqya4ii0)


---

# 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.duplocloud.com/docs/getting-started/integrating-providers/heroku.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.
