custom-object-management
hubspot/agent-cli-skills
Discover, create, update, and delete custom CRM object schemas in HubSpot.
What is custom-object-management?
Manage custom object type definitions in HubSpot CRM. Use this skill when you need to define a new object type, inspect existing schemas, or remove one. Record CRUD operations on custom objects use the same commands as standard objects.
- List all custom object schemas and filter by source
- Inspect full schema definitions including properties, associations, and labels
- Create new custom object schemas with properties, required fields, and associations
- Update schema metadata such as labels and descriptions
- Delete schemas and all associated records with a safe three-step confirmation flow
How to install custom-object-management
npx skills add https://github.com/hubspot/agent-cli-skills --skill custom-object-management- HubSpot CLI installed and configured
- Private app token with `crm.schemas.custom.write` permission for write operations
- Familiarity with `bulk-operations` skill for record CRUD and destructive workflow patterns
How to use custom-object-management
- 1.Run `hubspot schemas list` to discover existing schemas, optionally filter with `jq` for custom objects only
- 2.Run `hubspot schemas get <name>` to inspect a specific schema's full definition
- 3.Create a schema by building a JSON body with name, labels, properties, and associations, then pipe to `hubspot schemas create --dry-run` to preview and `hubspot schemas create --file <file>` to execute
- 4.Update schema metadata with `hubspot schemas update <name>` and a JSON patch body for labels or description
- 5.Delete a schema by running `hubspot schemas delete <name> --dry-run`, then re-run with the returned digest and `--confirm <name>` within 5 minutes
Use cases
- Define a new custom object type like 'Equipment' or 'Pets' with specific properties and associations
- Discover what custom objects already exist in your HubSpot instance
- Modify schema labels or descriptions after creation
- Permanently remove a custom object type and all its records
- Prepare schemas for use with bulk operations and record CRUD commands
- HubSpot administrators managing custom CRM object types
- Developers building custom integrations with HubSpot
- Teams standardizing data structures across their CRM
custom-object-management FAQ
Schema creation defines the object type structure (properties, labels, associations). Record creation adds individual instances of that object type using `hubspot objects` commands documented in `bulk-operations`.
No, use `hubspot properties create --type <name>` to add new properties. The `update` command only patches labels and description.
Schema deletion is permanent and irreversible — it removes the schema definition and every record of that type. It requires a three-step confirmation flow with `--dry-run`, digest, and `--confirm`.
Once created, use its `name` as the `--type` parameter in all `hubspot objects` commands for record CRUD, search, associations, and bulk operations.
objectTypeId (e.g. `2-12345678`) is only required when targeting the custom object in workflow `PLATFORM_FLOW` definitions; it's shown in `hubspot schemas list` output.
Full instructions (SKILL.md)
Source of truth, from hubspot/agent-cli-skills.
name: custom-object-management
description: Discover, create, update, and delete custom CRM object schemas. Use when defining a new object type, inspecting existing schemas, or removing one. Record CRUD on custom objects is identical to standard objects — see bulk-operations.
triggers:
- "create custom object"
- "custom object schema"
- "define new object type"
- "list object schemas"
- "delete custom object"
- "update schema labels"
- "what custom objects exist"
Source of truth
hubspot schemas --help is authoritative. Subcommands: list, get, create, update (metadata only), delete (destructive). Schema writes require a private app token with crm.schemas.custom.write. Read bulk-operations/SKILL.md first — every command here uses its JSONL conventions, and schemas delete uses its dry-run / digest / confirm flow.
Discover existing schemas
hubspot schemas list # JSONL: name, label, singular, objectTypeId, source
hubspot schemas list | jq 'select(.source=="custom")' # custom only
hubspot objects types | jq -c 'select(.source=="custom")' # same set, also shown to confirm `--type` resolves
name is what every other command takes. objectTypeId (e.g. 2-12345678) is only needed for workflow PLATFORM_FLOW targets.
Inspect one schema
hubspot schemas get pets
Returns the full definition — properties, associations, labels, requiredProperties, primaryDisplayProperty, fullyQualifiedName. Reshape with jq as needed (see bulk-operations/resources/json-patterns.md).
Create a schema
Build a JSON body and pipe it (or pass --file). Minimal valid body:
{
"name": "equipment",
"labels": {"singular": "Equipment", "plural": "Equipment"},
"primaryDisplayProperty": "equipment_name",
"requiredProperties": ["equipment_name"],
"properties": [
{"name": "equipment_name", "label": "Name", "type": "string", "fieldType": "text"}
],
"associatedObjects": ["contacts"]
}
cat equipment-schema.json | hubspot schemas create --dry-run # preview
hubspot schemas create --file equipment-schema.json # execute
Add more properties later with hubspot properties create --type <name> ....
Update schema metadata
update patches labels / description only. Property edits go through hubspot properties.
echo '{"labels":{"singular":"Device","plural":"Devices"}}' | hubspot schemas update equipment
update also supports --dry-run → digest → re-run with --digest --confirm <name> (see bulk-operations/SKILL.md for the pattern).
Delete a schema (destructive)
Schema delete is destructive and irreversible — it permanently removes the schema and every record of that type. It is gated as MetadataDestroy: every delete requires --dry-run first, then re-run with --digest <hash> --confirm <name> within 5 minutes.
Follow the three-step flow documented in bulk-operations/SKILL.md ("Safe destructive workflow"). For schemas, the confirm value is the schema name:
hubspot schemas delete equipment --dry-run
# → digest=blast-... ; apply_command_hint shows: --digest <hash> --confirm 'equipment'
hubspot schemas delete equipment --digest <hash> --confirm equipment
Check hubspot history --since 24h --kind MetadataDestroy to audit recent schema deletes.
Using the schema after creation
Once a schema exists, all hubspot objects ... commands accept its name as --type (e.g. --type pets). Record CRUD, search, association, bulk upsert — all identical to standard objects. Don't re-implement those flows here; see bulk-operations/SKILL.md and crm-lookup.
Related skills
More from hubspot/agent-cli-skills and the wider catalog.

customer-retention
Identify inactive/at-risk customers and create follow-up tasks at scale via CRM filters.

data-enrichment
Match external records to CRM contacts/companies by email or domain, then upsert enriched data in one pass.

deal-management
Run the full deal lifecycle from CLI — discover pipelines, qualify MQLs, advance/reassign in bulk, hunt stalled deals, and close.

quote-to-cash
Build product catalogs, assemble quotes with line items, and track invoices and subscriptions through revenue.

sales-execution
Log calls, notes, meetings, and tasks against contacts and deals in HubSpot CRM.

sales-reporting
Daily briefings, pipeline snapshots, and win/loss analysis from the terminal.