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
| Argument | Description |
|---|
name | The name of the custom object to fetch the schema for. |
dest | The 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
| Argument | Description |
|---|
dest | The 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
| Flag | Description |
|---|
--path | The 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
| Flag | Description |
|---|
name | The 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
| Flag | Description |
|---|
name | The name of your new custom object schema. |
Flags
| Flag | Description |
|---|
--path | The path to a schema definition located on your local machine. |
Last modified on February 9, 2026