Use the HubSpot CLI from KosmoKrator to call HubSpot tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
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 --jsonkosmokrator integrations:doctor hubspot3 --jsonkosmokrator integrations:status --json
Credentials
Authentication type: Manual OAuth tokenoauth2_manual_token. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
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.
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.
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.
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.
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.
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.
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.
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.