Skip to main content
The commands listed below provide access to managing custom objects in your account via the HubSpot CLI.
Please note:
  • The custom object commands are currently in beta. They are available to use now but understand they are subject to change. Developer previews are subject to our developer beta terms.
  • As of version 7.9.0 of the CLI, custom object schema commands have been moved from the hs custom-object schema namespace to hs custom-object.
Manage custom objects using the schema subcommand to manage custom object schemas and the create subcommand to create a new custom object.

Fetch schema for a single custom object

To fetch the schema for an existing custom object, run the following command:
hs custom-object fetch <name> <dest>
Arguments
ArgumentDescription
nameThe name of the custom object to fetch the schema for.
destThe destination on your local machine to save the schema to.

Fetch schema for all custom objects

Fetch the schemas for all custom objects in an account.
hs custom-object fetch-all <dest>
Arguments
ArgumentDescription
destThe destination on your local machine to save the schemas to.

Update the schema for a custom object

Update the schema for an existing custom object with the definition at the provided path.
hs custom-object update --path=definition
Flags
FlagDescription
--pathThe path to a schema definition located on your local machine.

Delete the schema for a custom object

Delete the schema for an existing custom object. You will be prompted to confirm the deletion before proceeding. You can use the --force flag to bypass this confirmation.
hs custom-object delete <name>
Arguments
FlagDescription
nameThe name of the custom object schema to delete.

Create a new custom object

Create a new custom object with the provided definition for its schema.
hs custom-object create <name> --path=definition
Arguments
FlagDescription
nameThe name of your new custom object schema.
Flags
FlagDescription
--pathThe path to a schema definition located on your local machine.
Last modified on February 9, 2026