Heroku PostgreSQL
Heroku PostgreSQL is a managed PostgreSQL database service provided by Heroku. The Heroku PostgreSQL connector enables you to access Heroku Postgres databases via the Heroku Platform API using token-based authentication, allowing you to retrieve add-on information, provision new databases, and access database credentials programmatically. This connector is particularly useful for applications that need to manage Heroku Postgres databases, retrieve database connection information, or automate database provisioning workflows.
Power end-to-end data operations for your Heroku PostgreSQL API with Nexla. Our bi-directional Heroku PostgreSQL connector is purpose-built for Heroku PostgreSQL, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Heroku PostgreSQL or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Heroku PostgreSQL workflows fast, secure, and fully governed.
Features
Type: API
- Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
- Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
- API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
- Request optimization with intelligent batching, retry, and caching to minimize API calls and costs
Prerequisites
Before creating a Heroku PostgreSQL credential, you'll need to obtain a Heroku API token from your Heroku account. The Heroku Platform API uses bearer token authentication, and the API token is used to authenticate all API requests.
To obtain a Heroku API token:
-
Log in to your Heroku account at
https://dashboard.heroku.comor use the Heroku CLI. -
Navigate to your account settings. You can access this by clicking on your account name in the top right corner of the Heroku dashboard and selecting Account Settings, or by visiting
https://dashboard.heroku.com/account. -
In the Account Settings page, scroll down to the API Key section.
-
Click Reveal or Show next to the API Key field to display your existing API token, or click Generate New API Key if you need to create a new one.
-
Copy the API token immediately after it's displayed. The token is a long string of characters that will be used as a Bearer token in API requests.
-
Store the API token securely, as it provides full access to your Heroku account via the Platform API.
Alternatively, you can also obtain your API token using the Heroku CLI by running the command heroku auth:token in your terminal. This will display your current API token.
For detailed information about Heroku API authentication and token management, refer to the Heroku Platform API Documentation and Heroku API Authentication Guide.
Authenticate
Credentials required
Authenticate using a Heroku API bearer token.
| Field | Required | Secret | Description |
|---|---|---|---|
| Heroku API Token | Yes | Yes | Your Heroku API token. |
Create a credential in Nexla
- After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
New Credential Overlay – Heroku PostgreSQL

-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
-
In the Heroku API Token field, enter the Heroku API token that you obtained from your Heroku account settings. This token is used as a Bearer token in the Authorization header for all Heroku Platform API requests.
The Heroku API token is sensitive information and provides full access to your Heroku account via the Platform API. Keep it secure and do not share it publicly. If you suspect your token has been compromised, regenerate it immediately in your Heroku account settings.
-
Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.
Use as a data source
To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Heroku PostgreSQL connector tile, then select the credential that will be used to connect to the Heroku Platform API, and click Next; or, create a new Heroku PostgreSQL credential for use in this flow.
Endpoint templates
Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Heroku Platform API endpoints. Each template is designed specifically for the corresponding Heroku API endpoint, making data source setup easy and efficient. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.
Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.
Manual configuration
Heroku PostgreSQL data sources can also be manually configured to ingest data from any valid Heroku Platform API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.
Heroku Platform API endpoints typically follow the pattern https://api.heroku.com/apps/{app-name}/addons or https://api.heroku.com/apps/{app-name}/addons/{addon-id}/config. Requests require the header Accept: application/vnd.heroku+json; version=3 to specify the API version and response format; the Authorization: Bearer {token} header is typically handled automatically by your credential configuration. For the response data path, use $[*] for a root-level array of objects, or $.data[*] if the response is wrapped in a data object. For complete information about Heroku Platform API endpoints and response formats, see the Heroku Platform API Documentation.
Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Heroku PostgreSQL data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.