Learn how to build a new proof-of-concept app with support for app objects.
Install the latest version of the HubSpot CLI
7.6.0
or later. You can check which version of the CLI you have by running hs --version
.Authenticate your developer account
Create a new boilerplate project
Configure the newly created project and upload it to your developer account
<file-name>-hsmeta.json
configuration files.App features are then created using a combination of subfolders from the main /src/app
directory and other configuration files as needed. To configure your project:app-hsmeta.json
file based on your local (or another non-production) OAuth server configuration.https://localhost:3000/oauth-callback
as the redirect URL configured in the boilerplate example code from the hs project create
command you ran in the previous step.uid
property of the app in the app-hsmeta.json
file and the other *-hsmeta.json
configuration files in your project.*-object-hsmeta.json
configuration. For reference, the fully-qualified name (FQN) for your app object will be a<appId>_<name>
. For example, if your appId
is 16858319
and your name
property was CARS
, then your FQN would be a16858319_cars
.hs project upload
CLI command to upload your project to the HubSpot developer platform and automatically trigger a new build.https://app.hubspot.com/developer_projects/<accountId>
to visit the projects UI and confirm the app and project have been created, built, and deployed correctly.Add the client ID and client secret of your app to your app
Configure the app object schema configuration
/src/app
directory and name it app-objects
. The resulting path to the new directory should be /src/app/app-objects
.-object-hsmeta.json
. For example, in the reference project template, the app object name is “CAR”, so the resulting configuration file is named car-object-hsmeta.json
.config
object of your definition, the name
field must match the name that was granted to your app during the review process, formatted in UPPER_SNAKE_CASE
format.https://app.hubspot.com/developer_projects/<hubId>
to visit the projects UI and confirm the app and project have been created, built, and deployed correctly.Update your app
app-hsmeta.json
file to reflect the scopes created from the previous step. These scopes should be visible in the CLI logs after you ran hs project upload
.app-hsmeta.json
file and add the new scopes to the array of requiredScopes
within the auth
definition. For example, if your appId
was a12345
, then you’d edit the auth
definition to the following:schemas.read
scope is included in your app settings, and is requested during the
installation/reauthorization OAuth flow. It’s highly recommended including
all app object scopes in your settings, but schemas.read
is mandatory for
customers to be able to access it. For example, for an appId
of 12345
,
you’d include crm.app.schemas.a12345_MY_APP_OBJECT.read
as a required
scope.conditionallyRequiredScopes
when you’re ready for production.
Learn more about these scope types in the public app
documentation.Create a developer test account (optional) and install your app
Programmatic data access using the HubSpot objects API
objectTypeId
or fullyQualifiedName
as the objectType
path parameter in your request.For example, the following code block demonstrates how to make cURL request to create a new record of your app object:objectTypeId
for your app object by navigating to the records index page:objectTypeId
will appear in the URL between the /objects/<objectTypeId>/views
portion.