# Heroku

Manage Heroku: apps, dynos, config vars, releases, addons, pipelines. Exposes **40 actions** covering the API surface an agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `heroku_apps_list` | List all apps - GET /apps. |
| `heroku_app_get` | Get one app - GET /apps/&#123;id&#125;. |
| `heroku_app_create` | Create a new app - POST /apps. |
| `heroku_app_update` | Update an app - PATCH /apps/&#123;id&#125;. |
| `heroku_app_delete` | Delete an app - DELETE /apps/&#123;id&#125;. |
| `heroku_dynos_list` | List dynos (running processes) in an app - GET /apps/&#123;app_id&#125;/dynos. |
| `heroku_dyno_get` | Get one dyno - GET /apps/&#123;app_id&#125;/dynos/&#123;dyno_id&#125;. |
| `heroku_dyno_restart` | Restart a dyno or all dynos - POST /apps/&#123;app_id&#125;/dynos/&#123;dyno_id&#125;/actions/restart. |
| `heroku_dyno_scale` | Scale dynos for a process type - PATCH /apps/&#123;app_id&#125;/formations/&#123;type&#125;. |
| `heroku_config_vars_get` | Get all config vars (environment variables) for an app - GET /apps/&#123;app_id&#125;/config-vars. |
| `heroku_config_vars_update` | Update config vars - PATCH /apps/&#123;app_id&#125;/config-vars. |
| `heroku_releases_list` | List releases (deployment history) - GET /apps/&#123;app_id&#125;/releases. |
| `heroku_release_get` | Get one release - GET /apps/&#123;app_id&#125;/releases/&#123;release_id&#125;. |
| `heroku_release_rollback` | Rollback to a previous release - POST /apps/&#123;app_id&#125;/releases. |
| `heroku_addons_list` | List add-ons (services like databases, caching) for an app - GET /apps/&#123;app_id&#125;/addons. |
| `heroku_addon_get` | Get one add-on - GET /apps/&#123;app_id&#125;/addons/&#123;addon_id&#125;. |
| `heroku_addon_create` | Attach an add-on to an app - POST /apps/&#123;app_id&#125;/addons. |
| `heroku_addon_update` | Update an add-on - PATCH /apps/&#123;app_id&#125;/addons/&#123;addon_id&#125;. |
| `heroku_addon_delete` | Delete an add-on - DELETE /apps/&#123;app_id&#125;/addons/&#123;addon_id&#125;. |
| `heroku_builds_list` | List builds (compilation jobs) for an app - GET /apps/&#123;app_id&#125;/builds. |
| `heroku_build_get` | Get one build - GET /apps/&#123;app_id&#125;/builds/&#123;build_id&#125;. |
| `heroku_build_create` | Create a build from source archive - POST /apps/&#123;app_id&#125;/builds. |
| `heroku_domains_list` | List custom domains for an app - GET /apps/&#123;app_id&#125;/domains. |
| `heroku_domain_get` | Get one domain - GET /apps/&#123;app_id&#125;/domains/&#123;domain_id&#125;. |
| `heroku_domain_create` | Add a custom domain to an app - POST /apps/&#123;app_id&#125;/domains. |
| `heroku_domain_delete` | Remove a custom domain - DELETE /apps/&#123;app_id&#125;/domains/&#123;domain_id&#125;. |
| `heroku_formations_list` | List formations (dyno type configuration) - GET /apps/&#123;app_id&#125;/formations. |
| `heroku_formation_get` | Get one formation - GET /apps/&#123;app_id&#125;/formations/&#123;process_type&#125;. |
| `heroku_formation_update` | Update a formation - PATCH /apps/&#123;app_id&#125;/formations/&#123;process_type&#125;. |
| `heroku_collaborators_list` | List collaborators on an app - GET /apps/&#123;app_id&#125;/collaborators. |
| `heroku_collaborator_get` | Get one collaborator - GET /apps/&#123;app_id&#125;/collaborators/&#123;collaborator_id&#125;. |
| `heroku_collaborator_create` | Invite a collaborator to an app - POST /apps/&#123;app_id&#125;/collaborators. |
| `heroku_collaborator_delete` | Remove a collaborator - DELETE /apps/&#123;app_id&#125;/collaborators/&#123;collaborator_id&#125;. |
| `heroku_pipelines_list` | List pipelines (CI/CD workflow containers) - GET /pipelines. |
| `heroku_pipeline_get` | Get one pipeline - GET /pipelines/&#123;pipeline_id&#125;. |
| `heroku_pipeline_create` | Create a pipeline - POST /pipelines. |
| `heroku_pipeline_delete` | Delete a pipeline - DELETE /pipelines/&#123;pipeline_id&#125;. |
| `heroku_log_session_create` | Create a log session to tail app logs - POST /apps/&#123;app_id&#125;/log-sessions. |
| `heroku_account_get` | Get authenticated account info - GET /account. |
| `heroku_account_update` | Update account settings - PATCH /account. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`HEROKU_API_TOKEN`** - Heroku - Account settings - API Key, or `heroku authorizations:create`. (https://dashboard.heroku.com/account)

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `HEROKU_API_TOKEN` | Heroku - Account settings - API Key, or `heroku authorizations:create`. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope; regenerate it.
- **`429 Too Many Requests`** - provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [Heroku API documentation](https://devcenter.heroku.com/articles/platform-api-reference)
