> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom object CLI commands

> Learn about custom object CLI commands.

The commands listed below provide access to managing custom objects in your account via the HubSpot CLI.

<Warning>
  **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](https://legal.hubspot.com/hubspot-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`.
</Warning>

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:

```shell theme={null}
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.

```shell theme={null}
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.

```shell theme={null}
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.

```shell theme={null}
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.

```shell theme={null}
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. |
