KosmoKrator

marketing

HubSpot CLI for AI Agents

Use the HubSpot CLI from KosmoKrator to call HubSpot tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write Manual OAuth token auth

HubSpot CLI Setup

HubSpot can be configured headlessly with `kosmokrator integrations:configure hubspot3`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure hubspot3 --set access_token="$HUBSPOT3_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor hubspot3 --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token HUBSPOT3_ACCESS_TOKEN Secret secret yes Access Token
base_url HUBSPOT3_BASE_URL URL url no API Base URL

Call HubSpot Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call hubspot3.hubspot3_list_contacts '{
  "limit": 1,
  "offset": 1,
  "properties": "example_properties"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:hubspot3 hubspot3_list_contacts '{
  "limit": 1,
  "offset": 1,
  "properties": "example_properties"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs hubspot3 --json
kosmo integrations:docs hubspot3.hubspot3_list_contacts --json
kosmo integrations:schema hubspot3.hubspot3_list_contacts --json
kosmo integrations:search "HubSpot" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to HubSpot.

hubspot3.hubspot3_list_contacts

Read read

List HubSpot contacts. Returns contact IDs, emails, names, and associated company IDs. Use limit and offset for pagination, and properties to select specific fields.

Parameters
limit, offset, properties

Generic CLI call

kosmo integrations:call hubspot3.hubspot3_list_contacts '{"limit":1,"offset":1,"properties":"example_properties"}' --json

Provider shortcut

kosmo integrations:hubspot3 hubspot3_list_contacts '{"limit":1,"offset":1,"properties":"example_properties"}' --json

hubspot3.hubspot3_get_contact

Read read

Retrieve a HubSpot contact by its ID (vid). Returns the full contact profile including all properties, form submissions, and lists.

Parameters
contact_id

Generic CLI call

kosmo integrations:call hubspot3.hubspot3_get_contact '{"contact_id":"example_contact_id"}' --json

Provider shortcut

kosmo integrations:hubspot3 hubspot3_get_contact '{"contact_id":"example_contact_id"}' --json

hubspot3.hubspot3_create_contact

Write write

Create a new HubSpot contact. Requires an email address. Optionally set first name, last name, phone, company, and other properties. Returns the created contact with its ID.

Parameters
email, first_name, last_name, phone, company, properties

Generic CLI call

kosmo integrations:call hubspot3.hubspot3_create_contact '{"email":"example_email","first_name":"example_first_name","last_name":"example_last_name","phone":"example_phone","company":"example_company","properties":"example_properties"}' --json

Provider shortcut

kosmo integrations:hubspot3 hubspot3_create_contact '{"email":"example_email","first_name":"example_first_name","last_name":"example_last_name","phone":"example_phone","company":"example_company","properties":"example_properties"}' --json

hubspot3.hubspot3_list_companies

Read read

List HubSpot companies. Returns company IDs, names, domains, and other properties. Use limit and offset for pagination.

Parameters
limit, offset, properties

Generic CLI call

kosmo integrations:call hubspot3.hubspot3_list_companies '{"limit":1,"offset":1,"properties":"example_properties"}' --json

Provider shortcut

kosmo integrations:hubspot3 hubspot3_list_companies '{"limit":1,"offset":1,"properties":"example_properties"}' --json

hubspot3.hubspot3_get_company

Read read

Retrieve a HubSpot company by its ID. Returns the full company profile including name, domain, industry, and other properties.

Parameters
company_id

Generic CLI call

kosmo integrations:call hubspot3.hubspot3_get_company '{"company_id":"example_company_id"}' --json

Provider shortcut

kosmo integrations:hubspot3 hubspot3_get_company '{"company_id":"example_company_id"}' --json

hubspot3.hubspot3_list_deals

Read read

List HubSpot deals. Returns deal IDs, names, stages, amounts, and associated contacts/companies. Use limit and offset for pagination.

Parameters
limit, offset, properties

Generic CLI call

kosmo integrations:call hubspot3.hubspot3_list_deals '{"limit":1,"offset":1,"properties":"example_properties"}' --json

Provider shortcut

kosmo integrations:hubspot3 hubspot3_list_deals '{"limit":1,"offset":1,"properties":"example_properties"}' --json

hubspot3.hubspot3_get_current_user

Read read

Retrieve the currently authenticated HubSpot user's information. Returns the user's ID, email, name, and portal information. Useful for identifying which account or token is in use.

Parameters
none

Generic CLI call

kosmo integrations:call hubspot3.hubspot3_get_current_user '{}' --json

Provider shortcut

kosmo integrations:hubspot3 hubspot3_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

hubspot3.hubspot3_list_contacts

List HubSpot contacts. Returns contact IDs, emails, names, and associated company IDs. Use limit and offset for pagination, and properties to select specific fields.

Operation
Read read
Schema command
kosmo integrations:schema hubspot3.hubspot3_list_contacts --json
ParameterTypeRequiredDescription
limit integer no Maximum number of contacts to return (default 20, max 100).
offset integer no Pagination offset (vid offset for continuing results).
properties string no Comma-separated list of contact properties to include (e.g. "email,firstname,lastname,company").

hubspot3.hubspot3_get_contact

Retrieve a HubSpot contact by its ID (vid). Returns the full contact profile including all properties, form submissions, and lists.

Operation
Read read
Schema command
kosmo integrations:schema hubspot3.hubspot3_get_contact --json
ParameterTypeRequiredDescription
contact_id string yes HubSpot contact ID (vid).

hubspot3.hubspot3_create_contact

Create a new HubSpot contact. Requires an email address. Optionally set first name, last name, phone, company, and other properties. Returns the created contact with its ID.

Operation
Write write
Schema command
kosmo integrations:schema hubspot3.hubspot3_create_contact --json
ParameterTypeRequiredDescription
email string yes Contact email address.
first_name string no Contact first name.
last_name string no Contact last name.
phone string no Contact phone number.
company string no Contact company name.
properties object no Additional custom properties as key-value pairs.

hubspot3.hubspot3_list_companies

List HubSpot companies. Returns company IDs, names, domains, and other properties. Use limit and offset for pagination.

Operation
Read read
Schema command
kosmo integrations:schema hubspot3.hubspot3_list_companies --json
ParameterTypeRequiredDescription
limit integer no Maximum number of companies to return (default 20, max 100).
offset integer no Pagination offset (company ID offset for continuing results).
properties string no Comma-separated list of company properties to include (e.g. "name,domain,industry").

hubspot3.hubspot3_get_company

Retrieve a HubSpot company by its ID. Returns the full company profile including name, domain, industry, and other properties.

Operation
Read read
Schema command
kosmo integrations:schema hubspot3.hubspot3_get_company --json
ParameterTypeRequiredDescription
company_id string yes HubSpot company ID.

hubspot3.hubspot3_list_deals

List HubSpot deals. Returns deal IDs, names, stages, amounts, and associated contacts/companies. Use limit and offset for pagination.

Operation
Read read
Schema command
kosmo integrations:schema hubspot3.hubspot3_list_deals --json
ParameterTypeRequiredDescription
limit integer no Maximum number of deals to return (default 20, max 100).
offset integer no Pagination offset (deal ID offset for continuing results).
properties string no Comma-separated list of deal properties to include (e.g. "dealname,amount,dealstage").

hubspot3.hubspot3_get_current_user

Retrieve the currently authenticated HubSpot user's information. Returns the user's ID, email, name, and portal information. Useful for identifying which account or token is in use.

Operation
Read read
Schema command
kosmo integrations:schema hubspot3.hubspot3_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.